diff options
author | monk.liu <monk.liu@amd.com> | 2015-04-23 13:18:59 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-05 13:47:48 -0400 |
commit | 2f2c8ac0f4507474ac332fa33afcb8ccfeeb3938 (patch) | |
tree | 50c74ec6a39dce3cb81e06983203af29ab54066d /amdgpu/amdgpu_internal.h | |
parent | 3c5fe78801dbadc82cc25f4a63a983fea15d938b (diff) | |
download | libdrm-2f2c8ac0f4507474ac332fa33afcb8ccfeeb3938.tar.gz libdrm-2f2c8ac0f4507474ac332fa33afcb8ccfeeb3938.tar.bz2 libdrm-2f2c8ac0f4507474ac332fa33afcb8ccfeeb3938.zip |
amdgpu: support non-page-aligned userptr
Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_internal.h')
-rw-r--r-- | amdgpu/amdgpu_internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h index 8346f16b..19bc7e18 100644 --- a/amdgpu/amdgpu_internal.h +++ b/amdgpu/amdgpu_internal.h @@ -35,6 +35,9 @@ #include "util_double_list.h" #define AMDGPU_CS_MAX_RINGS 8 +/* do not use below macro if b is not power of 2 aligned value */ +#define ROUND_DOWN(a,b) ((a) & (~((b)-1))) +#define ROUND_UP(a,b) (((a)+((b)-1)) & (~((b)-1))) struct amdgpu_bo_va_hole { struct list_head list; |