[PATCH v2 02/20] drm: Don't update plane properties for atomic planes if it stays the same

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows the first atomic call during hw init to be a real modeset,
which is useful for forcing a recalculation.

Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/drm_fb_helper.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index cac422916c7a..33b5e4ecaf46 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -322,10 +322,12 @@ 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) {
-		if (plane->type != DRM_PLANE_TYPE_PRIMARY)
+		if (plane->type != DRM_PLANE_TYPE_PRIMARY &&
+		    (!plane->state || plane->state->fb))
 			drm_plane_force_disable(plane);
 
-		if (dev->mode_config.rotation_property) {
+		if (dev->mode_config.rotation_property &&
+		    (!plane->state || plane->state->rotation != BIT(DRM_ROTATE_0))) {
 			drm_mode_plane_set_obj_prop(plane,
 						    dev->mode_config.rotation_property,
 						    BIT(DRM_ROTATE_0));
-- 
2.1.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux