Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 1997 00:36:05 +0200
From:      Harald Koenig <root@tat.physik.uni-tuebingen.de>
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        XFree86@XFree86.Org, hackers@freebsd.org
Subject:   Re: Problem with Trio64V+ rev. 541 and XFree863.2/3.2.A
Message-ID:  <19970411003605.42550@tat.physik.uni-tuebingen.de>
In-Reply-To: <199704101514.RAA16697@labinfo.iet.unipi.it>; from Luigi Rizzo on Thu, Apr 10, 1997 at 05:14:48PM %2B0200
References:  <199704101514.RAA16697@labinfo.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 10, Luigi Rizzo wrote:

> I am having a problem in using the XFree86 (3.1.2, 3.2, 3.2.A) with
> my new S3 card under FreeBSD. The card is recognised by the XF86_S3
> server (3.2) as

which FreeBSD version ?
please send a *full* server output

> but then I get the following two error messages:
> 
>     S3: Cannot read colourmap from VGA.  Will restore with default
>     S3: Cannot read colourmap from VGA.  Will restore with default

it's a warning; should be no real problem.

> and, when exiting X, the screen becomes totally black (although the
> system is up and running, and I can restart X or do other commands at
> will.
> 
> Other than that, X seems to work well and the image is pretty stable.
> 
> Any idea on what might be the problem, and how to fix it (maybe with
> some option in XF86Config ?)

if using another text mode is an option, you should try.
up to 3.2A there was a bug in not restoring one register for text mode
which can cause this problem in rare cases.

or you can get the XFree86 3.2 sources, apply the patch below and
build a fixed server binary...
if you're interested, please get the XFree86 3.2 server-only sources (X32servonly.tgz,  
read README in the same directory about necessary changes to xc/config/cf/xf86site.def!!!).


Harald


--- xc/programs/Xserver/hw/xfree86/accel/s3/s3init.c.orig	Mon Oct 21 07:27:24 1996
+++ xc/programs/Xserver/hw/xfree86/accel/s3/s3init.c	Thu Mar 13 12:31:07 1997
@@ -811,8 +811,9 @@
 #endif
       }
 
-      outb(vgaCRIndex, 0x11);	/* allow writting? */
-      outb(vgaCRReg, 0x00);
+      outb(vgaCRIndex, 0x11);	/* allow writting to CR0-7 */
+      tmp = inb(vgaCRReg);
+      outb(vgaCRReg, tmp & 0x7f);
       for (i = 0; i < 16; i++) {
 	 outb(vgaCRIndex, 0x40 + i);
 	 oldS3->s3sysreg[i] = inb(vgaCRReg);
@@ -3275,7 +3276,8 @@
    outb(vgaCRReg, tmp & 0xf0);
    cebank();
 
-   outb(vgaCRIndex, 0x11);		/* allow writting? */
-   outb(vgaCRReg, 0x00);
+   outb(vgaCRIndex, 0x11);		/* allow writting to CR0-7 */
+   tmp = inb(vgaCRReg);
+   outb(vgaCRReg, tmp & 0x7f);
 
 }
--- xc/programs/Xserver/hw/xfree86/accel/s3/s3.c.orig	Sun Sep 29 15:34:02 1996
+++ xc/programs/Xserver/hw/xfree86/accel/s3/s3.c	Thu Mar 13 12:31:07 1997
@@ -863,8 +863,9 @@
    vgaCRIndex = vgaIOBase + 4;
    vgaCRReg = vgaIOBase + 5;
 
-   outb(vgaCRIndex, 0x11);	/* for register CR11, (Vertical Retrace End) */
-   outb(vgaCRReg, 0x00);		/* set to 0 */
+   outb(vgaCRIndex, 0x11);	/* for register CR11 */
+   tmp = inb(vgaCRReg);         /* enable CR0-7 and disable interrupts */
+   outb(vgaCRReg, tmp & 0x0f);
 
    outb(vgaCRIndex, 0x38);		/* check if we have an S3 */
    outb(vgaCRReg, 0x00);


--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970411003605.42550>