amdgpu: drop address patching logics

we don't support non-page-aligned cpu pointer anymore

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
main
monk.liu 2015-08-25 16:53:07 +08:00 committed by Marek Olšák
parent 5198f2b2e6
commit 50386e09db
1 changed files with 1 additions and 10 deletions

View File

@ -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 = (uintptr_t)cpu;
args.flags = AMDGPU_GEM_USERPTR_ANONONLY | AMDGPU_GEM_USERPTR_REGISTER;
args.size = size;
r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_GEM_USERPTR,