summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-06-16 16:30:39 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-06-23 08:15:41 -0500
commit5f2d4e75ab9d778ca6deeae7eabe3f406a4bdb3c (patch)
tree43bb8c9951ef769fd5346b4e9c9d5519fa38c2ad
parentc67da0c86984349a130696e036bc3788eef733ab (diff)
downloadefl-5f2d4e75ab9d778ca6deeae7eabe3f406a4bdb3c.tar.gz
ecore_drm2: Add callbacks for plane assign/release
E will need these to gate wayland buffer releases.
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h2
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_plane.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 37a67b1e04..2d0779a4c9 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -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 */
diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c
index cc79bff1dd..796302dc1f 100644
--- a/src/lib/ecore_drm2/ecore_drm2_plane.c
+++ b/src/lib/ecore_drm2/ecore_drm2_plane.c
@@ -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