I have opened a Bugzilla bug report (1204 for Drivers) that documents a
Rendition bug and provides a suggested fix.  (I also created--and marked as
resolved--1200 through 1203 to document issues addressed by the last patch to
the Rendition driver.)  I will summarize that report here.

The Rendition driver causes sporadic system lock-ups on text mode entry
(associated with either VT switching or with exitting the server).  This problem
seems to have a long pedigree--I see it in release notes for XFree86 4.0
(http://www.xfree86.org/4.0/rendition9.html#9), and it is still in the release
notes for 4.3 (http://www.xfree86.org/4.3.0/rendition9.html#9).  While I cannot
reproduce this problem at will, I have never managed 20 consecutive switches to
text mode (in the same server run) without seeing the lockup.

Here is the proposed fix:

$ diff -c vmodes.c.4.3.99.903 vmodes.c
*** vmodes.c.4.3.99.903 2002-12-11 12:23:33.000000000 -0500
--- vmodes.c    2004-02-22 02:17:31.000000000 -0500
***************
*** 376,382 ****
      int iob=pRendition->board.io_base;

      verite_restoredac (pScreenInfo, reg);
!     verite_out32(iob+MODEREG,reg->mode);
      verite_out8(iob+MEMENDIAN,reg->memendian);
      verite_out32(iob+DRAMCTL,reg->dramctl);
      verite_out32(iob+SCLKPLL,reg->sclkpll);
--- 376,393 ----
      int iob=pRendition->board.io_base;

      verite_restoredac (pScreenInfo, reg);
!
!     /*
!      * If this is a Verite 1000, restore the MODEREG
!      * register now.  The MODEREG gets restored later
!      * for the Verite 2x00 because restoring it here
!      * has been confirmed to cause intermittent
!      * system locks.
!      */
!     if (pRendition->board.chip == V1000_DEVICE) {
!         verite_out32(iob+MODEREG,reg->mode);
!     }
!
      verite_out8(iob+MEMENDIAN,reg->memendian);
      verite_out32(iob+DRAMCTL,reg->dramctl);
      verite_out32(iob+SCLKPLL,reg->sclkpll);
***************
*** 397,402 ****
--- 408,425 ----
        while ((verite_in32(iob+CRTCSTATUS)&CRTCSTATUS_VERT_MASK) ==
               CRTCSTATUS_VERT_ACTIVE);
      }
+
+     /*
+      * If this is a Verite 2x00, restore the MODEREG
+      * register now.  The MODEREG register is restored
+      * earlier for the Verite 1000, but is restored
+      * here for the Verite 2x00 to prevent system
+      * locks.
+      */
+     if (pRendition->board.chip != V1000_DEVICE) {
+         verite_out32(iob+MODEREG,reg->mode);
+     }
+
      verite_out32(iob+CRTCHORZ,reg->crtch);
      verite_out32(iob+CRTCVERT,reg->crtcv);
      verite_out32(iob+FRAMEBASEA, reg->vbasea);

I lack hardware documentation, so I cannot point to anything categorically
stating that this is the correct resolution--I arrived at this fix through a lot
of blind tweaking and some comparisons to 3.3.6, which does not seem to exhibit
the problem.  Version 3.3.6 fails to lock the machine through more than fifty
switches into text mode (at which point I give up).  With the above change, I
have seen the same results under 4.4 RC3.

For convenience, I have attached the updated file
(xc/programs/hw/xfree86/drivers/rendition/vmodes.c).

Eric Wittry
eswittry&yahoo.com
(replace ampersand with "@")

Attachment: vmodes.c
Description: Binary data

Reply via email to