summaryrefslogtreecommitdiffstats
path: root/gralloc_drm_priv.h
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2013-04-15 09:10:09 +0300
committerTapani Pälli <tapani.palli@intel.com>2013-04-15 13:25:55 +0300
commitb201e98a1cbdf217e52da2cf503beb3b21c2e173 (patch)
treeae9d8f127a660fa22d3ef52c3413e3c47e919ea8 /gralloc_drm_priv.h
parent4b3db54505933738ec33f92ec7e2c5304cb18325 (diff)
downloadexternal_drm_gralloc-b201e98a1cbdf217e52da2cf503beb3b21c2e173.zip
external_drm_gralloc-b201e98a1cbdf217e52da2cf503beb3b21c2e173.tar.gz
external_drm_gralloc-b201e98a1cbdf217e52da2cf503beb3b21c2e173.tar.bz2
gralloc: plane support
patch introduces API between hwcomposer and gralloc, hwcomposer can reserve an overlay plane to be used by a particular layer in prepare hook, drmModeSetPlane for each plane gets called later when post() gets called by the eglSwapBuffers (from hwcomposer set), this can be later changed to use atomic modesetting code and drm properties to make one 'atomic flip' for graphics + planes. Change-Id: I3b7d179b285e43eb19fdc3b4c7ce093f3ba6aade Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Diffstat (limited to 'gralloc_drm_priv.h')
-rw-r--r--gralloc_drm_priv.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gralloc_drm_priv.h b/gralloc_drm_priv.h
index dc7d505..eb4338c 100644
--- a/gralloc_drm_priv.h
+++ b/gralloc_drm_priv.h
@@ -49,6 +49,25 @@ enum hdmi_output_mode {
struct gralloc_drm_plane_t {
drmModePlane *drm_plane;
+
+ /* plane has been set to display a layer */
+ uint32_t active;
+
+ /* handle to display */
+ buffer_handle_t handle;
+
+ /* position, crop and scale */
+ uint32_t src_x;
+ uint32_t src_y;
+ uint32_t src_w;
+ uint32_t src_h;
+ uint32_t dst_x;
+ uint32_t dst_y;
+ uint32_t dst_w;
+ uint32_t dst_h;
+
+ /* previous buffer, for refcounting */
+ struct gralloc_drm_bo_t *prev;
};
struct gralloc_drm_output
@@ -106,6 +125,12 @@ struct gralloc_drm_t {
struct drm_module_t {
gralloc_module_t base;
+ /* HWC plane API */
+ int (*hwc_reserve_plane) (struct gralloc_drm_t *mod, buffer_handle_t handle,
+ uint32_t dst_x, uint32_t dst_y, uint32_t dst_w, uint32_t dst_h,
+ uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h);
+ void (*hwc_disable_planes) (struct gralloc_drm_t *mod);
+
pthread_mutex_t mutex;
struct gralloc_drm_t *drm;
};