From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ld9Cu-0002zJ-P0 for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:21:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ld9Cs-0002xw-K4 for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:21:16 -0500 Received: from [199.232.76.173] (port=41312 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ld9Cs-0002xp-FS for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:21:14 -0500 Received: from mail-bw0-f171.google.com ([209.85.218.171]:56890) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ld9Cr-0002J4-SV for qemu-devel@nongnu.org; Fri, 27 Feb 2009 15:21:14 -0500 Received: by bwz19 with SMTP id 19so1098500bwz.34 for ; Fri, 27 Feb 2009 12:21:10 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <49A842CD.1000306@us.ibm.com> References: <4999DA28.3040404@moose.net> <49A842CD.1000306@us.ibm.com> Date: Fri, 27 Feb 2009 21:21:10 +0100 Message-ID: Subject: Re: [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth From: andrzej zaborowski Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 2009/2/27 Anthony Liguori : > 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. =C2=A0So 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. =C2=A0Fix seems to be to ch= ange it >> to 32 bit. =C2=A0With >> this patch I can use VMware video in both sdl and vnc and have it displa= y >> correctly. >> >> >> Signed-off-by: Brian Kress >> >> Index: hw/vmware_vga.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- hw/vmware_vga.c =C2=A0 =C2=A0 (revision 6626) >> +++ hw/vmware_vga.c =C2=A0 =C2=A0 (working copy) >> @@ -914,7 +914,7 @@ >> =C2=A0 =C2=A0 s->width =3D -1; >> =C2=A0 =C2=A0 s->height =3D -1; >> =C2=A0 =C2=A0 s->svgaid =3D SVGA_ID; >> - =C2=A0 =C2=A0s->depth =3D 24; >> + =C2=A0 =C2=A0s->depth =3D 32; >> =C2=A0 =C2=A0 s->bypp =3D (s->depth + 7) >> 3; >> > > I think having: > > s->depth =3D 24; > s->bypp =3D 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