qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth
@ 2009-02-16 21:27 Brian Kress
  2009-02-19 21:55 ` [Qemu-devel] " Consul
  2009-02-27 19:45 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 2 replies; 5+ messages in thread
From: Brian Kress @ 2009-02-16 21:27 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

The VMware SVGA adapter is set to a 24 bit depth, where as the display 
surfaces
(and just about everything else) are using a 32 bit depth.  So when you 
use "-vga vmware"
in either the sdl or vnc displays, you get some very odd video that has 
the wrong colors, is
repeated and is only over 3/4 of the screen.  Fix seems to be to change 
it to 32 bit.  With
this patch I can use VMware video in both sdl and vnc and have it 
display correctly.









[-- Attachment #2: patch.vmware_vga --]
[-- Type: text/plain, Size: 426 bytes --]

Signed-off-by: Brian Kress <kressb@moose.net>

Index: hw/vmware_vga.c
===================================================================
--- hw/vmware_vga.c	(revision 6626)
+++ hw/vmware_vga.c	(working copy)
@@ -914,7 +914,7 @@
     s->width = -1;
     s->height = -1;
     s->svgaid = SVGA_ID;
-    s->depth = 24;
+    s->depth = 32;
     s->bypp = (s->depth + 7) >> 3;
     s->cursor.on = 0;
     s->redraw_fifo_first = 0;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] VMware SVGA uses incorrect depth
  2009-02-16 21:27 [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth Brian Kress
@ 2009-02-19 21:55 ` Consul
  2009-02-27 19:45 ` [Qemu-devel] " Anthony Liguori
  1 sibling, 0 replies; 5+ messages in thread
From: Consul @ 2009-02-19 21:55 UTC (permalink / raw)
  To: qemu-devel

Brian Kress wrote:
> The VMware SVGA adapter is set to a 24 bit depth, where as the display 
> surfaces
> (and just about everything else) are using a 32 bit depth.  So when you 
> use "-vga vmware"
> in either the sdl or vnc displays, you get some very odd video that has 
> the wrong colors, is
> repeated and is only over 3/4 of the screen.  Fix seems to be to change 
> it to 32 bit.  With
> this patch I can use VMware video in both sdl and vnc and have it 
> display correctly.
> 
> 

Acked-by: Alex Ivanov <void@aleksoft.net>

This certainly fixes the distorted output with vmware_vga.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth
  2009-02-16 21:27 [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth Brian Kress
  2009-02-19 21:55 ` [Qemu-devel] " Consul
@ 2009-02-27 19:45 ` Anthony Liguori
  2009-02-27 20:21   ` andrzej zaborowski
  1 sibling, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2009-02-27 19:45 UTC (permalink / raw)
  To: qemu-devel

Brian Kress wrote:
> The VMware SVGA adapter is set to a 24 bit depth, where as the display 
> surfaces
> (and just about everything else) are using a 32 bit depth.  So when 
> you use "-vga vmware"
> in either the sdl or vnc displays, you get some very odd video that 
> has the wrong colors, is
> repeated and is only over 3/4 of the screen.  Fix seems to be to 
> change it to 32 bit.  With
> this patch I can use VMware video in both sdl and vnc and have it 
> display correctly.
>
>
> Signed-off-by: Brian Kress <kressb@moose.net>
>
> Index: hw/vmware_vga.c
> ===================================================================
> --- hw/vmware_vga.c	(revision 6626)
> +++ hw/vmware_vga.c	(working copy)
> @@ -914,7 +914,7 @@
>      s->width = -1;
>      s->height = -1;
>      s->svgaid = SVGA_ID;
> -    s->depth = 24;
> +    s->depth = 32;
>      s->bypp = (s->depth + 7) >> 3;
>   
I think having:

s->depth = 24;
s->bypp = 4;

Is a better fix.   Can you test that?

Regards,

Anthony Liguori
>      s->cursor.on = 0;
>   

     s->redraw_fifo_first = 0;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth
  2009-02-27 19:45 ` [Qemu-devel] " Anthony Liguori
@ 2009-02-27 20:21   ` andrzej zaborowski
  2009-03-02 11:36     ` Stefano Stabellini
  0 siblings, 1 reply; 5+ messages in thread
From: andrzej zaborowski @ 2009-02-27 20:21 UTC (permalink / raw)
  To: qemu-devel

2009/2/27 Anthony Liguori <aliguori@us.ibm.com>:
> Brian Kress wrote:
>>
>> The VMware SVGA adapter is set to a 24 bit depth, where as the display
>> surfaces
>> (and just about everything else) are using a 32 bit depth.  So when you
>> use "-vga vmware"
>> in either the sdl or vnc displays, you get some very odd video that has
>> the wrong colors, is
>> repeated and is only over 3/4 of the screen.  Fix seems to be to change it
>> to 32 bit.  With
>> this patch I can use VMware video in both sdl and vnc and have it display
>> correctly.
>>
>>
>> Signed-off-by: Brian Kress <kressb@moose.net>
>>
>> Index: hw/vmware_vga.c
>> ===================================================================
>> --- hw/vmware_vga.c     (revision 6626)
>> +++ hw/vmware_vga.c     (working copy)
>> @@ -914,7 +914,7 @@
>>     s->width = -1;
>>     s->height = -1;
>>     s->svgaid = SVGA_ID;
>> -    s->depth = 24;
>> +    s->depth = 32;
>>     s->bypp = (s->depth + 7) >> 3;
>>
>
> I think having:
>
> s->depth = 24;
> s->bypp = 4;

I don't think hardcoding any depth is correct (not counting the
obvious performance disadvantage).  The s->depth value is what is
returned by the SVGA_REG_HOST_BITS_PER_PIXEL register, so it should be
the host's color depth if possible (may be impossible for VNC, but
easy with SDL), iirc this broke only recently.

Cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth
  2009-02-27 20:21   ` andrzej zaborowski
@ 2009-03-02 11:36     ` Stefano Stabellini
  0 siblings, 0 replies; 5+ messages in thread
From: Stefano Stabellini @ 2009-03-02 11:36 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

andrzej zaborowski wrote:

> I don't think hardcoding any depth is correct (not counting the
> obvious performance disadvantage).  The s->depth value is what is
> returned by the SVGA_REG_HOST_BITS_PER_PIXEL register, so it should be
> the host's color depth if possible (may be impossible for VNC, but
> easy with SDL), iirc this broke only recently.
> 

The problem is that the SDL frontend is initialized after the graphic
device so it is not possible to get the host resolution from sdl.c at
the time.

That said, I think that setting the vmware svga color depth to

s->depth = 24;
s->bypp = 4;

by default is reasonable since it covers 99% of the cases out there.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-02 11:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16 21:27 [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth Brian Kress
2009-02-19 21:55 ` [Qemu-devel] " Consul
2009-02-27 19:45 ` [Qemu-devel] " Anthony Liguori
2009-02-27 20:21   ` andrzej zaborowski
2009-03-02 11:36     ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).