Skip to content

Commit

Permalink
Capturing the crtc_id
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkae committed Oct 18, 2023
1 parent 7f519f3 commit 5609ac6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/platforms/eglstream-kms/server/egl_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void mgek::EGLOutput::configure(size_t kms_mode_index)
mgk::DRMModeCrtcUPtr crtc;
mgk::DRMModePlaneUPtr plane;
std::tie(crtc, plane) = mgk::find_crtc_with_primary_plane(drm_fd, connector);
auto const crtc_id = crtc->crtc_id;
_crtc_id = crtc->crtc_id;
plane_id = plane->plane_id;

auto ret = drmModeCreatePropertyBlob(
Expand All @@ -238,7 +238,7 @@ void mgek::EGLOutput::configure(size_t kms_mode_index)
atomic_commit(dummy.id(), nullptr, DRM_MODE_ATOMIC_ALLOW_MODESET);

EGLAttrib const crtc_filter[] = {
EGL_DRM_CRTC_EXT, static_cast<EGLAttrib>(crtc_id),
EGL_DRM_CRTC_EXT, static_cast<EGLAttrib>(_crtc_id),
EGL_NONE};
int found_layers{0};
if (eglGetOutputLayersEXT(display, crtc_filter, &layer, 1, &found_layers) != EGL_TRUE)
Expand Down Expand Up @@ -284,7 +284,6 @@ int mgek::EGLOutput::atomic_commit(uint64_t fb, const void *drm_event_userdata,

if (flags & DRM_MODE_ATOMIC_ALLOW_MODESET)
{
auto _crtc_id = crtc_id();
mgk::ObjectProperties crtc_props{drm_fd, _crtc_id, DRM_MODE_OBJECT_CRTC};

/* Activate the CRTC and set the mode */
Expand Down
1 change: 1 addition & 0 deletions src/platforms/eglstream-kms/server/egl_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class EGLOutput : public DisplayConfigurationOutput

uint32_t plane_id;
std::unique_ptr<graphics::kms::ObjectProperties> plane_props;
uint32_t _crtc_id;

uint32_t mode_id;

Expand Down

0 comments on commit 5609ac6

Please sign in to comment.