Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2002 23:36:58 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        Eric Anholt <eta@lclark.edu>
Cc:        "hackers@FreeBSD.ORG" <hackers@FreeBSD.ORG>
Subject:   Re: busdma in the DRM
Message-ID:  <Pine.BSF.4.21.0211062332450.17375-100000@root.org>
In-Reply-To: <1036654043.710.536.camel@anholt.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6 Nov 2002, Eric Anholt wrote:
> I've been trying to figure out how to use the bus_dma* functions in the
> DRM.  What I'm working on at the moment is the ATI PCIGART.  How it
> works right now is an ioctl is done which mallocs a chunk of memory (up
> to 32MB).  Later, the ioctl that sets up dma allocates a physically
> contiguous 32K of memory which contains pointers (by vtophys) into the
> pages of the 32MB.  The physical address of that 32K is then written to
> the card.  The 32MB is mapped by both the kernel and userspace (the X
> Server).
> 
> So, I'm trying to convert it to busdma.  I'm making a tag (is making it
> without having a parent tag a bad thing?) for the 32K contiguous,
> allocing 32K, and loading, with a callback to drop the dma address into
> a place of my choice.  However, how do I do the 32MB?  It only has to
> consist of pages, with nothing else special for alignment.  For
> nsegments in bus_dma_tag_create it says it can't be more than 250-300,
> while I've got possibly 8192 segments.  I'm thinking I would have to
> make a tag for the 32MB, allocate it, then loop and create PAGE_SIZE,
> nsegments=1 tags with the 32MB as parent, and bus_dmamap_load on those
> tags with offsets from the first map's vaddr and PAGE_SIZE long.  Am I
> totally off base here?  Is this even possible?

Check out /sys/pci/agp*

-Nate


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




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