drm: Resetting rotation property
authorSonika Jindal <sonika.jindal@intel.com>
Tue, 5 Aug 2014 05:56:57 +0000 (11:26 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 Aug 2014 15:43:53 +0000 (17:43 +0200)
Reset rotation property to 0.

v2: Resetting after disabling the plane

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_helper.c

index 3144db9dc0f1f0bf3b0ea7ca8d42665fb47a37f6..d139eddb3d618dc4bff8ed62960400635f935977 100644 (file)
@@ -345,10 +345,17 @@ static bool restore_fbdev_mode(struct drm_fb_helper *fb_helper)
 
        drm_warn_on_modeset_not_all_locked(dev);
 
-       list_for_each_entry(plane, &dev->mode_config.plane_list, head)
+       list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
                if (plane->type != DRM_PLANE_TYPE_PRIMARY)
                        drm_plane_force_disable(plane);
 
+               if (dev->mode_config.rotation_property) {
+                       drm_object_property_set_value(&plane->base,
+                                       dev->mode_config.rotation_property,
+                                       BIT(DRM_ROTATE_0));
+               }
+       }
+
        for (i = 0; i < fb_helper->crtc_count; i++) {
                struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;
                struct drm_crtc *crtc = mode_set->crtc;