Hi all,

the S3VWriteMode() function in the S3 ViRGE has a problem: it calls
vgaHWRestore() which might change from color to mono mode, and hence
changes the address of the CR register. I need the following patch for the
code to work.

cu Jo

Index: s3v_driver.c
===================================================================
RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c,v
retrieving revision 1.94
diff -u -r1.94 s3v_driver.c
--- s3v_driver.c        13 Feb 2004 23:58:43 -0000      1.94
+++ s3v_driver.c        23 Apr 2004 16:03:05 -0000
@@ -2290,6 +2290,12 @@
                                        /* Mode only for non-primary? */
    else
      vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_MODE);
+
+   /* vgaHWRestore might change IOBase between color and mono */
+   vgaIOBase = hwp->IOBase;
+   vgaCRIndex = vgaIOBase + 4;
+   vgaCRReg = vgaCRIndex + 1;
+
                /* moved from before vgaHWRestore, to prevent segfault? */
    VGAOUT8(vgaCRIndex, 0x66);             
    VGAOUT8(vgaCRReg, cr66);

-- 
La perfection est atteinte non quand il ne reste rien à ajouter, mais quand
il ne reste rien à enlever.  (Antoine de Saint-Exupéry)
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to