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>
This commit is contained in:

committed by
Alex Deucher

parent
7e07834c12
commit
27eb1fa913
@@ -828,8 +828,8 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
|
||||
goto out_err4;
|
||||
}
|
||||
|
||||
dev_priv->tdev = ttm_object_device_init
|
||||
(dev_priv->mem_global_ref.object, 12, &vmw_prime_dmabuf_ops);
|
||||
dev_priv->tdev = ttm_object_device_init(&ttm_mem_glob, 12,
|
||||
&vmw_prime_dmabuf_ops);
|
||||
|
||||
if (unlikely(dev_priv->tdev == NULL)) {
|
||||
DRM_ERROR("Unable to initialize TTM object management.\n");
|
||||
|
Reference in New Issue
Block a user