* [PATCH] fix widescreen resolution issues (v2)
@ 2008-02-22 2:11 Andreas Winkelbauer
2008-02-22 3:39 ` Leslie Mann
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Andreas Winkelbauer @ 2008-02-22 2:11 UTC (permalink / raw)
To: Avi Kivity, arne.brutschy; +Cc: kvm-devel
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
hi,
I found out what crashed kvm when I increased VGA_RAM_SIZE in pc.h. The
crash was caused by a really _dirty_ hack in a kvm specific part of
vga.c (it took me at least an hour to find this amazing piece of code...
at least the "HACK ALERT" was a good hint ;-) ).
I've attached the patch. It works for me (tested with windows xp as
guest os @ 1680x1050). As always, please test the patch. I'd highly
appreciate it if somebody could test it with linux as guest os.
@Arne: Could you please test the patch with your setup? I hope it works
this time...
cheers,
Andi
[-- Attachment #2: widescreen-fix.patch --]
[-- Type: text/x-patch, Size: 3041 bytes --]
--- kvm-61.orig/qemu/hw/vga.c 2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/qemu/hw/vga.c 2008-02-22 02:43:08.000000000 +0100
@@ -1438,7 +1438,7 @@
long page0, page1, page_min, page_max;
vga_draw_line_func *vga_draw_line;
/* HACK ALERT */
-#define VGA_BITMAP_SIZE ((8*1024*1024) / 4096 / 8 / sizeof(long))
+#define VGA_BITMAP_SIZE ((VGA_RAM_SIZE) / 4096 / 8 / sizeof(long))
unsigned long bitmap[VGA_BITMAP_SIZE];
#ifndef TARGET_IA64
int r;
--- kvm-61.orig/qemu/hw/vga_int.h 2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/qemu/hw/vga_int.h 2008-02-20 19:25:35.000000000 +0100
@@ -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
--- kvm-61.orig/vgabios/vbetables-gen.c 2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/vgabios/vbetables-gen.c 2008-02-20 19:22:48.000000000 +0100
@@ -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, },
};
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
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/
[-- Attachment #4: Type: text/plain, Size: 158 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fix widescreen resolution issues (v2)
2008-02-22 2:11 [PATCH] fix widescreen resolution issues (v2) Andreas Winkelbauer
@ 2008-02-22 3:39 ` Leslie Mann
2008-02-22 7:45 ` Avi Kivity
2008-02-22 9:17 ` Arne Brutschy
2 siblings, 0 replies; 6+ messages in thread
From: Leslie Mann @ 2008-02-22 3:39 UTC (permalink / raw)
To: kvm-devel
Andreas Winkelbauer <andreas.winkelbauer <at> gmx.at> writes:
>
> hi,
>
> I found out what crashed kvm when I increased VGA_RAM_SIZE in pc.h. The
> crash was caused by a really _dirty_ hack in a kvm specific part of
> vga.c (it took me at least an hour to find this amazing piece of code...
> at least the "HACK ALERT" was a good hint ).
>
> I've attached the patch. It works for me (tested with windows xp as
> guest os @ 1680x1050). As always, please test the patch. I'd highly
> appreciate it if somebody could test it with linux as guest os.
>
Patches get me running up to 1920 x 1200 using WinXP guest!
Now that I can run higher resolutions I am seeing a screen corruption issue on
resolutions greater than 1600x1200. Property dialogs are the easiest way to
see the issue, a set of thin horizontal bands through the dialog with the
desktop visible. On certain areas of the screen the mouse pointer will also
show banding.
Les
-------------------------------------------------------------------------
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fix widescreen resolution issues (v2)
2008-02-22 2:11 [PATCH] fix widescreen resolution issues (v2) Andreas Winkelbauer
2008-02-22 3:39 ` Leslie Mann
@ 2008-02-22 7:45 ` Avi Kivity
2008-02-22 9:17 ` Arne Brutschy
2 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2008-02-22 7:45 UTC (permalink / raw)
To: Andreas Winkelbauer; +Cc: kvm-devel, arne.brutschy
Andreas Winkelbauer wrote:
> hi,
>
> I found out what crashed kvm when I increased VGA_RAM_SIZE in pc.h.
> The crash was caused by a really _dirty_ hack in a kvm specific part
> of vga.c (it took me at least an hour to find this amazing piece of
> code... at least the "HACK ALERT" was a good hint ;-) ).
>
> I've attached the patch. It works for me (tested with windows xp as
> guest os @ 1680x1050). As always, please test the patch. I'd highly
> appreciate it if somebody could test it with linux as guest os.
>
> @Arne: Could you please test the patch with your setup? I hope it
> works this time...
>
The patch doesn't include the change to VGA_RAM_SIZE! How can this work?
Please send separate patches for the bios and qemu.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fix widescreen resolution issues (v2)
2008-02-22 2:11 [PATCH] fix widescreen resolution issues (v2) Andreas Winkelbauer
2008-02-22 3:39 ` Leslie Mann
2008-02-22 7:45 ` Avi Kivity
@ 2008-02-22 9:17 ` Arne Brutschy
2008-02-22 12:44 ` Andreas Winkelbauer
2008-02-22 12:55 ` Leslie Mann
2 siblings, 2 replies; 6+ messages in thread
From: Arne Brutschy @ 2008-02-22 9:17 UTC (permalink / raw)
To: Andreas Winkelbauer; +Cc: kvm-devel, Avi Kivity, Leslie Mann
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
Hi all,
On Fr, 2008-02-22 at 03:11 +0100, Andreas Winkelbauer wrote:
> I found out what crashed kvm when I increased VGA_RAM_SIZE in pc.h. The
> crash was caused by a really _dirty_ hack in a kvm specific part of
> vga.c (it took me at least an hour to find this amazing piece of code...
> at least the "HACK ALERT" was a good hint ;-) ).
Ow, that really does qualify as a dirty hack. :) Thanks for finding
that! I currently don't have the time to skim through pages of code, so
sorry for my non-involvement on this issue...
> @Arne: Could you please test the patch with your setup? I hope it works
> this time...
Yesno. It does (at least kvm does not crash), but it shows the same
dialog problems as reported by Leslie:
> I've attached the patch. It works for me (tested with windows xp as
> guest os @ 1680x1050). As always, please test the patch. I'd highly
> appreciate it if somebody could test it with linux as guest os.
BTW, Leslie: Which patch did you use? I attached a second patch as
Andreas forgot to include the changes in hw/pc.h.
Cheers & Good morning to the europeans ;)
Arne
[-- Attachment #2: qemu-widescreen.patch --]
[-- Type: text/x-patch, Size: 7072 bytes --]
diff -Naur kvm-61.orig/qemu/hw/pc.h kvm-61/qemu/hw/pc.h
--- kvm-61.orig/qemu/hw/pc.h 2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/qemu/hw/pc.h 2008-02-21 11:52:36.000000000 +0100
@@ -108,9 +108,9 @@
/* 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,
diff -Naur kvm-61.orig/qemu/hw/vga.c kvm-61/qemu/hw/vga.c
--- kvm-61.orig/qemu/hw/vga.c 2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/qemu/hw/vga.c 2008-02-22 10:07:14.000000000 +0100
@@ -1438,7 +1438,7 @@
long page0, page1, page_min, page_max;
vga_draw_line_func *vga_draw_line;
/* HACK ALERT */
-#define VGA_BITMAP_SIZE ((8*1024*1024) / 4096 / 8 / sizeof(long))
+#define VGA_BITMAP_SIZE ((VGA_RAM_SIZE) / 4096 / 8 / sizeof(long))
unsigned long bitmap[VGA_BITMAP_SIZE];
#ifndef TARGET_IA64
int r;
diff -Naur kvm-61.orig/qemu/hw/vga_int.h kvm-61/qemu/hw/vga_int.h
--- kvm-61.orig/qemu/hw/vga_int.h 2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/qemu/hw/vga_int.h 2008-02-21 10:54:48.000000000 +0100
@@ -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
diff -Naur kvm-61.orig/vgabios/vbetables-gen.c kvm-61/vgabios/vbetables-gen.c
--- kvm-61.orig/vgabios/vbetables-gen.c 2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/vgabios/vbetables-gen.c 2008-02-21 10:54:48.000000000 +0100
@@ -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;
@@ -13,60 +13,69 @@
ModeInfo modes[] = {
/* standard VESA modes */
-{ 640, 400, 8 , 0x100},
-{ 640, 480, 8 , 0x101},
-{ 800, 600, 4 , 0x102},
-{ 800, 600, 8 , 0x103},
-{ 1024, 768, 4 , 0x104},
-{ 1024, 768, 8 , 0x105},
-{ 1280, 1024, 4 , 0x106},
-{ 1280, 1024, 8 , 0x107},
+{ 640, 400, 8 , 0x100},
+{ 640, 480, 8 , 0x101},
+{ 800, 600, 4 , 0x102},
+{ 800, 600, 8 , 0x103},
+{ 1024, 768, 4 , 0x104},
+{ 1024, 768, 8 , 0x105},
+{ 1280, 1024, 4 , 0x106},
+{ 1280, 1024, 8 , 0x107},
{ 320, 200, 15 , 0x10D},
-{ 320, 200, 16 , 0x10E},
-{ 320, 200, 24 , 0x10F},
+{ 320, 200, 16 , 0x10E},
+{ 320, 200, 24 , 0x10F},
{ 640, 480, 15 , 0x110},
-{ 640, 480, 16 , 0x111},
-{ 640, 480, 24 , 0x112},
+{ 640, 480, 16 , 0x111},
+{ 640, 480, 24 , 0x112},
{ 800, 600, 15 , 0x113},
-{ 800, 600, 16 , 0x114},
-{ 800, 600, 24 , 0x115},
+{ 800, 600, 16 , 0x114},
+{ 800, 600, 24 , 0x115},
{ 1024, 768, 15 , 0x116},
-{ 1024, 768, 16 , 0x117},
-{ 1024, 768, 24 , 0x118},
+{ 1024, 768, 16 , 0x117},
+{ 1024, 768, 24 , 0x118},
{ 1280, 1024, 15 , 0x119},
-{ 1280, 1024, 16 , 0x11A},
-{ 1280, 1024, 24 , 0x11B},
-{ 1600, 1200, 8 , 0x11C},
+{ 1280, 1024, 16 , 0x11A},
+{ 1280, 1024, 24 , 0x11B},
+{ 1600, 1200, 8 , 0x11C},
{ 1600, 1200, 15 , 0x11D},
-{ 1600, 1200, 16 , 0x11E},
-{ 1600, 1200, 24 , 0x11F},
+{ 1600, 1200, 16 , 0x11E},
+{ 1600, 1200, 24 , 0x11F},
/* BOCHS/PLE, 86 'own' mode numbers */
-{ 320, 200, 32 , 0x140},
-{ 640, 400, 32 , 0x141},
-{ 640, 480, 32 , 0x142},
-{ 800, 600, 32 , 0x143},
-{ 1024, 768, 32 , 0x144},
-{ 1280, 1024, 32 , 0x145},
-{ 320, 200, 8 , 0x146},
-{ 1600, 1200, 32 , 0x147},
-{ 1152, 864, 8 , 0x148},
+{ 320, 200, 32 , 0x140},
+{ 640, 400, 32 , 0x141},
+{ 640, 480, 32 , 0x142},
+{ 800, 600, 32 , 0x143},
+{ 1024, 768, 32 , 0x144},
+{ 1280, 1024, 32 , 0x145},
+{ 320, 200, 8 , 0x146},
+{ 1600, 1200, 32 , 0x147},
+{ 1152, 864, 8 , 0x148},
{ 1152, 864, 15 , 0x149},
{ 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, },
};
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
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/
[-- Attachment #4: Type: text/plain, Size: 158 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fix widescreen resolution issues (v2)
2008-02-22 9:17 ` Arne Brutschy
@ 2008-02-22 12:44 ` Andreas Winkelbauer
2008-02-22 12:55 ` Leslie Mann
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Winkelbauer @ 2008-02-22 12:44 UTC (permalink / raw)
To: arne.brutschy; +Cc: kvm-devel
hi,
>> @Arne: Could you please test the patch with your setup? I hope it works
>> this time...
> Yesno. It does (at least kvm does not crash), but it shows the same
> dialog problems as reported by Leslie:
I'm quite sure that this issue isn't related to the widescreen fixes.
This "visual bug" seems to be around since kvm-60 or so and has been
verified by some guys (including me) also at lower resolutions like
1400x1050.
See this post:
http://article.gmane.org/gmane.comp.emulators.kvm.devel/13409
You could try using -no-kvm or an older kvm release for testing.
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fix widescreen resolution issues (v2)
2008-02-22 9:17 ` Arne Brutschy
2008-02-22 12:44 ` Andreas Winkelbauer
@ 2008-02-22 12:55 ` Leslie Mann
1 sibling, 0 replies; 6+ messages in thread
From: Leslie Mann @ 2008-02-22 12:55 UTC (permalink / raw)
To: kvm-devel
Arne Brutschy <arne.brutschy <at> ulb.ac.be> writes:
>
> BTW, Leslie: Which patch did you use? I attached a second patch as
> Andreas forgot to include the changes in hw/pc.h.
>
All provided along with an edit to hw/pc.h, same as your second patch.
Les
-------------------------------------------------------------------------
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/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-02-22 12:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22 2:11 [PATCH] fix widescreen resolution issues (v2) Andreas Winkelbauer
2008-02-22 3:39 ` Leslie Mann
2008-02-22 7:45 ` Avi Kivity
2008-02-22 9:17 ` Arne Brutschy
2008-02-22 12:44 ` Andreas Winkelbauer
2008-02-22 12:55 ` Leslie Mann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox