summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
diff options
context:
space:
mode:
authorAmber Lin <Amber.Lin@amd.com>2018-02-27 18:01:59 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-02-28 23:38:46 +0300
commitf8f4b9a679e52298b14358db22c37a135e7086ec (patch)
treed832f1bc6717908756b81280b48d1c00e2b3f8b1 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
parent5d447f09b8d8346c64f4c952a67c61f7ce88d3c1 (diff)
downloadlinux-f8f4b9a679e52298b14358db22c37a135e7086ec.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
index 1e275c7b006b..d31491069f2f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
@@ -44,6 +44,7 @@ struct amdgpu_mman {
struct ttm_bo_device bdev;
bool mem_global_referenced;
bool initialized;
+ void __iomem *aper_base_kaddr;
#if defined(CONFIG_DEBUG_FS)
struct dentry *debugfs_entries[8];