]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/fbdev: Make skip_vt_switch the default
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Nov 2018 17:34:24 +0000 (18:34 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 26 Mar 2019 15:24:26 +0000 (16:24 +0100)
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 as soon as
you turn off fbcon because "suspend/resume worked when I tested it".

v2: Keep this for radeon because of

commit 18c437caa5b18a235dd65cec224eab54bebcee65
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Tue Nov 14 17:19:29 2017 -0500

    Revert "drm/radeon: dont switch vt on suspend"

Thanks to Michel Dänzer for pointing this one out.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Michel Dänzer <michel@daenzer.net>
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
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Samuel Li <samuel.li@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181127173424.301-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/i915/intel_fbdev.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/radeon/radeon_fb.c
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c

index 5cbde74b97dd183271293ff9c0fda45f283f6d39..24890d8f9ee4db2bec79c97a6d55f0c8ae807586 100644 (file)
@@ -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);
index 04d23cb430bf0bb8dffa03ea5fb0916f1a37c27e..d703487dfcf27a7f009aa9adafc45c32b1827131 100644 (file)
@@ -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;
 
index e8f694b57b8ac857528824051ddcc42016e86239..f9ab94b99a3c36aa80fd487f6366ea8930596da6 100644 (file)
@@ -259,9 +259,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);
 
index 0d3cd4e057285567204f5be268cc1f578b4e4162..9d6dba07c727e053ae49f9e1e645889f5f7bf363 100644 (file)
@@ -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;
 
index 1179034024aeafb81ea5f1b9fc911f1bf845c8d0..d50bff20f7de467f8de83b5388db1f5fc15ef73a 100644 (file)
@@ -244,6 +244,9 @@ static int radeonfb_create(struct drm_fb_helper *helper,
                goto out;
        }
 
+       /* radeon resume is fragile and needs a vt switch to help it along */
+       info->skip_vt_switch = false;
+
        info->par = rfbdev;
 
        ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->fb, &mode_cmd, gobj);
index 8ce68bd508bed9aba495c2d523b4b08169db272a..0cbcef88d4d7747abd4b6c915810d7a52f71c64d 100644 (file)
@@ -110,8 +110,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: