diff --git a/platform/drm/cog-platform-drm.c b/platform/drm/cog-platform-drm.c index bd47b1d9..86e8c5ae 100644 --- a/platform/drm/cog-platform-drm.c +++ b/platform/drm/cog-platform-drm.c @@ -358,7 +358,7 @@ find_crtc_for_encoder(const drmModeRes *resources, const drmModeEncoder *encoder for (int i = 0; i < resources->count_crtcs; i++) { const uint32_t crtc_mask = 1 << i; const uint32_t crtc_id = resources->crtcs[i]; - if (encoder->possible_crtcs & crtc_mask) { + if (encoder->possible_crtcs & crtc_mask && encoder->crtc_id == crtc_id) { return crtc_id; } }