From: "monk.liu" <monk.liu@xxxxxxx> we don't support non-page-aligned cpu pointer anymore Signed-off-by: monk.liu <monk.liu@xxxxxxx> Reviewed-by: Christian König <christian.koenig@xxxxxxx> --- amdgpu/amdgpu_bo.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index 1a5a401..61db58c 100644 --- a/amdgpu/amdgpu_bo.c +++ b/amdgpu/amdgpu_bo.c @@ -537,17 +537,8 @@ int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev, int r; struct amdgpu_bo *bo; struct drm_amdgpu_gem_userptr args; - uintptr_t cpu0; - uint32_t ps, off; - memset(&args, 0, sizeof(args)); - ps = getpagesize(); - - cpu0 = ROUND_DOWN((uintptr_t)cpu, ps); - off = (uintptr_t)cpu - cpu0; - size = ROUND_UP(size + off, ps); - - args.addr = cpu0; + args.addr = cpu; args.flags = AMDGPU_GEM_USERPTR_ANONONLY | AMDGPU_GEM_USERPTR_REGISTER; args.size = size; r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_GEM_USERPTR, -- 2.1.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel