drm/amdgpu: move more logic into amdgpu_vm_map_gart v3
authorChristian König <christian.koenig@amd.com>
Mon, 30 Nov 2015 12:26:07 +0000 (13:26 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Feb 2016 19:17:04 +0000 (14:17 -0500)
commitb07c9d2a73f4b956ee141005e7dfbada4e51c52c
tree862dad43a0ae4ed8a39149430894fdf6eb2071ef
parent599f434817c5cdf1af9fd9e7d4bef69bd0c02796
drm/amdgpu: move more logic into amdgpu_vm_map_gart v3

No need to duplicate that code over and over again. Also stop using the
flags to determine if we need to map the addresses.

v2: constify the pages_addr
v3: rebased, fix typo in commit message

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/cik_sdma.c
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c