diff options
author | Chris Michael <cp.michael@samsung.com> | 2015-04-16 10:22:44 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2015-04-16 10:25:46 -0400 |
commit | 50c47e36ebb37866637a34b70339cc20f848b6bf (patch) | |
tree | e3dc6e0e78c6e4abf7320a3c0a6595bf0970f78d | |
parent | eff4a0abe716d3afffe9d44e0ac3fa9810e8b2a2 (diff) | |
download | efl-50c47e36ebb37866637a34b70339cc20f848b6bf.tar.gz |
ecore-drm: Add pending_flip field to Ecore_Drm_Fb
Summary: This adds a pending_flip field to Ecore_Drm_Fb structure so
that when we schedule a pageflip event we can wait until the flip is
complete before trying to reuse the buffer again.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r-- | src/lib/ecore_drm/Ecore_Drm.h | 1 | ||||
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_fb.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h index a6c9bf0d90..8e837e0a2b 100644 --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h @@ -66,6 +66,7 @@ typedef struct _Ecore_Drm_Fb int fd; void *mmap; int w, h; + Eina_Bool pending_flip : 1; } Ecore_Drm_Fb; struct _Ecore_Drm_Device diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c index ea466ca301..cfe416864d 100644 --- a/src/lib/ecore_drm/ecore_drm_fb.c +++ b/src/lib/ecore_drm/ecore_drm_fb.c @@ -226,6 +226,12 @@ ecore_drm_fb_send(Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb, Ecore_Drm_Pageflip_Cb { ERR("Cannot flip crtc %u for connector %u: %m", output->crtc_id, output->conn_id); + continue; } + + fb->pending_flip = EINA_TRUE; } + + while (fb->pending_flip) + drmHandleEvent(dev->drm.fd, &dev->drm_ctx); } |