summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2022-11-29 20:45:26 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 16:51:06 +0300
commitc9a502e981a961053f3f873b14677d95e804251e (patch)
tree9c6cfd359ba98249e0242c21c2a92a41dbf7f744 /drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
parent34fd9d686772f6725242e900913ca2be987c12dd (diff)
downloadlinux-c9a502e981a961053f3f873b14677d95e804251e.tar.xz
drm/amdgpu: Allocate GART table in RAM for AMD APU
Some AMD APUs may not have a dedicated VRAM. On such platforms the GART table should be allocated on the system memory. When real vram size is zero, place the GART table in system memory and create an SG BO to make it GPU accessible. v2: fix includes Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> (rajneesh: removed set_memory_wc workaround) Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
index 8fea3e04e411..8283d682f543 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
@@ -51,6 +51,8 @@ struct amdgpu_gart {
uint64_t gart_pte_flags;
};
+int amdgpu_gart_table_ram_alloc(struct amdgpu_device *adev);
+void amdgpu_gart_table_ram_free(struct amdgpu_device *adev);
int amdgpu_gart_table_vram_alloc(struct amdgpu_device *adev);
void amdgpu_gart_table_vram_free(struct amdgpu_device *adev);
int amdgpu_gart_table_vram_pin(struct amdgpu_device *adev);