devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ae7a243c99c071a92582fda0a2dfdd27e3a39e1b

commit ae7a243c99c071a92582fda0a2dfdd27e3a39e1b
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Thu Nov 5 08:58:46 2015 -0500

    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.mich...@samsung.com>
---
 src/lib/ecore_drm/ecore_drm_fb.c | 7 ++++---
 1 file 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 68c7e94..385d3ea 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)
         goto map_err;
      }
 
-   fb->mmap = 
-     mmap(0, fb->size, PROT_WRITE | PROT_READ, MAP_SHARED, 
-          dev->drm.fd, marg.offset);
+   fb->mmap =
+     mmap(0, fb->size, PROT_WRITE, MAP_SHARED, dev->drm.fd, marg.offset);
    if (fb->mmap == MAP_FAILED)
      {
         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
 
    if (eina_list_count(dev->outputs) < 1) return;
 
+   if (fb->pending_flip) return;
+
    if (!(cb = calloc(1, sizeof(Ecore_Drm_Pageflip_Callback))))
      return;
 

-- 


Reply via email to