From: Le Ma Date: Fri, 3 Feb 2023 06:38:33 +0000 (+0800) Subject: drm/amdgpu: enable context empty interrupt on sdma v4.4.2 X-Git-Tag: v6.5-rc1~153^2~7^2~442 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35ff4301ebc37bd45c18edae08afd2983dc9a338;p=thirdparty%2Flinux.git drm/amdgpu: enable context empty interrupt on sdma v4.4.2 With SDMA_CTNL.CTXEMPTY_INT_ENABLE set, the F32 clock can be gated when SDMA finishes all job and goes to idle. And no specific interrupt handling is required in driver. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c index 729e26a4a2e74..7aa26e716a2dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c @@ -890,6 +890,8 @@ static int sdma_v4_4_2_inst_start(struct amdgpu_device *adev, /* set utc l1 enable flag always to 1 */ temp = RREG32_SDMA(i, regSDMA_CNTL); temp = REG_SET_FIELD(temp, SDMA_CNTL, UTC_L1_ENABLE, 1); + /* enable context empty interrupt during initialization */ + temp = REG_SET_FIELD(temp, SDMA_CNTL, CTXEMPTY_INT_ENABLE, 1); WREG32_SDMA(i, regSDMA_CNTL, temp); if (!amdgpu_sriov_vf(adev)) {