Commit 9702d40d authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: add AMDGPU_BO_INVALID_OFFSET

An invalid offset to be used by custom VRAM/GGT manager when we
don't have an offset for an BO.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent aa29040b
...@@ -956,6 +956,7 @@ u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo) ...@@ -956,6 +956,7 @@ u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo)
!amdgpu_ttm_is_bound(bo->tbo.ttm)); !amdgpu_ttm_is_bound(bo->tbo.ttm));
WARN_ON_ONCE(!ww_mutex_is_locked(&bo->tbo.resv->lock) && WARN_ON_ONCE(!ww_mutex_is_locked(&bo->tbo.resv->lock) &&
!bo->pin_count); !bo->pin_count);
WARN_ON_ONCE(bo->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET);
return bo->tbo.offset; return bo->tbo.offset;
} }
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include <drm/amdgpu_drm.h> #include <drm/amdgpu_drm.h>
#include "amdgpu.h" #include "amdgpu.h"
#define AMDGPU_BO_INVALID_OFFSET LONG_MAX
/** /**
* amdgpu_mem_type_to_domain - return domain corresponding to mem_type * amdgpu_mem_type_to_domain - return domain corresponding to mem_type
* @mem_type: ttm memory type * @mem_type: ttm memory type
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment