ecore-drm2: Fill in crtc background color (if supported) during atomic
authorChristopher Michael <cp.michael@samsung.com>
Mon, 1 Apr 2019 12:41:38 +0000 (08:41 -0400)
committerYeongjong Lee <yj34.lee@samsung.com>
Wed, 24 Apr 2019 05:24:47 +0000 (14:24 +0900)
commits

Small patch to add the crtc background_color property (if supported)
to any atomic tests/commits

@feature

src/lib/ecore_drm2/ecore_drm2_fb.c
src/lib/ecore_drm2/ecore_drm2_outputs.c

index e8f6c16..aab4795 100644 (file)
@@ -348,6 +348,15 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output)
                                   cstate->active.value);
    if (ret < 0) goto err;
 
+   if (cstate->background.id)
+     {
+        ret =
+          sym_drmModeAtomicAddProperty(req, cstate->obj_id,
+                                       cstate->background.id,
+                                       cstate->background.value);
+        if (ret < 0) goto err;
+     }
+
    EINA_LIST_FOREACH(output->planes, l, plane)
      {
         pstate = plane->state;
index 6734cac..7ad6ef8 100644 (file)
@@ -1303,6 +1303,20 @@ _output_mode_atomic_set(Ecore_Drm2_Output *output, Ecore_Drm2_Output_Mode *mode)
         goto err;
      }
 
+   if (cstate->background.id)
+     {
+        ret =
+          sym_drmModeAtomicAddProperty(req, cstate->obj_id,
+                                       cstate->background.id,
+                                       cstate->background.value);
+        if (ret < 0)
+          {
+             ERR("Could not add atomic property");
+             ret = EINA_FALSE;
+             goto err;
+          }
+     }
+
    ret = sym_drmModeAtomicCommit(output->fd, req, DRM_MODE_ATOMIC_ALLOW_MODESET,
                                  output);
    if (ret < 0)