From: Chris Ruffin Date: Tue, 24 Mar 2015 20:57:42 +0000 (-0400) Subject: drm/bochs: disable video before changing video mode X-Git-Tag: firefly_0821_release~176^2~1915^2~18 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=564b687b031ccc647943f946b93037cf0780612a;p=firefly-linux-kernel-4.4.55.git drm/bochs: disable video before changing video mode 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 Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c index 460389702d31..a39b0343c197 100644 --- a/drivers/gpu/drm/bochs/bochs_hw.c +++ b/drivers/gpu/drm/bochs/bochs_hw.c @@ -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);