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>
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index 8346f16..19bc7e1 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;