summaryrefslogtreecommitdiff
path: root/amdgpu/amdgpu_internal.h
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-05-13 01:14:11 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-08-05 13:47:49 -0400
commit241cf6d1051718a481c61b469171a34c0ca718a4 (patch)
treec48cadc94b9b0286e859ba38068a408abc689fe3 /amdgpu/amdgpu_internal.h
parentdb126d1d8a764b9d3ad322779b13904867b14e5c (diff)
downloadlibdrm-241cf6d1051718a481c61b469171a34c0ca718a4.tar.gz
libdrm-241cf6d1051718a481c61b469171a34c0ca718a4.tar.bz2
libdrm-241cf6d1051718a481c61b469171a34c0ca718a4.zip
amdgpu: validate the upper limit of virtual address v2
Only 8GB virtual address space is used by default now v2: use -ENOSPC for the error case Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_internal.h')
-rw-r--r--amdgpu/amdgpu_internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index cc911c5b..7910d340 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -40,6 +40,8 @@
#define ROUND_UP(x, y) ((((x)-1) | __round_mask(x, y))+1)
#define ROUND_DOWN(x, y) ((x) & ~__round_mask(x, y))
+#define AMDGPU_INVALID_VA_ADDRESS 0xffffffffffffffff
+
struct amdgpu_bo_va_hole {
struct list_head list;
uint64_t offset;
@@ -49,6 +51,7 @@ struct amdgpu_bo_va_hole {
struct amdgpu_bo_va_mgr {
/* the start virtual address */
uint64_t va_offset;
+ uint64_t va_max;
struct list_head va_holes;
pthread_mutex_t bo_va_mutex;
uint32_t va_alignment;