]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Map all visible VRAM at startup
authorAmber Lin <Amber.Lin@amd.com>
Tue, 27 Feb 2018 15:01:59 +0000 (10:01 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 28 Feb 2018 20:38:46 +0000 (15:38 -0500)
commit6a461a970e8df54c052bf3904f2b53ffd0963c6d
treed832f1bc6717908756b81280b48d1c00e2b3f8b1
parentbd32279008d467ae50f1ff44a703842ba4c392bd
drm/amdgpu: Map all visible VRAM at startup

When using CPU to update page table, we need to kmap all the PDs/PTs after
they are allocated and that requires a TLB shot down on each CPU, which is
quite heavy.

Instead, we map the whole visible VRAM to a kernel address at once. Pages
can be obtained from the offset.

v2: move the mapping base from gmc to amdgpu_mman structure, and the
    implementation in amdgpu_ttm_* functions

Signed-off-by: Amber Lin <Amber.Lin@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
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h