From owner-freebsd-hackers Thu Apr 10 15:43:06 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA05234 for hackers-outgoing; Thu, 10 Apr 1997 15:43:06 -0700 (PDT) Received: from noc.belwue.de (root@noc.BelWue.DE [129.143.2.1]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA05225 for ; Thu, 10 Apr 1997 15:43:02 -0700 (PDT) Received: from ceres.tat.physik.uni-tuebingen.de (ceres.tat.physik.uni-tuebingen.de [134.2.170.12]) by noc.belwue.de (8.8.5/8.8.5) with SMTP id AAA09376; Fri, 11 Apr 1997 00:42:46 +0200 (MET DST) Received: by ceres.tat.physik.uni-tuebingen.de (951211.SGI.8.6.12.PATCH1042/940406.SGI) id AAA19283; Fri, 11 Apr 1997 00:42:39 +0200 Received: by ceres.tat.physik.uni-tuebingen.de (Smail3.1.28.1 #20) id m0wFSRq-0001gAC; Fri, 11 Apr 97 00:36 MET DST Message-ID: <19970411003605.42550@tat.physik.uni-tuebingen.de> Date: Fri, 11 Apr 1997 00:36:05 +0200 From: Harald Koenig To: Luigi Rizzo Cc: XFree86@XFree86.Org, hackers@freebsd.org Subject: Re: Problem with Trio64V+ rev. 541 and XFree863.2/3.2.A References: <199704101514.RAA16697@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69e In-Reply-To: <199704101514.RAA16697@labinfo.iet.unipi.it>; from Luigi Rizzo on Thu, Apr 10, 1997 at 05:14:48PM +0200 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 ^^^^^ ^^^^^