summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-05-12 12:03:24 -0400
committerChris Michael <cp.michael@samsung.com>2015-05-12 12:07:31 -0400
commit723c24de31ab8c831705723e3ebcf78f016c2180 (patch)
tree33ab26313ce3a55d7d6836a510e0bb51e4c8e6bf /src/lib/ecore_drm
parente577a108cf4d802d9a09fbe7ebb8ea9e02dac688 (diff)
ecore-drm: Fix finding possible crtcs
Summary: This fixes an issue when searching for possible crtcs that an output can work on. Previously, we would end up not returning any possible crtcs due to not looping the crtcs of the resource. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 00f2ae48cf..f1a3be3474 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1318,7 +1318,7 @@ ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsigned int crtc)
1318 drmModeRes *res; 1318 drmModeRes *res;
1319 drmModeConnector *conn; 1319 drmModeConnector *conn;
1320 drmModeEncoder *enc; 1320 drmModeEncoder *enc;
1321 int i, j; 1321 int i, j, k;
1322 unsigned int p; 1322 unsigned int p;
1323 Eina_Bool ret = EINA_FALSE; 1323 Eina_Bool ret = EINA_FALSE;
1324 1324
@@ -1355,9 +1355,15 @@ ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsigned int crtc)
1355 1355
1356 p = enc->possible_crtcs; 1356 p = enc->possible_crtcs;
1357 1357
1358 /* Does the CRTC match the list of possible CRTCs from the encoder? */ 1358 for (k = 0; k < res->count_crtcs; k++)
1359 if (p & (1 << output->crtc_id)) 1359 {
1360 ret = EINA_TRUE; 1360 if (res->crtcs[k] != output->crtc_id) continue;
1361 if (p & (1 << k))
1362 {
1363 ret = EINA_TRUE;
1364 break;
1365 }
1366 }
1361 1367
1362next: 1368next:
1363 drmModeFreeEncoder(enc); 1369 drmModeFreeEncoder(enc);