fix widescreen resolution issues
PATCH 1/1 fix widescreen resolution issues
hi,
the attached patch fixes the issues with widescreen resolutions for me when using -std-vga.
in vgabios/vbetables-gen.c I changed the video memory from 8MB to 16MB which is sufficient for resolutions up to 2560x1600. I've also added some more video modes (up to 2560x1600) with 16, 24, 32bit color depth each and I've removed the duplicate for the 1280x960 mode.
in qemu/hw/vga_int.h I've adapted the maximum resolution accordingly.
you can download the updated vgabios from http://www.wina.at/vgabios.bin
I would appreciate any suggestions, comments and of course testing.
@Arne Brutschy: could you please test the 1920x1200 resolution with your setup?
cheers,
Andi
vgabios/vbetables-gen.c +22 -13
@@ -2,7 +2,7 @@#include <stdlib.h> #include <stdio.h> -#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 8 +#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 16 typedef struct { int width;
@@ -55,18 +55,27 @@ { 1152, 864, 16 , 0x14a}, { 1152, 864, 24 , 0x14b}, { 1152, 864, 32 , 0x14c}, -{ 1280, 800, 24 , 0x178}, -{ 1280, 800, 32 , 0x179}, -{ 1280, 960, 24 , 0x180}, -{ 1280, 960, 32 , 0x181}, -{ 1280, 960, 24 , 0x182}, -{ 1280, 960, 32 , 0x183}, -{ 1440, 900, 24 , 0x184}, -{ 1440, 900, 32 , 0x185}, -{ 1400, 1050, 24 , 0x186}, -{ 1400, 1050, 32 , 0x187}, -{ 1680, 1050, 24 , 0x188}, -{ 1680, 1050, 32 , 0x189}, +{ 1280, 800, 16 , 0x178}, +{ 1280, 800, 24 , 0x179}, +{ 1280, 800, 32 , 0x17a}, +{ 1280, 960, 16 , 0x17b}, +{ 1280, 960, 24 , 0x17c}, +{ 1280, 960, 32 , 0x17d}, +{ 1440, 900, 16 , 0x17e}, +{ 1440, 900, 24 , 0x17f}, +{ 1440, 900, 32 , 0x180}, +{ 1400, 1050, 16 , 0x181}, +{ 1400, 1050, 24 , 0x182}, +{ 1400, 1050, 32 , 0x183}, +{ 1680, 1050, 16 , 0x184}, +{ 1680, 1050, 24 , 0x185}, +{ 1680, 1050, 32 , 0x186}, +{ 1920, 1200, 16 , 0x187}, +{ 1920, 1200, 24 , 0x188}, +{ 1920, 1200, 32 , 0x189}, +{ 2560, 1600, 16 , 0x18a}, +{ 2560, 1600, 24 , 0x18b}, +{ 2560, 1600, 32 , 0x18c}, { 0, }, };
qemu/hw/vga_int.h +2 -2
@@ -30,8 +30,8 @@/* bochs VBE support */ #define CONFIG_BOCHS_VBE -#define VBE_DISPI_MAX_XRES 1600 -#define VBE_DISPI_MAX_YRES 1200 +#define VBE_DISPI_MAX_XRES 2560 +#define VBE_DISPI_MAX_YRES 1600#define VBE_DISPI_MAX_BPP 32#define VBE_DISPI_INDEX_ID 0x0
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
Quoted 10 lines · Andreas Winkelbauer
hi,
the attached patch fixes the issues with widescreen resolutions for me when using -std-vga.
in
vgabios/vbetables-gen.cI changed the video memory from 8MB to 16MB which is sufficient for resolutions up to 2560x1600. I've also added some more video modes (up to 2560x1600) with 16, 24, 32bit color depth each and I've removed the duplicate for the 1280x960 mode.
Quoted 8 lines
in
qemu/hw/vga_int.hI've adapted the maximum resolution accordingly.you can download the updated vgabios from http://www.wina.at/vgabios.bin
I would appreciate any suggestions, comments and of course testing.
@Arne Brutschy: could you please test the 1920x1200 resolution with your setup?
What about VGA_RAM_SIZE in qemu/hw/pc.h?
Signature · 7 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 1 line · Avi Kivity
What about
VGA_RAM_SIZEinqemu/hw/pc.h?
Quoted 1 line · Izik Eidus
there is a DEFINE name
VGA_RAM_SIZEor something like that
D'oh. Must have missed it. :\ Thanks! Unfortunately, it still does not work. Qemu crashes now as windows switches to graphics mode. Safe mode does not work either..
Arne
Signature · 12 lines
Arne Brutschy Ph.D. Student Email arne.brutschy(AT)ulb.ac.be IRIDIA CP 194/6 Web iridia.ulb.ac.be/~abrutschy Universite' Libre de Bruxelles Tel +32 2 650 2729 Avenue Franklin Roosevelt 50 Fax +32 2 650 2715 1050 Bruxelles, Belgium (Tel and Fax both IRIDIA secretary) ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
hi,
Quoted 3 lines
D'oh. Must have missed it. :\ Thanks! Unfortunately, it still does not work. Qemu crashes now as windows switches to graphics mode. Safe mode does not work either..
For now I'd suggest trying the following:
* download the latest qemu cvs snapshot
Quoted 1 line
cvs -z3 -d:pserver:[email protected]:/sources/qemu co
qemu
Quoted 1 line
cd qemu
* apply the patch for hw/vga_int.h and change VGA_RAM_SIZE in hw/pc.h to 16 * 1024 * 1024 (16MB)
* configure, make and install qemu
Quoted 1 line
./configure --prefix=/usr/local/qemu-cvs && make (use whatever prefix
you like)
# make install (as root)
* download, configure, make and install kqemu (optional, but highly suggested)
Quoted 4 lines
wget http://fabrice.bellard.free.fr/qemu/kqemu-1.3.0pre11.tar.gz
tar -xzf kqemu-1.3.0pre11.tar.gz
cd kqemu-1.3.0pre11
./configure && make
# make install (as root)
* copy the modified vgabios.bin to the qemu dir
Quoted 1 line
# cp vgabios.bin /usr/local/qemu-cvs/share/qemu (as root; change to target path according to the prefix you used above)
* start your vm image as usual, but use /usr/local/qemu-cvs/bin/qemu instead of qemu/kvm.
if kqemu does not work, reading the documentation
http://fabrice.bellard.free.fr/qemu/kqemu-doc.html
might help.
Please test it that way. If it works, it should be possible to make it working with kvm as well.
cheers,
Andi
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
hi,
Quoted 4 lines
* copy the modified vgabios.bin to the qemu dir
Quoted 1 line
# cp vgabios.bin /usr/local/qemu-cvs/share/qemu (as root; change to target path according to the prefix you used above)
I'm guess I've uploaded to wrong vgabios.bin, so if you don't want to compile it yourself and don't have those high resolution modes available, then you can get the vgabios.bin file from
http://www.wina.at/vgabios.bin
resolutions up to 2560x1600 should be available (although they do not neccessarily work).
cheers,
Andi
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
hi,
Quoted 1 line
What about
VGA_RAM_SIZEinqemu/hw/pc.h?
I already tried changing the VGA_RAM_SIZE value in pc.h to 16 * 1024 * 1024 (16MB), but then kvm crashes when the guest os switches to graphics mode.
Changing VGA_RAM_SIZE in pc.h to 16MB works when I use the latest cvs snapshot of qemu (didn't test it with qemu-0.9.1 release version).
Unfortunately I am not experienced in debugging kvm or qemu, so I hope someone can find out what's going on in this case.
cheers,
Andi
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Hi,
Quoted 3 lines · Andreas Winkelbauer
the attached patch fixes the issues with widescreen resolutions for me when using -std-vga.
I would appreciate any suggestions, comments and of course testing.
Thanks for the patch, Andreas! You found the "magic limitation" to 1600x1200...
Quoted 2 lines
@Arne Brutschy: could you please test the 1920x1200 resolution with your setup?
I did, it does not work. :( I can select the video mode, but upon activation qemu crashes. I think the video memory overwrites system memory because qemu does not allocate the increased vmem properly. So every mode under 8MB of video ram does work, all others do not.
1680x1050x32 => works (7056000 bytes)
1920x1200x24 => works (6912000 bytes)
1920x1200x32 => crashes (9216000 bytes)
I haven't found the piece of code that's responsible for vmem allocation yet. Does somebody know where this is done? Is there somebody from qemu reading this?
Arne
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 16 lines · Arne Brutschy
Hi,
Quoted 3 lines · Andreas Winkelbauer
the attached patch fixes the issues with widescreen resolutions for me when using -std-vga.
I would appreciate any suggestions, comments and of course testing.Thanks for the patch, Andreas! You found the "magic limitation" to 1600x1200...
Quoted 2 lines
@Arne Brutschy: could you please test the 1920x1200 resolution with your setup?
I did, it does not work. :( I can select the video mode, but upon activation qemu crashes. I think the video memory overwrites system memory because qemu does not allocate the increased vmem properly. So every mode under 8MB of video ram does work, all others do not.
Quoted 7 lines
1680x1050x32 => works (7056000 bytes)
1920x1200x24 => works (6912000 bytes)
1920x1200x32 => crashes (9216000 bytes)I haven't found the piece of code that's responsible for vmem allocation yet. Does somebody know where this is done? Is there somebody from qemu reading this?
there is a DEFINE name VGA_RAM_SIZE or something like that
Quoted 4 lines
Arne
Quoted 8 lines
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/