summaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_bo_driver.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-10-19 13:49:05 +0200
committerAlex Deucher <alexander.deucher@amd.com>2018-11-05 14:21:18 -0500
commit27eb1fa9130a98edd2b321d4dbce5c8b244ee7af (patch)
treeb94c90b1cec5a325161051012797155964ce0331 /include/drm/ttm/ttm_bo_driver.h
parent7e07834c12b96214e95a473f7b14fc03b20e2e7a (diff)
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_bo_driver.h')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index c6ee07d10281..4ae6fc33f761 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -570,8 +570,7 @@ void ttm_bo_mem_put_locked(struct ttm_buffer_object *bo,
struct ttm_mem_reg *mem);
void ttm_bo_global_release(struct ttm_bo_global *glob);
-int ttm_bo_global_init(struct ttm_bo_global *glob,
- struct ttm_mem_global *mem_glob);
+int ttm_bo_global_init(struct ttm_bo_global *glob);
int ttm_bo_device_release(struct ttm_bo_device *bdev);
@@ -895,7 +894,6 @@ extern const struct ttm_mem_type_manager_func ttm_bo_manager_func;
struct ttm_bo_global_ref {
struct drm_global_reference ref;
- struct ttm_mem_global *mem_glob;
};
/**
@@ -909,9 +907,7 @@ struct ttm_bo_global_ref {
*/
static inline int ttm_bo_global_ref_init(struct drm_global_reference *ref)
{
- struct ttm_bo_global_ref *bo_ref =
- container_of(ref, struct ttm_bo_global_ref, ref);
- return ttm_bo_global_init(ref->object, bo_ref->mem_glob);
+ return ttm_bo_global_init(ref->object);
}
/**