diff options
author | Christian König <christian.koenig@amd.com> | 2021-08-30 10:22:06 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2022-01-26 17:29:24 +0300 |
commit | 3f268ef06f8cf3c481dbd5843d564f5170c6df54 (patch) | |
tree | 102bbd239b2a6faeb16b64c2faf83e2cbb915bac /drivers/gpu/drm/nouveau/nouveau_ttm.c | |
parent | de3688e469b08be958914674e8b01cb0cea42388 (diff) | |
download | linux-3f268ef06f8cf3c481dbd5843d564f5170c6df54.tar.xz |
drm/ttm: add back a reference to the bdev to the res manager
It is simply a lot cleaner to have this around instead of adding
the device throughout the call chain.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220124122514.1832-3-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_ttm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 91ef33f8f22c..85f1f5a0fe5d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -164,7 +164,7 @@ nouveau_ttm_init_vram(struct nouveau_drm *drm) man->func = &nouveau_vram_manager; - ttm_resource_manager_init(man, + ttm_resource_manager_init(man, &drm->ttm.bdev, drm->gem.vram_available >> PAGE_SHIFT); ttm_set_driver_manager(&drm->ttm.bdev, TTM_PL_VRAM, man); ttm_resource_manager_set_used(man, true); @@ -211,7 +211,7 @@ nouveau_ttm_init_gtt(struct nouveau_drm *drm) man->func = func; man->use_tt = true; - ttm_resource_manager_init(man, size_pages); + ttm_resource_manager_init(man, &drm->ttm.bdev, size_pages); ttm_set_driver_manager(&drm->ttm.bdev, TTM_PL_TT, man); ttm_resource_manager_set_used(man, true); return 0; |