diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-06-16 16:30:39 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-06-23 08:15:41 -0500 |
commit | 5f2d4e75ab9d778ca6deeae7eabe3f406a4bdb3c (patch) | |
tree | 43bb8c9951ef769fd5346b4e9c9d5519fa38c2ad /src/lib/ecore_drm2 | |
parent | c67da0c86984349a130696e036bc3788eef733ab (diff) |
ecore_drm2: Add callbacks for plane assign/release
E will need these to gate wayland buffer releases.
Diffstat (limited to 'src/lib/ecore_drm2')
-rw-r--r-- | src/lib/ecore_drm2/Ecore_Drm2.h | 2 | ||||
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_plane.c | 9 |
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 | |||
43 | ECORE_DRM2_FB_STATUS_SCANOUT_OFF = 2, | 43 | ECORE_DRM2_FB_STATUS_SCANOUT_OFF = 2, |
44 | ECORE_DRM2_FB_STATUS_RELEASE = 4, | 44 | ECORE_DRM2_FB_STATUS_RELEASE = 4, |
45 | ECORE_DRM2_FB_STATUS_DELETED = 8, | 45 | ECORE_DRM2_FB_STATUS_DELETED = 8, |
46 | ECORE_DRM2_FB_STATUS_PLANE_ASSIGN = 16, | ||
47 | ECORE_DRM2_FB_STATUS_PLANE_RELEASE = 32, | ||
46 | } Ecore_Drm2_Fb_Status; | 48 | } Ecore_Drm2_Fb_Status; |
47 | 49 | ||
48 | /* opaque structure to represent a drm device */ | 50 | /* 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: | |||
124 | DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id); | 124 | DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id); |
125 | output->planes = eina_list_append(output->planes, plane); | 125 | output->planes = eina_list_append(output->planes, plane); |
126 | 126 | ||
127 | if (fb->status_handler) | ||
128 | fb->status_handler(fb, | ||
129 | ECORE_DRM2_FB_STATUS_PLANE_ASSIGN, | ||
130 | fb->status_data); | ||
127 | return plane; | 131 | return plane; |
128 | } | 132 | } |
129 | 133 | ||
@@ -143,6 +147,11 @@ ecore_drm2_plane_release(Ecore_Drm2_Plane *plane) | |||
143 | plane->dead = EINA_TRUE; | 147 | plane->dead = EINA_TRUE; |
144 | plane->state->in_use = EINA_FALSE; | 148 | plane->state->in_use = EINA_FALSE; |
145 | _fb_atomic_flip_test(plane->output); | 149 | _fb_atomic_flip_test(plane->output); |
150 | |||
151 | if (fb->status_handler) | ||
152 | fb->status_handler(fb, | ||
153 | ECORE_DRM2_FB_STATUS_PLANE_RELEASE, | ||
154 | fb->status_data); | ||
146 | } | 155 | } |
147 | 156 | ||
148 | EAPI void | 157 | EAPI void |