drm/amdgpu/ttm: optimize vram access in amdgpu_ttm_access_memory()
authorKevin Wang <kevin1.wang@amd.com>
Fri, 16 Jul 2021 18:03:08 +0000 (14:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Jul 2021 18:03:29 +0000 (14:03 -0400)
commit03373e2be290e6169293bdfc34e313aae9fdef8b
treed4d038b29e2eab3dfb93a9cdb1dee27e14a36b71
parent5fb95aa73f3c8d847e7107f6eb19f59f15029d29
drm/amdgpu/ttm: optimize vram access in amdgpu_ttm_access_memory()

1. using vram aper to access vram if possible
2. avoid MM_INDEX/MM_DATA is not working when mmio protect feature is
enabled.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c