drm/amdgpu: fix amdgpu_bo_gpu_accessible()
The test was relaxed a bit to much. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-and-Tested-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
0a096fb66a
commit
9d63c03444
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user