summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-15 15:54:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-15 15:54:12 -0800
commit1537601c4fe09c3ebf8029b886a8008fabbdca0f (patch)
treeb797c750f04b10fb5ac7c038b6052bd06320b308
parent388a7c64e44ae6f04328c24dd93a94cb0fb380d3 (diff)
downloadxf86-video-cirrus-1537601c4fe09c3ebf8029b886a8008fabbdca0f.tar.gz
xf86-video-cirrus-1537601c4fe09c3ebf8029b886a8008fabbdca0f.tar.bz2
xf86-video-cirrus-1537601c4fe09c3ebf8029b886a8008fabbdca0f.zip
virt-16bpp
-rw-r--r--src/alp_driver.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/alp_driver.c b/src/alp_driver.c
index c02741e..3800487 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -469,6 +469,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
vgaHWPtr hwp;
MessageType from, from1;
int i;
+ int defaultdepth;
int depth_flags;
ClockRangePtr clockRanges;
char *s;
@@ -552,11 +553,18 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
depth_flags |= Support32bppFb |
SupportConvert32to24 |
PreferConvert32to24;
+
+ /* use 16bpp in virt */
+ if ((pCir->PciInfo->subvendor_id & 0xffff) == 0x1af4)
+ 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 */