diff options
| author | Christian König <[email protected]> | 2017-10-20 11:11:00 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-12-04 21:33:15 +0000 |
| commit | 5e91fb57eb6ac027dcdaec6ced32658ca2dcd3f0 (patch) | |
| tree | 3f0b8bafe2ce01fed37b3b1ebcdf5c8fa93809e4 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/amdgpu: retry init if it fails due to exclusive mode timeout (v3) (diff) | |
| download | kernel-5e91fb57eb6ac027dcdaec6ced32658ca2dcd3f0.tar.gz kernel-5e91fb57eb6ac027dcdaec6ced32658ca2dcd3f0.zip | |
drm/amdgpu: use the actual placement for pin accounting
This allows us to specify multiple possible placements again.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index c48fc450d99b..8a103303da3e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -697,6 +697,8 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain, } *gpu_addr = amdgpu_bo_gpu_offset(bo); } + + domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); if (domain == AMDGPU_GEM_DOMAIN_VRAM) { adev->vram_pin_size += amdgpu_bo_size(bo); if (bo->flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS) |
