All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/fbdev: Make skip_vt_switch the default
@ 2018-11-27 17:09 ` Daniel Vetter
  0 siblings, 0 replies; 20+ messages in thread
From: Daniel Vetter @ 2018-11-27 17:09 UTC (permalink / raw)
  To: Intel Graphics Development
  Cc: Heiko Stübner, Maxime Ripard, Daniel Vetter,
	DRI Development, Huang Rui, Daniel Vetter, linux-rockchip,
	David Airlie, Ben Skeggs, nouveau, Daniel Stone, Rodrigo Vivi,
	Junwei Zhang, linux-arm-kernel, Michel Dänzer, Sandy Huang,
	Samuel Li, Shirish S, Noralf Trønnes, Alex Deucher,
	Christian König

KMS drivers really should all be able to restore their display state
on resume without fbcon helping out. So make this the default.

Since I'm not entirely foolish, make it only a default, which drivers
can still override. That way when the inevitable regression report
happens I can fix things up with a one-liner plus FIXME comment that
someone should fix up the suspend/resume code in that driver.

But at least all new drivers won't be broken by accident because
"suspend/resume worked when I tested it" as soon as you turn off
fbcon.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Samuel Li <Samuel.Li@amd.com>
Cc: "Michel Dänzer" <michel.daenzer@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Shirish S <shirish.s@amd.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: intel-gfx@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        | 1 -
 drivers/gpu/drm/drm_fb_helper.c               | 1 +
 drivers/gpu/drm/i915/intel_fbdev.c            | 3 ---
 drivers/gpu/drm/nouveau/nouveau_fbcon.c       | 1 -
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 --
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 5cbde74b97dd..24890d8f9ee4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -234,7 +234,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
 	}
 
 	info->par = rfbdev;
-	info->skip_vt_switch = true;
 
 	ret = amdgpu_display_framebuffer_init(adev->ddev, &rfbdev->rfb,
 					      &mode_cmd, gobj);
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 5e9ca6f96379..41f37704e0a3 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -934,6 +934,7 @@ struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper)
 	}
 
 	fb_helper->fbdev = info;
+	info->skip_vt_switch = true;
 
 	return info;
 
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 2480c7d6edee..d6f8d4bbc9fc 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -257,9 +257,6 @@ static int intelfb_create(struct drm_fb_helper *helper,
 	info->screen_base = vaddr;
 	info->screen_size = vma->node.size;
 
-	/* This driver doesn't need a VT switch to restore the mode on resume */
-	info->skip_vt_switch = true;
-
 	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
 	drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height);
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 032317c81bf0..67572408d9ae 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -365,7 +365,6 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
 		ret = PTR_ERR(info);
 		goto out_unlock;
 	}
-	info->skip_vt_switch = 1;
 
 	info->par = fbcon;
 
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
index e6650553f5d6..361604e51361 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
@@ -111,8 +111,6 @@ static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper,
 		      rk_obj->kvaddr,
 		      offset, size);
 
-	fbi->skip_vt_switch = true;
-
 	return 0;
 
 out:
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-03-26 15:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 17:09 [PATCH] drm/fbdev: Make skip_vt_switch the default Daniel Vetter
2018-11-27 17:09 ` Daniel Vetter
2018-11-27 17:24 ` Michel Dänzer
2018-11-27 17:34 ` Daniel Vetter
2018-11-27 17:34   ` Daniel Vetter
2018-11-28  7:17   ` Maarten Lankhorst
2018-11-28  7:17     ` Maarten Lankhorst
2018-11-28  8:20     ` Daniel Vetter
2018-11-28  8:20       ` Daniel Vetter
2018-11-28 16:00       ` Li, Samuel
2018-11-28 16:00         ` Li, Samuel
2019-03-26 15:25     ` Daniel Vetter
2019-03-26 15:25       ` Daniel Vetter
     [not found]   ` <20181127173424.301-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2018-11-28 15:12     ` Heiko Stübner
2018-11-28 15:12       ` Heiko Stübner
2018-11-27 18:08 ` ✗ Fi.CI.CHECKPATCH: warning for drm/fbdev: Make skip_vt_switch the default (rev2) Patchwork
2018-11-27 18:25 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-11-30 16:18 ` ✗ Fi.CI.CHECKPATCH: warning for drm/fbdev: Make skip_vt_switch the default (rev3) Patchwork
2018-11-30 16:35 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-01 10:55 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.