summaryrefslogtreecommitdiffstats
path: root/drivers/staging/omapdrm/omap_drv.c
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2012-10-25 17:14:13 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-30 11:06:59 -0700
commitc2a6a5528f3144cf42b8b4d0655106f573f71fae (patch)
tree73cfc2689a83f825075086b9526855965e48652c /drivers/staging/omapdrm/omap_drv.c
parent750af5e568d060ec6994cdcb4e86cdddfcd473c0 (diff)
downloadlinux-stable-c2a6a5528f3144cf42b8b4d0655106f573f71fae.tar.gz
linux-stable-c2a6a5528f3144cf42b8b4d0655106f573f71fae.tar.bz2
linux-stable-c2a6a5528f3144cf42b8b4d0655106f573f71fae.zip
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: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/omapdrm/omap_drv.c')
-rw-r--r--drivers/staging/omapdrm/omap_drv.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
index ebdb0b676737..053c45dbcc89 100644
--- a/drivers/staging/omapdrm/omap_drv.c
+++ b/drivers/staging/omapdrm/omap_drv.c
@@ -659,19 +659,22 @@ 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?
- */
- for (i = 0; i < priv->num_crtcs; i++) {
- drm_object_property_set_value(&priv->crtcs[i]->base,
- priv->rotation_prop, 0);
- }
+ 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,
+ priv->rotation_prop, 0);
+ }
- for (i = 0; i < priv->num_planes; i++) {
- drm_object_property_set_value(&priv->planes[i]->base,
- priv->rotation_prop, 0);
+ for (i = 0; i < priv->num_planes; i++) {
+ drm_object_property_set_value(&priv->planes[i]->base,
+ priv->rotation_prop, 0);
+ }
}
ret = drm_fb_helper_restore_fbdev_mode(priv->fbdev);