drm/amdgpu: Allocate GART table in RAM for AMD APU
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 29 Nov 2022 17:45:26 +0000 (12:45 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:51:06 +0000 (09:51 -0400)
commitc9a502e981a961053f3f873b14677d95e804251e
tree9c6cfd359ba98249e0242c21c2a92a41dbf7f744
parent34fd9d686772f6725242e900913ca2be987c12dd
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c