summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-12-31 17:59:44 +0100
committerKeith Packard <keithp@neko.keithp.com>2007-03-26 20:32:25 -0700
commit1c2793d3ec4c82c7205abb10a1f4d093864425ea (patch)
treeeec2a5975f7b29be8db0755bed84aa1777cd1982
parentd7bcad9c694a13c702e429d8364035850d8f8bb7 (diff)
downloadxserver-1c2793d3ec4c82c7205abb10a1f4d093864425ea.tar.gz
fbdevhw: Override RGB offsets and masks after setting initial mode.
This is a hack, but it should be a NOP for all the setups that worked before and actually seems to fix some others... Based on a patch by Peter Teichmann from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338241 . (cherry picked from commit dc5eb4523298f966bd5fd9ae6672160034b5e82c)
-rw-r--r--hw/xfree86/fbdevhw/fbdevhw.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index a9288a753..8f78b85af 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -745,6 +745,17 @@ fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
"FBIOGET_VSCREENINFO: %s\n", strerror(errno));
return FALSE;
}
+
+ /* XXX: This is a hack, but it should be a NOP for all the setups that
+ * worked before and actually seems to fix some others...
+ */
+ pScrn->offset.red = fPtr->var.red.offset;
+ pScrn->offset.green = fPtr->var.green.offset;
+ pScrn->offset.blue = fPtr->var.blue.offset;
+ pScrn->mask.red = ((1 << fPtr->var.red.length) - 1) << fPtr->var.red.offset;
+ pScrn->mask.green = ((1 << fPtr->var.green.length) - 1) << fPtr->var.green.offset;
+ pScrn->mask.blue = ((1 << fPtr->var.blue.length) - 1) << fPtr->var.blue.offset;
+
return TRUE;
}