[PATCH] i810: Keep resetting CrtcHBlankStart
Tony Lindgren
tony at atomide.com
Sun Jan 28 22:49:20 PST 2007
For some reason CrtcHBlankStart gets hosed. This is already
being reset during init, but needs to be reset every time
mode changes.
This should really be fixed properly somewhere else, and
this patch is just an improvment of an earlier workaround.
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -809,6 +809,17 @@
/* Wait for the clocks to stabilize. */
usleep(150);
+ /* FIXME: Why does CrtcBlankStart get hosed for certain modes?
+ * For example 1600 shows up incorrectly as 1656
+ */
+ if (adjusted_mode->CrtcHBlankStart != adjusted_mode->CrtcHDisplay)
+ {
+ xf86DrvMsg (pScrn->scrnIndex, X_INFO,
+ "FIXME: move blank start again from %d to %d\n",
+ adjusted_mode->CrtcHBlankStart, adjusted_mode->CrtcHDisplay);
+ adjusted_mode->CrtcHBlankStart = adjusted_mode->CrtcHDisplay;
+ }
+
OUTREG(htot_reg, (adjusted_mode->CrtcHDisplay - 1) |
((adjusted_mode->CrtcHTotal - 1) << 16));
OUTREG(hblank_reg, (adjusted_mode->CrtcHBlankStart - 1) |
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1601,24 +1601,6 @@
return FALSE;
}
- /*
- * Fix up modes to make hblank start at hsync start.
- * I don't know why the xf86 code mangles this...
- */
- {
- DisplayModePtr p;
-
- for (p = pScrn->modes; p;) {
- xf86DrvMsg (pScrn->scrnIndex,
- X_INFO, "move blank start from %d to %d\n",
- p->CrtcHBlankStart, p->CrtcHDisplay);
- p->CrtcHBlankStart = p->CrtcHDisplay;
- p = p->next;
- if (p == pScrn->modes)
- break;
- }
- }
-
pScrn->currentMode = pScrn->modes;
pI830->disableTiling = FALSE;
More information about the xorg
mailing list