----------  Forwarded Message  ----------
Subject: Re: [Dri-devel] Using drm (fwd)
Date: Sat, 13 Oct 2001 16:42:59 -0600
From: Keith Whitwell <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]


> 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.

> 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.

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

-------------------------------------------------------

_________________________________________________________
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

Reply via email to