File u_cirrus-virt-16bpp.patch of Package xf86-video-cirrus

diff -up xf86-video-cirrus-1.3.2/src/alp_driver.c.jx xf86-video-cirrus-1.3.2/src/alp_driver.c
--- xf86-video-cirrus-1.3.2/src/alp_driver.c.jx	2012-04-02 16:30:29.000000000 -0400
+++ xf86-video-cirrus-1.3.2/src/alp_driver.c	2012-04-02 16:33:11.668580522 -0400
@@ -476,6 +476,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 	vgaHWPtr hwp;
 	MessageType from, from1;
 	int i;
+	int defaultdepth;
 	int depth_flags;
 	ClockRangePtr clockRanges;
 	char *s;
@@ -557,11 +558,19 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 	    depth_flags |= Support32bppFb |
 			   SupportConvert32to24 |
 			   PreferConvert32to24;
+
+	/* use 16bpp in virt */
+	if (((pCir->PciInfo->subvendor_id & 0xffff) == 0x1af4) ||
+	    ((pCir->PciInfo->subvendor_id & 0xffff) == 0x5853))
+	    defaultdepth = 16;
+	else
+	    defaultdepth = 24;
+
 	/*
 	 * The first thing we should figure out is the depth, bpp, etc.
 	 * We support both 24bpp and 32bpp layouts, so indicate that.
 	 */
-	if (!xf86SetDepthBpp(pScrn, 0, 0, 24, depth_flags)) {
+	if (!xf86SetDepthBpp(pScrn, 0, 0, defaultdepth, depth_flags)) {
 		return FALSE;
 	} else {
 		/* Check that the returned depth is one we support */
openSUSE Build Service is sponsored by