From edd78d18006e94d7fa9bd553bb49d2e4becddd6d Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Mon, 1 Apr 2019 08:41:38 -0400 Subject: [PATCH] ecore-drm2: Fill in crtc background color (if supported) during atomic 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 | 9 +++++++++ src/lib/ecore_drm2/ecore_drm2_outputs.c | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index e8f6c16762..aab47956fb 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -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; diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 6734cacdff..7ad6ef8396 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -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)