summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_fb.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-04-27 16:02:59 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-05 12:53:22 -0500
commit63dbf061a993a3a81c03bc79806b646003c85e4e (patch)
treee74340be1005c11d815a0598f47fa55466049987 /src/lib/ecore_drm2/ecore_drm2_fb.c
parent6482367aa2010c244bf109c26e0460f34f85332d (diff)
ecore_drm2: Move atomic state into an output state struct
This should make it easier to share code paths between atomic and non atomic operations.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 452e302daf..52cf55af9a 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -321,16 +321,16 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output)
321 321
322 if (res) 322 if (res)
323 { 323 {
324 if (output->atomic_req) 324 if (output->prep.atomic_req)
325 { 325 {
326 /* clear any previous request */ 326 /* clear any previous request */
327 sym_drmModeAtomicFree(output->atomic_req); 327 sym_drmModeAtomicFree(output->prep.atomic_req);
328 328
329 /* just use the new request */ 329 /* just use the new request */
330 output->atomic_req = req; 330 output->prep.atomic_req = req;
331 } 331 }
332 else 332 else
333 output->atomic_req = req; 333 output->prep.atomic_req = req;
334 } 334 }
335 335
336 return res; 336 return res;
@@ -351,10 +351,11 @@ _fb_atomic_flip(Ecore_Drm2_Output *output)
351 DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT | 351 DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT |
352 DRM_MODE_ATOMIC_ALLOW_MODESET; 352 DRM_MODE_ATOMIC_ALLOW_MODESET;
353 353
354 if (!output->atomic_req) return -1; 354 if (!output->prep.atomic_req) return -1;
355 355
356 res = 356 res =
357 sym_drmModeAtomicCommit(output->fd, output->atomic_req, flags, NULL); 357 sym_drmModeAtomicCommit(output->fd,
358 output->prep.atomic_req, flags, NULL);
358 if (res < 0) 359 if (res < 0)
359 { 360 {
360 ERR("Failed Atomic Commit: %m"); 361 ERR("Failed Atomic Commit: %m");