ecore_drm2: Add callbacks for plane assign/release
authorDerek Foreman <derekf@osg.samsung.com>
Fri, 16 Jun 2017 21:30:39 +0000 (16:30 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Fri, 23 Jun 2017 13:15:41 +0000 (08:15 -0500)
E will need these to gate wayland buffer releases.

src/lib/ecore_drm2/Ecore_Drm2.h
src/lib/ecore_drm2/ecore_drm2_plane.c

index 37a67b1..2d0779a 100644 (file)
@@ -43,6 +43,8 @@ typedef enum _Ecore_Drm2_Fb_Status
    ECORE_DRM2_FB_STATUS_SCANOUT_OFF = 2,
    ECORE_DRM2_FB_STATUS_RELEASE = 4,
    ECORE_DRM2_FB_STATUS_DELETED = 8,
+   ECORE_DRM2_FB_STATUS_PLANE_ASSIGN = 16,
+   ECORE_DRM2_FB_STATUS_PLANE_RELEASE = 32,
 } Ecore_Drm2_Fb_Status;
 
 /* opaque structure to represent a drm device */
index cc79bff..796302d 100644 (file)
@@ -124,6 +124,10 @@ out:
    DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id);
    output->planes = eina_list_append(output->planes, plane);
 
+   if (fb->status_handler)
+     fb->status_handler(fb,
+                        ECORE_DRM2_FB_STATUS_PLANE_ASSIGN,
+                        fb->status_data);
    return plane;
 }
 
@@ -143,6 +147,11 @@ ecore_drm2_plane_release(Ecore_Drm2_Plane *plane)
    plane->dead = EINA_TRUE;
    plane->state->in_use = EINA_FALSE;
    _fb_atomic_flip_test(plane->output);
+
+   if (fb->status_handler)
+     fb->status_handler(fb,
+                        ECORE_DRM2_FB_STATUS_PLANE_RELEASE,
+                        fb->status_data);
 }
 
 EAPI void