From owner-freebsd-hackers Thu Jun 7 6:36:21 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from core.usrlib.org (CC2-861.charter-stl.com [24.217.115.99]) by hub.freebsd.org (Postfix) with ESMTP id CB53737B405 for ; Thu, 7 Jun 2001 06:36:17 -0700 (PDT) (envelope-from ajh3@core.usrlib.org) Received: by core.usrlib.org (Postfix, from userid 1001) id F07A5A874; Thu, 7 Jun 2001 08:35:06 -0500 (CDT) Date: Thu, 7 Jun 2001 08:35:06 -0500 From: Andrew Hesford To: Will Andrews Cc: Andrew Hesford , FreeBSD-hackers Subject: Re: XFree86 4.1.0 and i810 Message-ID: <20010607083506.A42740@core.usrlib.org> References: <20010606232045.A453@core.usrlib.org> <20010607003250.B40894@core.usrlib.org> <20010607065915.V81224@bohr.physics.purdue.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010607065915.V81224@bohr.physics.purdue.edu>; from will@physics.purdue.edu on Thu, Jun 07, 2001 at 06:59:15AM -0500 X-Loop: Andrew Hesford Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Jun 07, 2001 at 06:59:15AM -0500, Will Andrews wrote: > On Thu, Jun 07, 2001 at 12:32:50AM -0500, Andrew Hesford (ajh3@usrlib.org) wrote: > > The XFree86 4.0.1 sources *did* offer a helpful hint. I have posted > > another email which includes a patch to fix the buggy i810 driver. > > Are you people talking about XFree86 4.1.0 or 4.0.1? Because > 4.0.1 is >WAY< outdated. :-) > > -- > wca I'm talking about both. The last version of XFree86 that worked properly with the i810 was 4.0.1. Driver restructuring in later versions broke VT-switching code in subsequent versions. Unfortunately, 4.1.0 did not fix this problem (although they claim to support the i810 under FreeBSD), and I managed to trace the problem to an AGPIOC_BIND ioctl. Since XFree86 4.0.1 did not have this problem, I downloaded its sources and was looking to see how the i810 driver handled VT switching. As far as I can tell, the *only* problem with 4.0.2, 4.0.3, and 4.1.0 is that they calle I810UnbindGARTMemory() when leaving the X VT, and call I810BindGARTMemory() when entering the X VT. This call to I810BindGARTMemory() is the one that makes the bad ioctl call. The solution is to comment out the calls to I810BindGARTMemory() and I810UnbindGARTMemory() in the VT-switching functions. The end result is that I810EnterVT() and I810LeaveVT() are now identical in 4.1.0 to the ones in 4.0.1, and the server no longer crashes when one switches terminals. I have attached a patch, and hope that the XFree86 port maintainer will consider adding this to the files/ directory to achieve maximum distribution. I will contact him shortly. I imagine it would be possible to apply the same changes to the drivers in 4.0.2 or 4.0.3, although now I don't see why anybody would care. -- Andrew Hesford ajh3@usrlib.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message