On 3/5/07, Phillip Ezolt <[EMAIL PROTECTED]> wrote:
Dave,
On 3/4/07, Dave Airlie <[EMAIL PROTECTED]> wrote:
>
>
> >> only enough to map 512k... (Also, the addresses are stored in big
> endian.. I
> >> think.) I might be interesting to actually look at what is in these
> >> addresses.
> >
> > That mght make sense on your card as you have actual RAM, the GART is
> > allocated dynamically by fglrx, so if you use a 3D app I'd expect some
> of
> > that RAM to start getting used for things..
>
> Have you done this yet? I'd be interested in finding out how the entries
>
> in the table map to memory space.. there are two mappings types sso far,
> PCI and PCIE... PCI is just the bus addres, PCIE is bus address >> 8 |
> 0xc.. mayhaps we need another one..
Dave,
Ok. I ran a 3-d app (nexuiz) and captured the state of the GART table at
each point.
Before:
0000000: 0cd0c931 0c503032 0c802732 0c302832 ...1.P02..'2.0(2
0000010: 0c702832 0c20d408 0cb05832 0cc0b40f .p(2. ....X2....
....
0001cf0: 0cd01330 0c60be04 0cd0a736 0ce0010c ...0.`.....6....
0001d00: 00000000 00000000 00000000 00000000 ................
0001d10: 00000000 00000000 00000000 00000000 ................
...
During:
0000000: 0cd0c931 0c503032 0c802732 0c302832 ...1.P02..'2.0(2
0000010: 0c702832 0c20d408 0cb05832 0cc0b40f .p(2. ....X2....
...
0001cf0: 0cd01330 0c60be04 0cd0a736 0ce0010c ...0.`.....6....
0001d00: 0cd0e715 0c00b30a 0c60e216 0c60c132 .........`...`.2
0001d10: 0cf0092c 0cb02b36 0c503d31 0cf0e715 ...,..+6.P=1....
...
0002200: 00000000 00000000 00000000 00000000 ................
0002210: 00000000 00000000 00000000 00000000 ................
....
After:
0000000: 0cd0c931 0c503032 0c802732 0c302832 ...1.P02..'2.0(2
0000010: 0c702832 0c20d408 0cb05832 0cc0b40f .p(2. ....X2....
0000020: 0c50e508 0cb06e10 0ca07610 0cc0600c .P....n...v...`.
....
0001cf0: 0cd01330 0c60be04 0cd0a736 0ce0010c ...0.`.....6....
0001d00: 0c000000 0c000000 0c000000 0c000000 ................
0001d10: 0c000000 0c000000 0c000000 0c000000 ................
0001d20: 0c000000 0c000000 0c000000 0c000000 ................
...
00021f0: 0c000000 0c000000 0c000000 0c000000 ................
0002200: 00000000 00000000 00000000 00000000 ................
0002210: 00000000 00000000 00000000 00000000 ................
....
Interesting things to notice:
1) The amount of GART table which is used increases during the usage of the
3-D app.
2) The valid-looking table entries ends with zeros.
My current guess is that that size of the table is ALWAYS the same, and is
based on the following write: write32 27ff2000 at 14c <- MC_AGP_LOCATION.
If the entries are 0 (or 0x0c0000000) the card treats that entry as invalid.
3) After the 3-d app is run, some of the 0x0s are set to 0x0c0000000.
So, probably the addresses are or'ed with 0xc at some point.
....
I need one more piece of data to try to figure out how the mapping really
takes place.
I have:
1) The location of the ring buffer according to the card: (0x58000000)
2) I have the virtual address of the ring buffer according to the X server.
3) Since, 0x58000000 is the first address beyond the framebuffer, I am
assuming that the first page of the ring buffer will be the first entry in
the GART table.
I just need to get the physical address of the first page of ring-buffer.
(Given the X server virtual address...) Does anyone have any good ideas for
that? (kgb is my current guess, but I would like to do something easier..)
Once I have that address, I should be able to figure out how the physical
address gets mangled and pushed into the GART table.
BTW. Things DO seem to be written to the GART table in little endian order..
however, the read-out seems to reverse things. (Ie, if I write things to
the table in big endian order, when I read it back it is flipped, and
doesn't match what I wrote..)
Cheers,
--Phil
Dave.
>
> --
> David Airlie, Software Engineer
> http://www.skynet.ie/~airlied <http://www.skynet.ie/%7Eairlied> /
> airlied at skynet.ie
> Linux kernel - DRI, VAX / pam_smb / ILUG
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel