devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=723c24de31ab8c831705723e3ebcf78f016c2180

commit 723c24de31ab8c831705723e3ebcf78f016c2180
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue May 12 12:03:24 2015 -0400

    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.mich...@samsung.com>
---
 src/lib/ecore_drm/ecore_drm_output.c | 14 ++++++++++----
 1 file 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 00f2ae4..f1a3be3 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)
    drmModeRes *res;
    drmModeConnector *conn;
    drmModeEncoder *enc;
-   int i, j;
+   int i, j, k;
    unsigned int p;
    Eina_Bool ret = EINA_FALSE;
 
@@ -1355,9 +1355,15 @@ ecore_drm_output_possible_crtc_get(Ecore_Drm_Output 
*output, unsigned int crtc)
 
              p = enc->possible_crtcs;
 
-             /* Does the CRTC match the list of possible CRTCs from the 
encoder? */
-             if (p & (1 << output->crtc_id))
-               ret = EINA_TRUE;
+             for (k = 0; k < res->count_crtcs; k++)
+               {
+                  if (res->crtcs[k] != output->crtc_id) continue;
+                  if (p & (1 << k))
+                    {
+                       ret = EINA_TRUE;
+                       break;
+                    }
+               }
 
 next:
              drmModeFreeEncoder(enc);

-- 


Reply via email to