On Sat, 13 Oct 2001, Keith Whitwell wrote:
>
> > Well, this explains some things - but not all of them. Perhaps you can
> > point out to me where I am wrong ?
> >
> > First of all, how PCI scatter-gather works: instead of having one
> > physically contiguous buffer to DMA in/out, we have a list of page-sized
> > buffers and a table (not more than a few pages long) that specifies which
> > ones to use. For example, in case of Radeons, the entries in the table are
> > 16 bytes long: two are addresses, one specifies what to do with them and
> > one 32bit word is reserved. For bt848 the entries are 8 bytes
> > long: address and a command.
>
> I think you *might* be refering to the pci-gart work, where there is an
> agp-like address translation unit on the chip itself? I've never done any
> work with that; you might try Jeff or Gareth or maybe Michael Danzer? I'm
> not really sure who's been working on that side of things.
>
> > However, for AGP cards, AGP can do the translation by itself. So, in
> > principle, the AGP card should take faked contiguous buffer and work with
> > it.
>
> You don't really need to think of agp memory as faked contiguous - it really
> appears as contiguous memory to the driver and the card; the agpgart kernel
> module can do everything necessary for setting it up and taking it down.
Well, for me, the usefullness of calling it "faked contiguous" is that it
has a third address space: "AGP address space" (as opposed to virtual and
physical for usual addressing).
>
> > As I am writing the driver from scratch, I will have a natural interface
> > boundary: the part that manages the buffers and the part that uses buffer
> > address (before and after AGP GART/PCI GART) for card-specific purposes.
> > If I am using drm/agpgart I'll have to figure out how to get the same
> > information - which seems unusually hard. (And since AGP GART is universal
> > with relation to all AGP cards there should be a unique way to arrive at
> > numbers to write into cards registers given DRM Handle, AGP Offset and the
> > like).
>
> The interface to agpgart *is* universal, but the work done setting up agp
> regions has so far been the responsibility of the X server, because it is the
> trusted entity. The knowledge of what agp regions need to be set up is
> device-specific, so the place that we've set up agp regions in the past has
> been the device-specific part of the X server, namely the 2d driver.
Yep. What I was trying to understand is that, since I already setup my own
region, what can I do to it ? For example, how do I get to "AGP
space" addresses (as oppposed to physical or virtual).
>
> > Now this is all fine, except I hit a brick wall: in my documentation
> > there are several registers that allow one to start DMA and _all_ of
> > those that I am interested in are supposed to point to PCI-like
> > scatter-gather table. Now, having a scatter-gather table in agp
> > translatable space is nuts. But, just ignoring AGP stuff does not work
> > either: first of all it does not work (experimentally) and I suspect the
> > reason is that the cards AGP registers are set to translate _all_
> > addressable space (instead of only 32mb AGP aperture). I would have tried
> > using space in AGP aperture except that I have no idea how to do it
> > (and this is the place my previous questions were about).
>
> You're starting to loose me here. It is easy to get confused with agp
> address spaces, and you need to look at them and usually try a bunch of
> different approaches before stuff starts to work.
>
> >From what I know about the radeon pcigart table, you end up with something a
> lot like an agpgart apperture where contiguous addresses are translated by
> hardware on the card to discontig addresses in main memory. However, I've
> never dealt with these creatures...
>
> > And for some specific questions: D
> >
> > * Does it make sense to have PCI GART and AGP GART working
> > simultaneously ? (AGP for graphics and PCI for things like
> > capture).
>
> My guess is no - you make a choice according to whether agp is available and
> if so use that exclusively. Search out the pcigart code - it will probably
> help you a lot. Maybe consider supporting only agpgart to start with as that
> is the most common case.
Well, for once, the size of AGP aperture is limited. 1 meg of system RAM
on 512 meg machine is much less than 1 meg off 32 meg AGP aperture.
Secondly, if 3d only touches AGP stuff and capture only uses pci-gart
tables I can have a separate driver for video capture - and it won't
interfere with 3d stuff..
>
> > * Do we actually need to set AGP registers to translate _all_
> > addresses ?
>
> This sounds like a misconception - the agp aperture is only 32 or 64 meg, and
> it's only addresses in that range which get translated. Addresses outside
> the aperture are unaffected by agp translations. Otherwise the whole
> computer would break???
Well, that's what I thought as well, but something confused me.. Hmmm, I
don't seem to find the relevant place in the driver - I'll assume it does
not exist and move on.
thanks
Vladimir Dergachev
>
> Keith
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> Dri-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dri-devel
>
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel