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>
This commit is contained in:
Chris Michael 2015-11-05 08:58:46 -05:00
parent 483cec924b
commit ae7a243c99
1 changed files with 4 additions and 3 deletions

View File

@ -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;