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 <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-02-05 11:06:41 -05:00
parent 73634580f8
commit 773897b09b
1 changed files with 0 additions and 16 deletions

View File

@ -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++)