summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-11-05 08:58:46 -0500
committerChris Michael <cp.michael@samsung.com>2015-11-05 09:01:36 -0500
commitae7a243c99c071a92582fda0a2dfdd27e3a39e1b (patch)
treea019a7c0b992f440d45834f251c319442716008a /src/lib/ecore_drm
parent483cec924bff9bd2a803dcb2fef161759f302f8d (diff)
ecore-drm: Fix issue of duplicate page flips
Summary: If we already have a pending pageflip scheduled for a given framebuffer, don't reschedule another one. This also includes a minor fix when mmap'ing the framebuffer (previously was also mapped PROT_READ). @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_fb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c
index 68c7e94bb7..385d3eadcd 100644
--- a/src/lib/ecore_drm/ecore_drm_fb.c
+++ b/src/lib/ecore_drm/ecore_drm_fb.c
@@ -98,9 +98,8 @@ ecore_drm_fb_create(Ecore_Drm_Device *dev, int width, int height)
98 goto map_err; 98 goto map_err;
99 } 99 }
100 100
101 fb->mmap = 101 fb->mmap =
102 mmap(0, fb->size, PROT_WRITE | PROT_READ, MAP_SHARED, 102 mmap(0, fb->size, PROT_WRITE, MAP_SHARED, dev->drm.fd, marg.offset);
103 dev->drm.fd, marg.offset);
104 if (fb->mmap == MAP_FAILED) 103 if (fb->mmap == MAP_FAILED)
105 { 104 {
106 ERR("Could not mmap framebuffer space: %m"); 105 ERR("Could not mmap framebuffer space: %m");
@@ -231,6 +230,8 @@ ecore_drm_fb_send(Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb, Ecore_Drm_Pageflip_Cb
231 230
232 if (eina_list_count(dev->outputs) < 1) return; 231 if (eina_list_count(dev->outputs) < 1) return;
233 232
233 if (fb->pending_flip) return;
234
234 if (!(cb = calloc(1, sizeof(Ecore_Drm_Pageflip_Callback)))) 235 if (!(cb = calloc(1, sizeof(Ecore_Drm_Pageflip_Callback))))
235 return; 236 return;
236 237