ecore-drm2: Fix setting dpms level using atomic state
authorChris Michael <cp.michael@samsung.com>
Thu, 18 May 2017 16:13:13 +0000 (12:13 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 18 May 2017 16:14:01 +0000 (12:14 -0400)
The property we need to change during an atomic dpms change is
actually from the output connector state (not crtc state). This fix
should make dpms work when using atomic

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_drm2/ecore_drm2_outputs.c

index 4432380..2137197 100644 (file)
@@ -416,7 +416,7 @@ _output_dpms_property_get(int fd, const drmModeConnector *conn)
 static Eina_Bool
 _output_dpms_atomic_set(Ecore_Drm2_Output *output, int level)
 {
-   Ecore_Drm2_Crtc_State *cstate;
+   Ecore_Drm2_Connector_State *cstate;
    drmModeAtomicReq *req = NULL;
    Eina_Bool ret = EINA_TRUE;
 
@@ -425,10 +425,10 @@ _output_dpms_atomic_set(Ecore_Drm2_Output *output, int level)
 
    sym_drmModeAtomicSetCursor(req, 0);
 
-   cstate = output->crtc_state;
+   cstate = output->conn_state;
 
    if (sym_drmModeAtomicAddProperty(req, cstate->obj_id,
-                                    cstate->active.id, level) < 0)
+                                    cstate->dpms.id, level) < 0)
      {
         ERR("Failed to add connector property DPMS");
         ret = EINA_FALSE;