summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-02-05 11:06:41 -0500
committerChris Michael <cp.michael@samsung.com>2015-02-05 11:08:36 -0500
commit773897b09b94afe48193dab56550774d8453b5e7 (patch)
treea8090d924d05ef4f85b95b88ffb3b9084651b55d
parent73634580f8949547b0dbd5f072eb57fa1e273401 (diff)
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>
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c16
1 files changed, 0 insertions, 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
70 int i, j; 70 int i, j;
71 int crtc = -1; 71 int crtc = -1;
72 72
73 /* Trying to first use the currently active encoder and crtc combination to avoid a
74 * full modeset */
75 if (conn->encoder_id)
76 enc = drmModeGetEncoder(dev->drm.fd, conn->encoder_id);
77 else
78 enc = NULL;
79
80 if ((enc) && (enc->crtc_id))
81 {
82 crtc = enc->crtc_id;
83 drmModeFreeEncoder(enc);
84 /* Check if this CRTC is already allocated */
85 if (!(dev->crtc_allocator & (1 << crtc)))
86 return crtc;
87 }
88
89 /* We did not find an existing encoder + crtc combination. Loop through all of them until we 73 /* We did not find an existing encoder + crtc combination. Loop through all of them until we
90 * find the first working combination */ 74 * find the first working combination */
91 for (j = 0; j < conn->count_encoders; j++) 75 for (j = 0; j < conn->count_encoders; j++)