summaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_memory.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-10-19 14:49:05 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-11-05 22:21:18 +0300
commit27eb1fa9130a98edd2b321d4dbce5c8b244ee7af (patch)
treeb94c90b1cec5a325161051012797155964ce0331 /include/drm/ttm/ttm_memory.h
parent7e07834c12b96214e95a473f7b14fc03b20e2e7a (diff)
downloadlinux-27eb1fa9130a98edd2b321d4dbce5c8b244ee7af.tar.xz
drm/ttm: use a static ttm_mem_global instance
As the name says we only need one global instance of ttm_mem_global. Drop all the driver initialization and just use a single exported instance which is initialized during BO global initialization. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/ttm/ttm_memory.h')
-rw-r--r--include/drm/ttm/ttm_memory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
index 737b5fed8003..3ff48a0a2d7b 100644
--- a/include/drm/ttm/ttm_memory.h
+++ b/include/drm/ttm/ttm_memory.h
@@ -63,7 +63,7 @@
#define TTM_MEM_MAX_ZONES 2
struct ttm_mem_zone;
-struct ttm_mem_global {
+extern struct ttm_mem_global {
struct kobject kobj;
struct ttm_bo_global *bo_glob;
struct workqueue_struct *swap_queue;
@@ -78,7 +78,7 @@ struct ttm_mem_global {
#else
struct ttm_mem_zone *zone_dma32;
#endif
-};
+} ttm_mem_glob;
extern int ttm_mem_global_init(struct ttm_mem_global *glob);
extern void ttm_mem_global_release(struct ttm_mem_global *glob);