@@ -508,11 +508,11 @@ EXPORT_SYMBOL(drm_fb_helper_init);
*/
struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper)
{
- struct device *dev = fb_helper->dev->dev;
+ struct drm_device *dev = fb_helper->dev;
struct fb_info *info;
int ret;
- info = framebuffer_alloc(0, dev);
+ info = framebuffer_alloc(0, dev->dev);
if (!info)
return ERR_PTR(-ENOMEM);
@@ -535,7 +535,9 @@ struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper)
}
fb_helper->fbdev = info;
- info->skip_vt_switch = true;
+
+ if (!dev->mode_config.require_vt_switch_fbdev)
+ info->skip_vt_switch = true;
return info;
@@ -877,6 +877,13 @@ struct drm_mode_config {
*/
bool prefer_shadow_fbdev;
+ /**
+ * @require_vt_switch_fbdev:
+ *
+ * Hint to framebuffer emulation to enable VT switching on suspend/resume.
+ */
+ bool require_vt_switch_fbdev;
+
/**
* @quirk_addfb_prefer_xbgr_30bpp:
*
Switching VTs during suspend/resume is required to reliably run radeon with generic fbdev emulation. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> --- drivers/gpu/drm/drm_fb_helper.c | 8 +++++--- include/drm/drm_mode_config.h | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-)