diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index e503ca13cccb..151a7066c90e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -956,6 +956,7 @@ u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo) | |||
956 | !amdgpu_ttm_is_bound(bo->tbo.ttm)); | 956 | !amdgpu_ttm_is_bound(bo->tbo.ttm)); |
957 | WARN_ON_ONCE(!ww_mutex_is_locked(&bo->tbo.resv->lock) && | 957 | WARN_ON_ONCE(!ww_mutex_is_locked(&bo->tbo.resv->lock) && |
958 | !bo->pin_count); | 958 | !bo->pin_count); |
959 | WARN_ON_ONCE(bo->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET); | ||
959 | 960 | ||
960 | return bo->tbo.offset; | 961 | return bo->tbo.offset; |
961 | } | 962 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index 3032c541ef0e..8255034d73eb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <drm/amdgpu_drm.h> | 31 | #include <drm/amdgpu_drm.h> |
32 | #include "amdgpu.h" | 32 | #include "amdgpu.h" |
33 | 33 | ||
34 | #define AMDGPU_BO_INVALID_OFFSET LONG_MAX | ||
35 | |||
34 | /** | 36 | /** |
35 | * amdgpu_mem_type_to_domain - return domain corresponding to mem_type | 37 | * amdgpu_mem_type_to_domain - return domain corresponding to mem_type |
36 | * @mem_type: ttm memory type | 38 | * @mem_type: ttm memory type |