summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
diff options
context:
space:
mode:
authorOak Zeng <Oak.Zeng@amd.com>2021-01-26 13:51:36 -0600
committerAlex Deucher <alexander.deucher@amd.com>2021-03-23 22:58:52 -0400
commit2f055097daef498da57552f422f49de50a1573e6 (patch)
tree249fedc5161d6275c5df2f0d74d90c6f07433026 /drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
parent0c19cab5557202ba301190dc4772996daec537aa (diff)
drm/amdgpu: workaround the TMR MC address issue (v2)
With the 2-level gart page table, vram is squeezed into gart aperture and FB aperture is disabled. Therefore all VRAM virtual addresses are in the GART aperture. However currently PSP requires TMR addresses in FB aperture. So we need some design change at PSP FW level to support this 2-level gart table driver change. Right now this PSP FW support doesn't exist. To workaround this issue temporarily, FB aperture is added back and the gart aperture address is converted back to FB aperture for this PSP TMR address. Will revert it after we get a fix from PSP FW. v2: squash in tmr fix for other asics (Kevin) Signed-off-by: Oak Zeng <Oak.Zeng@amd.com> Reviewed-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_gmc.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
index d5f3825cd479..cd4592ff70ae 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
@@ -208,6 +208,15 @@ struct amdgpu_gmc {
*/
u64 fb_start;
u64 fb_end;
+ /* In the case of use GART table for vmid0 FB access, [fb_start, fb_end]
+ * will be squeezed to GART aperture. But we have a PSP FW issue to fix
+ * for now. To temporarily workaround the PSP FW issue, added below two
+ * variables to remember the original fb_start/end to re-enable FB
+ * aperture to workaround the PSP FW issue. Will delete it after we
+ * get a proper PSP FW fix.
+ */
+ u64 fb_start_original;
+ u64 fb_end_original;
unsigned vram_width;
u64 real_vram_size;
int vram_mtrr;