From owner-freebsd-current Fri Jul 12 16:29: 8 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D6BE37B405 for ; Fri, 12 Jul 2002 16:29:03 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7600E43E58 for ; Fri, 12 Jul 2002 16:29:02 -0700 (PDT) (envelope-from eta@lclark.edu) Received: from 12-224-154-76.client.attbi.com ([12.224.154.76]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020712232901.LXUX29588.sccrmhc01.attbi.com@12-224-154-76.client.attbi.com>; Fri, 12 Jul 2002 23:29:01 +0000 Subject: Re: Update to the DRM From: Eric Anholt To: Stanislav Grozev Cc: freebsd-current@FreeBSD.ORG, Alfred Perlstein In-Reply-To: <20020712194918.GA92079@meerkat.dungeon> References: <1026343027.498.7.camel@anholt.dyndns.org> <1026343406.498.23.camel@anholt.dyndns.org> <20020711091919.GB92796@meerkat.dungeon> <1026411910.527.75.camel@anholt.dyndns.org> <20020712075650.GA40548@meerkat.dungeon> <20020712090717.GA66863@meerkat.dungeon> <1026500792.488.17.camel@anholt.dyndns.org> <20020712194918.GA92079@meerkat.dungeon> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.3 Date: 12 Jul 2002 17:29:01 -0600 Message-Id: <1026516542.485.147.camel@anholt.dyndns.org> Mime-Version: 1.0 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 2002-07-12 at 13:49, Stanislav Grozev wrote: > On Fri, Jul 12, 2002 at 01:06:31PM -0600, Eric Anholt wrote: > > Luckily for you, support for mach64s (Rage Pros specifically, which I > > think your chip is) is being worked on in DRI CVS, so it should be > > available soon. What's needed at this point is for someone to port the > > Mach64 DRM from Linux to the Linux/BSD framework we've got in DRI CVS > > now. It's a pretty straightforward process now for most chipsets, but > > does take some time. > > well if you give me details, i could try cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/dri login cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/dri -z3 co -P xc That's trunk, which includes the Radeon TCL (transform+lighting) 3d driver and the "os-independent" framework for the DRM. The DRM is in xc/programs/Xserver/hw/xfree86/os-support/${OS}/drm/kernel. To get the branch with mach64 work add -rmach64-0-0-5-branch to the checkout. You would probably want to check out a trunk and a mach64-0-0-5-branch. Install World with the mach64 branch, then copy the mach64* files from the mach64-branch drm into the trunk's drm and port the DRM from there. cvs logs of os-support/shared/drm/kernel/* along with looking at os-support/linux/drm/kernel/drm_os_linux.h and os-support/linux/drm/kernel/drm_os_freebsd.h should give an example of most of the changes to be done in porting a driver. I've taken a quick look at the mach64 code, and I have the following concerns on porting it: - we don't have any os-independent macros for linked lists yet. - needs allocation of 16kb, 16kb-aligned memory (do we have a clean method of doing this?) which is "consistent for DMA". For x86 it looks like we can ignore the "consistent" stuff. They still have interrupt code enabled, but it should probably be #if MACH64_INTERRUPTS (currently 0). We don't have any DRMs on FreeBSD using interrupts, so I don't know how well it would work if that got turned back on. The goal for porting drivers to *BSD for the DRI project is to have no os-specific #ifdefs in the driver code itself. They might be a little more flexible allowing that now, but if we can avoid ifdefs it'll help get the code merged faster. -- Eric Anholt http://people.freebsd.org/~anholt/dri/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message