Expose the OMAP Z-Order property through DRM
PATCH 1/1 Expose the OMAP Z-Order property through DRM
Added support for zorder changes through DRM plane properties
Signed-off-by Andre Renaud <[email protected]>
--- drivers/staging/omapdrm/omap_drv.h | 1 + drivers/staging/omapdrm/omap_plane.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
drivers/staging/omapdrm/omap_drv.h +1 -0
@@ -62,6 +62,7 @@ struct omap_drm_private {/* properties: */ struct drm_property *rotation_prop; +struct drm_property *zorder_prop; };/* this should probably be in drm-core to standardize amongst drivers */
drivers/staging/omapdrm/omap_plane.c +19 -0
@@ -433,6 +433,15 @@ void omap_plane_install_properties(struct drm_plane *plane, priv->rotation_prop = prop; }drm_object_attach_property (obj, prop,0 ); + + prop = priv->zorder_prop; +if (!prop) { + prop =drm_property_create_range (dev,0 ,"zorder" ,0 ,3 ); +if (prop ==NULL ) +return ; + priv->zorder_prop = prop; + } +drm_object_attach_property (obj, prop,0 ); } int omap_plane_set_property(struct drm_plane *plane,
@@ -452,6 +461,16 @@ int omap_plane_set_property(struct drm_plane *plane, ret =omap_plane_dpms (plane,DRM_MODE_DPMS_ON ); else ret =0 ; + }else if (property == priv->zorder_prop) { +struct omap_overlay *ovl = omap_plane->ovl; + +DBG ("%s: zorder: %d" , ovl->name, (uint32_t )val); + omap_plane->info.zorder = val; + +if (ovl->is_enabled (ovl)) + ret =omap_plane_dpms (plane,DRM_MODE_DPMS_ON ); +else + ret =0 ; }return ret;
Signature · 1 line
1.7.9.5
Quoted 3 lines · Andre Renaud
Added support for zorder changes through DRM plane properties
Signed-off-by Andre Renaud <[email protected]>
Signed-off-by Rob Clark <[email protected]>
Quoted 57 lines
--- drivers/staging/omapdrm/omap_drv.h | 1 + drivers/staging/omapdrm/omap_plane.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)drivers/staging/omapdrm/omap_drv.h +1
-0@@ -62,6 +62,7 @@ struct omap_drm_private {/* properties: */ struct drm_property *rotation_prop; +struct drm_property *zorder_prop; };/* this should probably be in drm-core to standardize amongst drivers */ drivers/staging/omapdrm/omap_plane.c +19
-1@@ -433,6 +433,15 @@ void omap_plane_install_properties(struct drm_plane *plane, priv->rotation_prop = prop; }drm_object_attach_property (obj, prop,0 ); + + prop = priv->zorder_prop; +if (!prop) { + prop =drm_property_create_range (dev,0 ,"zorder" ,0 ,3 ); +if (prop ==NULL ) +return ; + priv->zorder_prop = prop; + } +drm_object_attach_property (obj, prop,0 ); } int omap_plane_set_property(struct drm_plane *plane,@@ -452,6 +461,16 @@ int omap_plane_set_property(struct drm_plane *plane, ret =omap_plane_dpms (plane,DRM_MODE_DPMS_ON ); else ret =0 ; + }else if (property == priv->zorder_prop) { +struct omap_overlay *ovl = omap_plane->ovl; + +DBG ("%s: zorder: %d" , ovl->name, (uint32_t )val); + omap_plane->info.zorder = val; + +if (ovl->is_enabled (ovl)) + ret =omap_plane_dpms (plane,DRM_MODE_DPMS_ON ); +else + ret =0 ; }return ret; --1.7.9.5