From 773897b09b94afe48193dab56550774d8453b5e7 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 5 Feb 2015 11:06:41 -0500 Subject: [PATCH] ecore-drm: Fix issue with ecore_drm_output_crtc_Find sending back an invalid id. Fix T2086 Summary: In order to avoid getting returned an invalid id, we should not be checking the currently active encoder and crtc combination because outputs may have changed, encoders/crtc combinations could have changed, etc, etc. @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm/ecore_drm_output.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index cf726946e7..25bad3bc1c 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -70,22 +70,6 @@ _ecore_drm_output_crtc_find(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConne int i, j; int crtc = -1; - /* Trying to first use the currently active encoder and crtc combination to avoid a - * full modeset */ - if (conn->encoder_id) - enc = drmModeGetEncoder(dev->drm.fd, conn->encoder_id); - else - enc = NULL; - - if ((enc) && (enc->crtc_id)) - { - crtc = enc->crtc_id; - drmModeFreeEncoder(enc); - /* Check if this CRTC is already allocated */ - if (!(dev->crtc_allocator & (1 << crtc))) - return crtc; - } - /* We did not find an existing encoder + crtc combination. Loop through all of them until we * find the first working combination */ for (j = 0; j < conn->count_encoders; j++)