summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_fb.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-06-30 10:26:41 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-06-30 10:26:41 -0500
commit3775a9645da7e92599babccfe8454304cec367b7 (patch)
tree3687063a6df14cb95a51730f9f2862cf1573fce7 /src/lib/ecore_drm2/ecore_drm2_fb.c
parentd2b614111cea61420cfc4ca0aa938310b9b549f8 (diff)
ecore_drm2: fix scanout_on callback firing too often
We need to increase the on scanout count for a buffer only when the plane it's on makes its transition from pending to visible. Previously it was firing for every refresh which would break refcounting for any plane using surface that didn't change every frame.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index d601803f83..f8202fdab3 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -292,6 +292,7 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
292 EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane) 292 EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane)
293 { 293 {
294 fb = plane->fb; 294 fb = plane->fb;
295 plane_scanout = plane->scanout;
295 if (!plane->dead) 296 if (!plane->dead)
296 { 297 {
297 /* First time this plane is scanned out */ 298 /* First time this plane is scanned out */
@@ -299,13 +300,13 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
299 fb->scanout_count++; 300 fb->scanout_count++;
300 301
301 plane->scanout = EINA_TRUE; 302 plane->scanout = EINA_TRUE;
302 if (fb->status_handler && (fb->scanout_count == 1)) 303 if (fb->status_handler && (fb->scanout_count == 1) &&
304 (plane_scanout != plane->scanout))
303 fb->status_handler(fb, 305 fb->status_handler(fb,
304 ECORE_DRM2_FB_STATUS_SCANOUT_ON, 306 ECORE_DRM2_FB_STATUS_SCANOUT_ON,
305 fb->status_data); 307 fb->status_data);
306 continue; 308 continue;
307 } 309 }
308 plane_scanout = plane->scanout;
309 output->planes = eina_list_remove_list(output->planes, l); 310 output->planes = eina_list_remove_list(output->planes, l);
310 free(plane); 311 free(plane);
311 if (!plane_scanout) continue; 312 if (!plane_scanout) continue;