From 2f2c8ac0f4507474ac332fa33afcb8ccfeeb3938 Mon Sep 17 00:00:00 2001 From: monk.liu Date: Thu, 23 Apr 2015 13:18:59 +0800 Subject: amdgpu: support non-page-aligned userptr Signed-off-by: monk.liu Reviewed-by: Christian König Signed-off-by: Alex Deucher --- amdgpu/amdgpu_internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'amdgpu/amdgpu_internal.h') 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; -- cgit v1.2.3-54-g00ecf