On Sat, 13 Oct 2001, Keith Whitwell wrote:
> > > > > That's what I am trying to do. With not much luck so far. The reason (at > > least to me) is that the 3d driver is the interaction of 3 parts: kernel > > drm module, XFree driver (like radeon_dri.c) and the dri part (whatever > > goes into radeon_dri.so). > > > > > Second, it is easiest to answer your questions if you refer to specific > > > lines in specific files. There is no variable called "AGP Offset" > > > anywhere in the drm. Maybe there are some with similar names, but I > > > can't tell which one you're talking about. > > > > Finally, someone who knows the stuff :)) No, there is no such variable, > > but this phrase I plucked from the comment. Here is an example from > > radeon.h: > > > > /* CP vertex/indirect buffer data */ > > unsigned long bufStart; /* Offset into AGP space */ > > drmHandle bufHandle; /* Handle from drmAddMap */ > > drmSize bufMapSize; /* Size of map */ > > int bufSize; /* Size of buffers (in MB) */ > > unsigned char *buf; /* Map */ > > int bufNumBufs; /* Number of buffers */ > > drmBufMapPtr buffers; /* Buffer map */ > > > > Now, from these I guess that *buf is where I can access the data directly > > for Xserver. bufSize is the size of the thing - does it have to be in MB ? > > It is interpreted as mb, hence the comment. > Yes, I know _that_. Does it _have_ to be in mb ? can I change it to be in pages and multiply every occurence by (1024*1024/PAGE_SIZE) ? In there there a reason to have it in MB (aside from printing nice round numbers during startup) ? > > Or just page-aligned is fine ? bufStart - what do I use this for ? Can I > > use it to reference data in the buffer or do I have to add or subtract a > > magic number from it before writing into card's registers ? > > This is an offset from the start of the agp apperture. Do you know which value is used in drivers ? Offset itself or offset + start ? Also, the AGP registers are set to translate the entire address space - is this the AGP aperture ? Or is it something else ? > > These fields are setup in the 2d driver to tell the 3d driver how memory is > layed out. Have a look at radeon_dri.c to see how agp space is partitioned > up and these values are calculated. > > > (and to answer > > your questions: I have made a copy of the same fields /with buf replaced > > with capture and allocated space.. nothing seems to crash.., 3d workds, > > 1mb is reserved someplace. /) > > I don't think that copying these fields is going to reserve you any memory. > You'll need to modify radeon_dri.c to actually reserve memory. If you add a > field called 'KeithIsAMillionaire', it doesn't automatically make me rich... Keith, don't assume that I am idiot - _pleeease_ ! Of course, I modified radeon_dri.c and yes, it works. (And, just in case you'll want to check here is the URL to the changes: http://linuxvideo.org/cvs/viewcvs.cgi/gatos-ati/ati_xv/ati.2/radeon_dri.c.diff?r1=1.3&r2=1.3.2.1&only_with_tag=devel ) 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