summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bochs
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-07-03 09:58:34 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-07-09 10:25:31 +0200
commitf1f8555dfb9a70a2f42e7ee578143dcfd5abb02b (patch)
tree0953083246e6a20b32643ba266cecfd4b06667f3 /drivers/gpu/drm/bochs
parent8a99de3dc0dd417e1f46c8e27e63b1363ecfb969 (diff)
downloadlinux-f1f8555dfb9a70a2f42e7ee578143dcfd5abb02b.tar.gz
linux-f1f8555dfb9a70a2f42e7ee578143dcfd5abb02b.tar.bz2
linux-f1f8555dfb9a70a2f42e7ee578143dcfd5abb02b.zip
drm/bochs: Use shadow buffer for bochs framebuffer console
The bochs driver (and virtual hardware) requires buffer objects to reside in video ram to display them to the screen. So it can not display the framebuffer console because the respective buffer object is permanently pinned in system memory. Using a shadow buffer for the console solves this problem. The console emulation will pin the buffer object only during updates from the shadow buffer. Otherwise, the bochs driver can freely relocated the buffer between system memory and video ram. v2: * select shadow FB via struct drm_mode_config.prefer_shadow_fbdev Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/315833/
Diffstat (limited to 'drivers/gpu/drm/bochs')
-rw-r--r--drivers/gpu/drm/bochs/bochs_kms.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index 5904eddc83a5..2a06fea0039b 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -190,6 +190,7 @@ int bochs_kms_init(struct bochs_device *bochs)
bochs->dev->mode_config.fb_base = bochs->fb_base;
bochs->dev->mode_config.preferred_depth = 24;
bochs->dev->mode_config.prefer_shadow = 0;
+ bochs->dev->mode_config.prefer_shadow_fbdev = 1;
bochs->dev->mode_config.quirk_addfb_prefer_host_byte_order = true;
bochs->dev->mode_config.funcs = &bochs_mode_funcs;