summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-11-02 08:54:53 +0000
committerEgbert Eich <eich@suse.de>2004-11-02 08:54:53 +0000
commitc24b0e04f3a1b064412e0bea44c4af546ec9fb77 (patch)
tree2beb3712c723e0ef7638f5ca9d238124b5551814 /src
parent7ce4898ee319d149cf86e938e7257ea7490d327f (diff)
Fixed KGA handling for i810. KGA handling for chips derived from C&T chips isxprint_packagertest_20041125_basexprint_packagertest_20041125
slightly different. The changes make the code consistent with the C&T (chips) and i740 drivers.
Diffstat (limited to 'src')
-rw-r--r--src/i810_driver.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/i810_driver.c b/src/i810_driver.c
index 47aa05ea..b4732951 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -1732,6 +1732,21 @@ I810SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
i810Reg->ExtHorizBlank = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x40) >> 6;
/*
+ * the KGA fix in vgaHW.c results in the first
+ * scanline and the first character clock (8 pixels)
+ * of each scanline thereafter on display with an i810
+ * to be blank. Restoring CRTC 3, 5, & 22 to their
+ * "theoretical" values corrects the problem. KAO.
+ */
+ pVga->CRTC[3] = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x1F) | 0x80;
+ pVga->CRTC[5] = ((((mode->CrtcHBlankEnd >> 3) - 1) & 0x20) << 2)
+ | (((mode->CrtcHSyncEnd >> 3)) & 0x1F);
+ pVga->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF;
+
+ i810Reg->ExtHorizBlank = vgaHWHBlankKGA(mode, pVga, 7, 0);
+ vgaHWVBlankKGA(mode, pVga, 8, 0);
+
+ /*
* The following workarounds are needed to get video overlay working
* at 1024x768 and 1280x1024 display resolutions.
*/
@@ -1799,18 +1814,6 @@ I810ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
if (!vgaHWInit(pScrn, mode))
return FALSE;
- /*
- * the KGA fix in vgaHW.c results in the first
- * scanline and the first character clock (8 pixels)
- * of each scanline thereafter on display with an i810
- * to be blank. Restoring CRTC 3, 5, & 22 to their
- * "theoretical" values corrects the problem. KAO.
- */
- pVga = &VGAHWPTR(pScrn)->ModeReg;
- pVga->CRTC[3] = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x1F) | 0x80;
- pVga->CRTC[5] = ((((mode->CrtcHBlankEnd >> 3) - 1) & 0x20) << 2)
- | (((mode->CrtcHSyncEnd >> 3)) & 0x1F);
- pVga->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF;
pScrn->vtSema = TRUE;