[PATCH 3/9] drm/amdgpu/gfx12: update mqd init for UQ

Shashank Sharma shashank.sharma at amd.com
Thu Nov 21 13:33:01 UTC 2024


From: Alex Deucher <alexander.deucher at amd.com>

Set the addresses for the UQ metadata.

V2: Fix lower address mask (Shashank)

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index 546ea709d43e..3a7532db9b8a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -2962,6 +2962,12 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,
 	/* active the queue */
 	mqd->cp_gfx_hqd_active = 1;
 
+	/* set gfx UQ items */
+	mqd->shadow_base_lo = prop->shadow_addr & 0xFFFFFFFC;
+	mqd->shadow_base_hi = upper_32_bits(prop->shadow_addr);
+	mqd->fw_work_area_base_lo = prop->csa_addr & 0xFFFFFFFC;
+	mqd->fw_work_area_base_hi = upper_32_bits(prop->csa_addr);
+
 	return 0;
 }
 
-- 
2.46.2



More information about the amd-gfx mailing list