Originally posted by sourcecodereader
View Post
Announcement
Collapse
No announcement yet.
current state of GEM vs. TTM?
Collapse
X
-
- Likes 1
-
Originally posted by sourcecodereader View PostA clearer way to express this question is: Do graphics cards which has VRAM act UMA'ish (hence still need the UMA related part of GEM, in addition to VRAM related part of TTM)?
Originally posted by sourcecodereader View PostI think GEM is limited to UMA (unified memory architecture). So, when --and only when-- it needs to deal with VRAM, it calls TTM. Hence it uses only a subset of TTM.
Originally posted by sourcecodereader View PostA question is: If a video card has VRAM, does it still need to access system memory to read/write data? For example, when its VRAM is full, will it start to use system memory? Or, do the graphics cards that have VRAM never use system memory?
There are arguably three areas of memory, not two :
1. dedicated video memory (or the carved-out equivalent in UMA)
2. GART memory (blocks of system memory mapped into a contiguous chunk by GPU or chipset hardware)
3. regular system memory
EDIT - fixed a typo (GART -> GEM)Last edited by bridgman; 27 December 2015, 06:42 PM.
- Likes 1
Leave a comment:
-
I think GEM is limited to UMA (unified memory architecture). So, when --and only when-- it needs to deal with VRAM, it calls TTM. Hence it uses only a subset of TTM.
A question is: If a video card has VRAM, does it still need to access system memory to read/write data? For example, when its VRAM is full, will it start to use system memory? Or, do the graphics cards that have VRAM never use system memory?
A clearer way to express this question is: Do graphics cards which has VRAM act UMA'ish (hence still need the UMA related part of GEM, in addition to VRAM related part of TTM)?
- Likes 1
Leave a comment:
-
Originally posted by sourcecodereader View PostDoes this mean that radeon first calls GEM, which then calls TTM, and it is TTM code which does the real job?
Why such a complicated arrangement?
1. the API
2. the backend memory manager implementation
In radeon (and nouveau and just about all the other kms drivers), we use the GEM API, but use TTM as the backend memory manager since the GEM backend does not adequately handle things like vram. You still need a backend regardless of what API you expose to userspace.
- Likes 1
Leave a comment:
-
Does this mean that radeon first calls GEM, which then calls TTM, and it is TTM code which does the real job?
Why such a complicated arrangement?
Leave a comment:
-
That was my understanding as well. Basically using a GEM wrapper on top of TTM.
Leave a comment:
-
AFAIK both radeon and nouveau essentially use a GEM API wrapped around the TTM memory manager. The actual GEM implementation was OK for IGP products using system memory for graphics, but TTM provided better support for discrete graphics with dedicated high speed video memory.
Something like that, anyways
- Likes 1
Leave a comment:
-
current state of GEM vs. TTM?
As far as I know, there are two competing graphics memory managers on linux: GEM vs. TTM.
Around 2008, a great controversy flared in different forums about the merits of respective ones. Judging from the posts, people were more GEMish.
We are in 2013 now and I just wonder about the results of the controversy. Which one the radeon drivers are using now?
Judging from my linux source tree, both are included and both are possible with radeon:
1) We have radeon_gem.c in the folder drivers/gpu/drm/radeon. We also have radeon_ttm.c in the same folder.
2) We have a huge ttm folder under gpu/drm, compared with only two tiny gem-related files: gpu/drm/drm_gem.c and gpu/drm/drm_gem_cma_helper.c
3) As far as headers go, there is a huge TTM folder under /include/drm, but the only GEM-related header file there is /include/drm/drm_gem_cma_helper.h. Some gem related header info is also included in drmP.h
My two questions are:
1) Can we say that the linux 3.8.6 source tree includes all the source code of TTM and GEM, and hence both are possible with radeon? If so, how do we choose between them? By some compiler options?
2) It seems that GEM is tiny compared with DRM. Is this correct?Tags: None
- Likes 1
Leave a comment: