On Sun, 14 Oct 2001, Keith Whitwell wrote:

> 
> > 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).
> 
> Userspace programs always deal in virtual addresses.  You need to map the
> section of agp space you're interested in to your process' virtual address 
> space - this is the function of drmAddMap/drmMap.  
> 
> When you call drmAddMap you tell it which bit of agp space you're interested 
> in making available to the 3d client (this is done in the 2d driver).
> 
> When you call drmMap in the 3d driver, that returns a pointer to the virtual 
> mapping of that portion of agp space.
> 
> You can't use that pointer to talk to hardware, of course, but you can use it 
> to put stuff into the agp memory from your userspace program.  The hardware 
> will need to know either the offset from the beginning of the agp aperture or 
> the physical address.  When I say physical address I mean 
> (beginning-of-agp-aperture + offset-in-agp-aperture).  The agp aperture is 
> just a special region of the physical address space.
> 

Ok, that's what I wanted to know - thanks.

> 
> > 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.
> 
> Usually they're 64 meg.  And there's usually plenty left over - don't worry 
> about it.  

Are you sure ? I am asking because there are newer cards with 64megs of
RAM and they way AGP was marketed is to allow to extend the amount of
offscreen memory..

> 
> > 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..
> 
> I can't say you're wrong, but if I was doing it I'd work with agpgart first 
> simply because all the infrastructure is there and debugged.
> 
> > > >      * 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.
> 
> I hope I've explained a little better above.  You map the agp region into the 
> process virtual address space useing drmAddMap/drmMap, then just get a 
> regular old pointer that you can write to and read from (but reads are very 
> slow because agp is uncached)

Wait a moment - I thought that was regular RAM, wasn't it ? Is the
slowdown because CPU does not cache it  or something else ? If reads are
really slow, then there is no way I can use AGP memory as that's what I
want to do...

                        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

Reply via email to