GTT explanation request

Michel Dänzer michel at daenzer.net
Wed Oct 15 00:40:00 PDT 2014


On 14.10.2014 15:44, Адонай Элохим wrote:
>
> I'm tinkering around in radeon DRM code as a hobby so if you have a
> couple of minutes, could you explain, how GTT works for Radeon module?
> I've seen mentions of it here and there on the Internet, and tried to
> ping developers on IRC, but the overall picture is still unreachable
> for me.

GTT (or GART) is a mechanism for making physically non-contiguous pages 
of system RAM accessible to the GPU in a linear address range. This is 
achieved using a translation table (the TT in GTT) which maps the linear 
range addresses to physical (bus) addresses.

The linear address range is managed by TTM (same TT), the radeon driver 
just provides the radeon_ttm_backend_bind/unbind() hooks to it for 
binding the pages corresponding to a buffer object (BO) into the linear 
range and for unbinding them from it.


> I also looked through the code in radeon_object.c, radeon_ttm.c and
> radeon_gem.c. In my mind, the GEM and the TTM do the same thing, so
> why is there a need for GEM and TTM coupled?..

The functionalities of TTM and GEM are overlapping, but not identical. 
The radeon driver uses memory management functionality of TTM and 
userspace interface functionality of GEM.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer


More information about the dri-devel mailing list