summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-04-28 15:15:59 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-04 16:51:18 -0500
commit3a725d099cca0c79cc8a246f3a6e2c327070ea6c (patch)
tree662087ecb7dd6a2ef3a5e91259c3df5987a10d43
parent5a93b48c7d27d9981d0c99fe22e192bcd393f5df (diff)
downloadefl-3a725d099cca0c79cc8a246f3a6e2c327070ea6c.tar.gz
ecore_drm2: Fix atomic flip with no new buffer
We don't have an atomic state, so we need to create one before the flip
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 43e8533bf6..ec2f7e196d 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -505,6 +505,11 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output)
if (!fb) return -1;
output->prep.fb = fb;
+#ifdef HAVE_ATOMIC_DRM
+ /* If we have no req yet, we're flipping to current state.
+ * rebuild the current state in the prep state */
+ if (!output->prep.atomic_req) _fb_atomic_flip_test(output);
+#endif
if (_ecore_drm2_use_atomic)
ret = _fb_atomic_flip(output);