drm/omap: Set rotation property initial value to BIT(DRM_ROTATE_0) insted of 0
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 26 Sep 2016 16:30:51 +0000 (19:30 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 21 Oct 2016 16:24:42 +0000 (18:24 +0200)
0 isn't a valid rotation property value, so let's set the initial value
of the property to BIT(DRM_ROTATE_0) instead.

v2: Drop the BIT()

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474907460-10717-7-git-send-email-ville.syrjala@linux.intel.com
drivers/gpu/drm/omapdrm/omap_drv.c
drivers/gpu/drm/omapdrm/omap_plane.c

index 1735c7accf727bfd9bd6cbc8c1710b081ae8864b..31ec5d0a95768b54f3aed4ad901ad4b301ef2fcd 100644 (file)
@@ -762,12 +762,14 @@ static void dev_lastclose(struct drm_device *dev)
                 */
                for (i = 0; i < priv->num_crtcs; i++) {
                        drm_object_property_set_value(&priv->crtcs[i]->base,
-                                       dev->mode_config.rotation_property, 0);
+                                       dev->mode_config.rotation_property,
+                                       DRM_ROTATE_0);
                }
 
                for (i = 0; i < priv->num_planes; i++) {
                        drm_object_property_set_value(&priv->planes[i]->base,
-                                       dev->mode_config.rotation_property, 0);
+                                       dev->mode_config.rotation_property,
+                                       DRM_ROTATE_0);
                }
        }
 
index 1549e83930561805adbbaa94a19f684ae602e53b..6ddaa5ea4b6bd46d37e3786d1197c9b878b5d9a2 100644 (file)
@@ -213,7 +213,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
        if (priv->has_dmm) {
                struct drm_property *prop = dev->mode_config.rotation_property;
 
-               drm_object_attach_property(obj, prop, 0);
+               drm_object_attach_property(obj, prop, DRM_ROTATE_0);
        }
 
        drm_object_attach_property(obj, priv->zorder_prop, 0);