drm/msm/mdp5: Set rotation property initial value to DRM_ROTATE_0 insted of 0
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 22 Jul 2016 13:43:09 +0000 (16:43 +0300)
committerRob Clark <robdclark@gmail.com>
Thu, 15 Sep 2016 21:21:12 +0000 (17:21 -0400)
0 isn't a valid rotation property value, so let's set the initial value
of the property to DRM_ROTATE_0 instead.

In the same vein, we must always have at leat one angle as part of set
of supported rotation bits, so let's include DRM_ROTATE_0 in there.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Jilai Wang <jilaiw@codeaurora.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c

index ba8f432..951c002 100644 (file)
@@ -78,12 +78,12 @@ static void mdp5_plane_install_rotation_property(struct drm_device *dev,
        if (!dev->mode_config.rotation_property)
                dev->mode_config.rotation_property =
                        drm_mode_create_rotation_property(dev,
-                       DRM_REFLECT_X | DRM_REFLECT_Y);
+                               DRM_ROTATE_0 | DRM_REFLECT_X | DRM_REFLECT_Y);
 
        if (dev->mode_config.rotation_property)
                drm_object_attach_property(&plane->base,
                        dev->mode_config.rotation_property,
-                       0);
+                       DRM_ROTATE_0);
 }
 
 /* helper to install properties which are common to planes and crtcs */