Skip site navigation (1)Skip section navigation (2)
Date:      12 Jul 2002 17:29:01 -0600
From:      Eric Anholt <eta@lclark.edu>
To:        Stanislav Grozev <tacho@daemonz.org>
Cc:        freebsd-current@FreeBSD.ORG, Alfred Perlstein <bright@mu.org>
Subject:   Re: Update to the DRM
Message-ID:  <1026516542.485.147.camel@anholt.dyndns.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <eta@lclark.edu>
http://people.freebsd.org/~anholt/dri/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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