Need to make sure gfxoff is disallowed when we touch GC registers over MMIO.
Cc: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c index a57fe976cccaf..861d48b7fe9bc 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c @@ -1607,12 +1607,14 @@ static int sdma_v5_2_set_trap_irq_state(struct amdgpu_device *adev, u32 sdma_cntl; u32 reg_offset = sdma_v5_2_get_reg_offset(adev, type, mmSDMA0_CNTL); + amdgpu_gfx_off_ctrl(adev, false); if (!amdgpu_sriov_vf(adev)) { sdma_cntl = RREG32(reg_offset); sdma_cntl = REG_SET_FIELD(sdma_cntl, SDMA0_CNTL, TRAP_ENABLE, state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0); WREG32(reg_offset, sdma_cntl); } + amdgpu_gfx_off_ctrl(adev, true); return 0; } -- 2.52.0
