diff options
author | Dave Airlie <airlied@redhat.com> | 2020-08-04 12:56:10 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-08-06 12:32:03 +1000 |
commit | 6c28aed6e5b7fa9538ad1a468e3dd5a94ebe5b19 (patch) | |
tree | 87cbb9c1dc8732cf1e8ba810d01ccc6b0a8697d8 /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | |
parent | 9eca33f4a13919bb17b8a02809a32f8299f5c9bf (diff) | |
download | linux-6c28aed6e5b7fa9538ad1a468e3dd5a94ebe5b19.tar.bz2 |
drm/amdgfx/ttm: use wrapper to get ttm memory managers
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-38-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index ad59ac4423b8..ba4d11e8a960 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -517,8 +517,9 @@ out_put: uint64_t amdgpu_amdkfd_get_vram_usage(struct kgd_dev *kgd) { struct amdgpu_device *adev = (struct amdgpu_device *)kgd; + struct ttm_mem_type_manager *vram_man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM); - return amdgpu_vram_mgr_usage(&adev->mman.bdev.man[TTM_PL_VRAM]); + return amdgpu_vram_mgr_usage(vram_man); } uint64_t amdgpu_amdkfd_get_hive_id(struct kgd_dev *kgd) |