提交 191caba6 编写于 作者: C Christian König 提交者: Alex Deucher

drm/amdgpu: add warning to amdgpu_bo_gpu_offset() v2

Check if there really is a valid offset for the BO.

v2: user WARN_ON_ONCE
Signed-off-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 4d42fa49
...@@ -96,6 +96,7 @@ static inline void amdgpu_bo_unreserve(struct amdgpu_bo *bo) ...@@ -96,6 +96,7 @@ static inline void amdgpu_bo_unreserve(struct amdgpu_bo *bo)
*/ */
static inline u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo) static inline u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo)
{ {
WARN_ON_ONCE(bo->tbo.mem.mem_type == TTM_PL_SYSTEM);
return bo->tbo.offset; return bo->tbo.offset;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册