From: Yifan Zha Date: Wed, 17 Aug 2022 09:25:15 +0000 (+0800) Subject: drm/amdgpu: Use RLCG to program GRBM_GFX_CNTL during full access time X-Git-Tag: v6.1-rc1~159^2~15^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbb860d46fcbde5881c93ed549445a85f2434a64;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: Use RLCG to program GRBM_GFX_CNTL during full access time [Why] KIQ register init requires GRBM_GFX_CNTL to select KIQ. [How] As RLCG accessing registers will save the data of GRBM_GFX_CNTL and restore it. Use RLCG indirect accessing register method to select grbm instead of mmio directly access. Acked-by: Christian König Signed-off-by: Yifan Zha Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 54bce19a52ec0..47ef671543b34 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc21.c +++ b/drivers/gpu/drm/amd/amdgpu/soc21.c @@ -179,7 +179,7 @@ void soc21_grbm_select(struct amdgpu_device *adev, grbm_gfx_cntl = REG_SET_FIELD(grbm_gfx_cntl, GRBM_GFX_CNTL, VMID, vmid); grbm_gfx_cntl = REG_SET_FIELD(grbm_gfx_cntl, GRBM_GFX_CNTL, QUEUEID, queue); - WREG32(SOC15_REG_OFFSET(GC, 0, regGRBM_GFX_CNTL), grbm_gfx_cntl); + WREG32_SOC15(GC, 0, regGRBM_GFX_CNTL, grbm_gfx_cntl); } static void soc21_vga_set_state(struct amdgpu_device *adev, bool state)