drm/bochs: disable video before changing video mode
authorChris Ruffin <chris.ruffin@intel.com>
Tue, 24 Mar 2015 20:57:42 +0000 (16:57 -0400)
committerDave Airlie <airlied@redhat.com>
Tue, 31 Mar 2015 22:28:15 +0000 (08:28 +1000)
qemu and simics simulators both seem to expect that video should be disabled
before changing the video mode.

references:
http://git.qemu.org/?p=qemu.git;a=blob;f=hw/display/vga.c;h=c0f7b343bbab586c8593d29c7a765f1e6ca3662c;hb=HEAD#l727
http://wiki.osdev.org/Bochs_VBE_Extensions#Setting_display_resolution_and_bit_depth

Signed-off-by: Chris Ruffin <chris.ruffin@intel.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/bochs/bochs_hw.c

index 460389702d31cdca34a56b9e20c93f6ad4ad6f05..a39b0343c197dc8a6aea00aa244b80dae1fde232 100644 (file)
@@ -164,6 +164,7 @@ void bochs_hw_setmode(struct bochs_device *bochs,
 
        bochs_vga_writeb(bochs, 0x3c0, 0x20); /* unblank */
 
+       bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE,      0);
        bochs_dispi_write(bochs, VBE_DISPI_INDEX_BPP,         bochs->bpp);
        bochs_dispi_write(bochs, VBE_DISPI_INDEX_XRES,        bochs->xres);
        bochs_dispi_write(bochs, VBE_DISPI_INDEX_YRES,        bochs->yres);