Skip to contentSkip to conversation

add support for higher screen resolutions

PATCH In review Andreas Winkelbauer 4 participants 6 messages Sep 17, 2008 – Sep 22, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add support for higher screen resolutions

This patch introduces changes which are necessary for using qemu with higher screen resolutions than 1600x1200 (with -std-vga).

In addition to this patch, the vgabios needs to be regenerated to support higher resolutions too. A corresponding patch for the vgabios has been submitted to Volker Ruppert.

kvm carries this patch since kvm-62 (commit
aaf6c43f811309b3f0546dd74b2543af2fad7f02).

---

Since I do not know how you usually generate the vgabios I will send the
patch for it also to the qemu list. I hope Volker Ruppert will pick up
the patch, so that one could use the upstream version of vgabios directly.

bye,
Andi

hw/pc.h +2 -2
diff -uNrp trunk.orig/hw/pc.h trunk/hw/pc.h
@@ -110,9 +110,9 @@ int piix4_init(PCIBus *bus, int devfn);
 /* vga.c */
 
 #ifndef TARGET_SPARC
-#define VGA_RAM_SIZE (8192 * 1024)
+#define VGA_RAM_SIZE (16 * 1024 * 1024)
 #else
-#define VGA_RAM_SIZE (9 * 1024 * 1024)
+#define VGA_RAM_SIZE (17 * 1024 * 1024)
 #endif
 
 int isa_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
hw/vga_int.h +2 -2
diff -uNrp trunk.orig/hw/vga_int.h trunk/hw/vga_int.h
@@ -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
#1 lore raw
Quoted 6 lines · Andreas Winkelbauer

This patch introduces changes which are necessary for using qemu with higher screen resolutions than 1600x1200 (with -std-vga).

In addition to this patch, the vgabios needs to be regenerated to support higher resolutions too. A corresponding patch for the vgabios has been submitted to Volker Ruppert.

Speaking of resolutions, it would be quite nice to support EDID (information from a monitor about its capabilities) and monitor hotplug emulation. In particular, that would make it possible to run QEMU in full-screen mode on any screen size, without borders or scaling. There is a VGA BIOS call to get EDID info, although I'm not sure if it supports monitor hotplug, or which guests use it. Any thoughts on that?

-- Jamie

#2 lore raw
In reply to Andreas Winkelbauer

hw/pc.h int piix4_init(PCIBus *bus, int devfn); · line 114

Quoted 6 lines · Andreas Winkelbauer, le Wed 17 Sep 2008 18:50:24 +0200, a écrit :

/* vga.c */

#ifndef TARGET_SPARC

hw/pc.h +1 -1
-#define VGA_RAM_SIZE (8192 * 1024)
+#define VGA_RAM_SIZE (16 * 1024 * 1024)
 #else

Mmm, did you check that save/restore works between before and after the change?

Samuel

#3 lore raw
Quoted 10 lines · Samuel Thibault <samuel.thibault <at> ens-lyon.org> writes:

hw/pc.h int piix4_init(PCIBus *bus, int devfn); · line 114

Quoted 6 lines · Andreas Winkelbauer, le Wed 17 Sep 2008 18:50:24 +0200, a écrit :

/* vga.c */

#ifndef TARGET_SPARC

hw/pc.h +1 -1
-#define VGA_RAM_SIZE (8192 * 1024)
+#define VGA_RAM_SIZE (16 * 1024 * 1024)
 #else

Mmm, did you check that save/restore works between before and after the change?

No I did not check this, because I usually don't use save/restore.

Are there some problems due to this change? If so, have you also increased the vga memory in vgabios to 16MB?

I would be very surprised if this change breaks save/restore, since kvm uses this patch for quite a long time now and there were no complaints about save/restore not working.

bye,
andi

#4 lore raw
Quoted 12 lines · Andreas Winkelbauer, le Thu 18 Sep 2008 01:17:20 +0000, a écrit :
Quoted 10 lines · Samuel Thibault <samuel.thibault <at> ens-lyon.org> writes:

hw/pc.h int piix4_init(PCIBus *bus, int devfn); · line 114

Quoted 6 lines · Andreas Winkelbauer, le Wed 17 Sep 2008 18:50:24 +0200, a écrit :

/* vga.c */

#ifndef TARGET_SPARC

hw/pc.h +1 -1
-#define VGA_RAM_SIZE (8192 * 1024)
+#define VGA_RAM_SIZE (16 * 1024 * 1024)
 #else

Mmm, did you check that save/restore works between before and after the change?

Quoted 1 line

Are there some problems due to this change?

I haven't tested myself with plain qemu, but with xen ioemu I had troubles when I tried to change the video memory size.

Quoted 3 lines

I would be very surprised if this change breaks save/restore, since kvm uses this patch for quite a long time now and there were no complaints about save/restore not working.

Including on upgrade?

Samuel

#5 lore raw
Quoted 16 lines · Samuel Thibault
Quoted 14 lines · Andreas Winkelbauer, le Thu 18 Sep 2008 01:17:20 +0000, a écrit :
Quoted 12 lines · Samuel Thibault <samuel.thibault <at> ens-lyon.org> writes:

hw/pc.h int piix4_init(PCIBus *bus, int devfn); · line 114

Quoted 7 lines · Andreas Winkelbauer, le Wed 17 Sep 2008 18:50:24 +0200, a écrit :

/* vga.c */

#ifndef TARGET_SPARC

hw/pc.h +1 -1
-#define VGA_RAM_SIZE (8192 * 1024)
+#define VGA_RAM_SIZE (16 * 1024 * 1024)
 #else

Mmm, did you check that save/restore works between before and after the change?

Quoted 11 lines
Quoted 2 lines

Are there some problems due to this change?

I haven't tested myself with plain qemu, but with xen ioemu I had troubles when I tried to change the video memory size.

Quoted 4 lines

I would be very surprised if this change breaks save/restore, since kvm uses this patch for quite a long time now and there were no complaints about save/restore not working.

The problem is that a patch like this will break save/restore across different versions of QEMU. The fact that this isn't easily detected is a problem that would be nice to fix.

Has vgabios cut a release with the patch required for this? Does the KVM version of vgabios contain any other patches?

Regards,

Anthony Liguori

Quoted 6 lines

Including on upgrade?

Samuel