diff options
| author | Christian König <[email protected]> | 2017-07-13 10:21:00 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-07-14 15:06:46 +0000 |
| commit | 9d63c03444ac92d6412fd72429478b81a8378de7 (patch) | |
| tree | a43f1be61b93941c29aab4b7325864e686a2800d /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
| parent | drm/amdgpu: map VM BOs for CPU based updates only once (diff) | |
| download | kernel-9d63c03444ac92d6412fd72429478b81a8378de7.tar.gz kernel-9d63c03444ac92d6412fd72429478b81a8378de7.zip | |
drm/amdgpu: fix amdgpu_bo_gpu_accessible()
The test was relaxed a bit to much.
Signed-off-by: Christian König <[email protected]>
Acked-by: Tom St Denis <[email protected]>
Reviewed-and-Tested-by: Roger He <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index 382485115b06..833b172a2c2a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h @@ -120,7 +120,11 @@ static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo) */ static inline bool amdgpu_bo_gpu_accessible(struct amdgpu_bo *bo) { - return bo->tbo.mem.mem_type != TTM_PL_SYSTEM; + switch (bo->tbo.mem.mem_type) { + case TTM_PL_TT: return amdgpu_ttm_is_bound(bo->tbo.ttm); + case TTM_PL_VRAM: return true; + default: return false; + } } int amdgpu_bo_create(struct amdgpu_device *adev, |
