From: Vitaly Chipounov vitaly@cyberhaven.com
This requires at least 32MB of video memory.
Tested with Windows 10's default display driver and virtio-vga.
Signed-off-by: Vitaly Chipounov vitaly@cyberhaven.com --- vgasrc/bochsvga.h | 4 ++-- vgasrc/svgamodes.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/vgasrc/bochsvga.h b/vgasrc/bochsvga.h index ae5f75d..f08219f 100644 --- a/vgasrc/bochsvga.h +++ b/vgasrc/bochsvga.h @@ -6,8 +6,8 @@ #define VBE_DISPI_BANK_ADDRESS 0xA0000 #define VBE_DISPI_BANK_SIZE_KB 64
-#define VBE_DISPI_MAX_XRES 2560 -#define VBE_DISPI_MAX_YRES 1600 +#define VBE_DISPI_MAX_XRES 3840 +#define VBE_DISPI_MAX_YRES 2160
#define VBE_DISPI_IOPORT_INDEX 0x01CE #define VBE_DISPI_IOPORT_DATA 0x01CF diff --git a/vgasrc/svgamodes.c b/vgasrc/svgamodes.c index 6e494c7..63ef040 100644 --- a/vgasrc/svgamodes.c +++ b/vgasrc/svgamodes.c @@ -92,5 +92,6 @@ struct generic_svga_mode svga_modes[] VAR16 = { { 0x196, { MM_DIRECT, 2560, 1440, 16, 8, 16, SEG_GRAPH } }, { 0x197, { MM_DIRECT, 2560, 1440, 24, 8, 16, SEG_GRAPH } }, { 0x198, { MM_DIRECT, 2560, 1440, 32, 8, 16, SEG_GRAPH } }, + { 0x199, { MM_DIRECT, 3840, 2160, 32, 8, 16, SEG_GRAPH } }, }; unsigned int svga_mcount VAR16 = ARRAY_SIZE(svga_modes);
On Sun, Mar 14, 2021 at 01:48:07PM +0100, vitaly@cyberhaven.com wrote:
From: Vitaly Chipounov vitaly@cyberhaven.com
This requires at least 32MB of video memory.
Tested with Windows 10's default display driver and virtio-vga.
Signed-off-by: Vitaly Chipounov vitaly@cyberhaven.com
vgasrc/bochsvga.h | 4 ++-- vgasrc/svgamodes.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/vgasrc/bochsvga.h b/vgasrc/bochsvga.h index ae5f75d..f08219f 100644 --- a/vgasrc/bochsvga.h +++ b/vgasrc/bochsvga.h @@ -6,8 +6,8 @@ #define VBE_DISPI_BANK_ADDRESS 0xA0000 #define VBE_DISPI_BANK_SIZE_KB 64
-#define VBE_DISPI_MAX_XRES 2560 -#define VBE_DISPI_MAX_YRES 1600 +#define VBE_DISPI_MAX_XRES 3840 +#define VBE_DISPI_MAX_YRES 2160
#define VBE_DISPI_IOPORT_INDEX 0x01CE #define VBE_DISPI_IOPORT_DATA 0x01CF diff --git a/vgasrc/svgamodes.c b/vgasrc/svgamodes.c index 6e494c7..63ef040 100644 --- a/vgasrc/svgamodes.c +++ b/vgasrc/svgamodes.c @@ -92,5 +92,6 @@ struct generic_svga_mode svga_modes[] VAR16 = { { 0x196, { MM_DIRECT, 2560, 1440, 16, 8, 16, SEG_GRAPH } }, { 0x197, { MM_DIRECT, 2560, 1440, 24, 8, 16, SEG_GRAPH } }, { 0x198, { MM_DIRECT, 2560, 1440, 32, 8, 16, SEG_GRAPH } },
- { 0x199, { MM_DIRECT, 3840, 2160, 32, 8, 16, SEG_GRAPH } },
}; unsigned int svga_mcount VAR16 = ARRAY_SIZE(svga_modes);
I'm not sure about this change. Is 3840x2160 a standard of some kind?
Gerd - do you have any comments on this?
-Kevin
Hi,
-#define VBE_DISPI_MAX_XRES 2560 -#define VBE_DISPI_MAX_YRES 1600 +#define VBE_DISPI_MAX_XRES 3840 +#define VBE_DISPI_MAX_YRES 2160
- { 0x199, { MM_DIRECT, 3840, 2160, 32, 8, 16, SEG_GRAPH } },
I'm not sure about this change. Is 3840x2160 a standard of some kind?
It is standard 4k (a comment saying that would be nice).
Gerd - do you have any comments on this?
The edid spec also has 4096x2160 and 5120x2160, should we add those too while being at it? Not sure which ones are actually used in practice by monitors ...
Also: What about depths other than 32? I think we can safely ignore 24, nothing modern uses that since at least a decade, so it should not be relevant at all for 4k. 16bpp might be useful though.
take care, Gerd
Hi,
On Thu, Apr 8, 2021 at 12:28 PM Gerd Hoffmann kraxel@redhat.com wrote:
Hi,
-#define VBE_DISPI_MAX_XRES 2560 -#define VBE_DISPI_MAX_YRES 1600 +#define VBE_DISPI_MAX_XRES 3840 +#define VBE_DISPI_MAX_YRES 2160
- { 0x199, { MM_DIRECT, 3840, 2160, 32, 8, 16, SEG_GRAPH } },
I'm not sure about this change. Is 3840x2160 a standard of some kind?
It is standard 4k (a comment saying that would be nice).
I'll update the commit.
Gerd - do you have any comments on this?
The edid spec also has 4096x2160 and 5120x2160, should we add those too while being at it? Not sure which ones are actually used in practice by monitors ...
These resolutions are used by ultra wide monitors. I don't mind adding them, although I don't have a monitor that supports these resolutions natively for testing.
Also: What about depths other than 32? I think we can safely ignore 24, nothing modern uses that since at least a decade, so it should not be relevant at all for 4k. 16bpp might be useful though.
I think we can add 24 for consistency. Every other resolution in the table has all three modes.
Vitaly
On Sun, 11 Apr 2021 20:17:06 +0200 Vitaly Chipounov vitaly@cyberhaven.com wrote:
Hi,
On Thu, Apr 8, 2021 at 12:28 PM Gerd Hoffmann <kraxel(a)redhat.com> wrote:
Hi,
-#define VBE_DISPI_MAX_XRES 2560 -#define VBE_DISPI_MAX_YRES 1600 +#define VBE_DISPI_MAX_XRES 3840 +#define VBE_DISPI_MAX_YRES 2160
- { 0x199, { MM_DIRECT, 3840, 2160, 32, 8, 16, SEG_GRAPH }
},
I'm not sure about this change. Is 3840x2160 a standard of some kind?
It is standard 4k (a comment saying that would be nice).
Hi guys,
could you please merge this commit? 4k monitors are now commonplace, and I just spent couple of days with futile attempts trying to get Windows 11 in QEMU/KVM running in 4k resolution, scouring the internet for answers and trying various virtio and QXL drivers, enabling and disabling EDID, only to find the VGA mode entry is just not there.
With this patch, 4k works almost out of the box, only requiring to increase the VGA memory.
Regards,