aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJammy Zhou2015-05-12 12:14:11 -0500
committerAlex Deucher2015-08-05 12:47:49 -0500
commit241cf6d1051718a481c61b469171a34c0ca718a4 (patch)
treec48cadc94b9b0286e859ba38068a408abc689fe3 /amdgpu/amdgpu_internal.h
parentdb126d1d8a764b9d3ad322779b13904867b14e5c (diff)
downloadexternal-libdrm-241cf6d1051718a481c61b469171a34c0ca718a4.tar.gz
external-libdrm-241cf6d1051718a481c61b469171a34c0ca718a4.tar.xz
external-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 @@
40#define ROUND_UP(x, y) ((((x)-1) | __round_mask(x, y))+1) 40#define ROUND_UP(x, y) ((((x)-1) | __round_mask(x, y))+1)
41#define ROUND_DOWN(x, y) ((x) & ~__round_mask(x, y)) 41#define ROUND_DOWN(x, y) ((x) & ~__round_mask(x, y))
42 42
43#define AMDGPU_INVALID_VA_ADDRESS 0xffffffffffffffff
44
43struct amdgpu_bo_va_hole { 45struct amdgpu_bo_va_hole {
44 struct list_head list; 46 struct list_head list;
45 uint64_t offset; 47 uint64_t offset;
@@ -49,6 +51,7 @@ struct amdgpu_bo_va_hole {
49struct amdgpu_bo_va_mgr { 51struct amdgpu_bo_va_mgr {
50 /* the start virtual address */ 52 /* the start virtual address */
51 uint64_t va_offset; 53 uint64_t va_offset;
54 uint64_t va_max;
52 struct list_head va_holes; 55 struct list_head va_holes;
53 pthread_mutex_t bo_va_mutex; 56 pthread_mutex_t bo_va_mutex;
54 uint32_t va_alignment; 57 uint32_t va_alignment;