Commit c2a6a552 authored by Rob Clark's avatar Rob Clark Committed by Greg Kroah-Hartman

staging: drm/omap: only advertise rotation prop if supported

For hardware that does not have DMM/TILER, there is no rotation,
so no point in getting userspace's hopes up.
Signed-off-by: default avatarRob Clark <rob@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 750af5e5
......@@ -659,10 +659,12 @@ static void dev_lastclose(struct drm_device *dev)
DBG("lastclose: dev=%p", dev);
/* need to restore default rotation state.. not sure if there is
* a cleaner way to restore properties to default state? Maybe
* a flag that properties should automatically be restored to
* default state on lastclose?
if (priv->rotation_prop) {
/* need to restore default rotation state.. not sure
* if there is a cleaner way to restore properties to
* default state? Maybe a flag that properties should
* automatically be restored to default state on
* lastclose?
*/
for (i = 0; i < priv->num_crtcs; i++) {
drm_object_property_set_value(&priv->crtcs[i]->base,
......@@ -673,6 +675,7 @@ static void dev_lastclose(struct drm_device *dev)
drm_object_property_set_value(&priv->planes[i]->base,
priv->rotation_prop, 0);
}
}
ret = drm_fb_helper_restore_fbdev_mode(priv->fbdev);
if (ret)
......
......@@ -416,6 +416,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
struct omap_drm_private *priv = dev->dev_private;
struct drm_property *prop;
if (priv->has_dmm) {
prop = priv->rotation_prop;
if (!prop) {
const struct drm_prop_enum_list props[] = {
......@@ -433,6 +434,7 @@ 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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment