[PATCH 8/8] drm/amdgpu/smu11: add support for SMU AC/DC interrupts
Quan, Evan
Evan.Quan at amd.com
Tue Mar 24 02:53:10 UTC 2020
I have no target to verify that. The only nv10 board on my hand has no dc/ac automatic switch support.
But it should be correct as windows uses the same client and source id per my confirmation.
Regards,
Evan
-----Original Message-----
From: Alex Deucher <alexdeucher at gmail.com>
Sent: Monday, March 23, 2020 10:47 PM
To: Quan, Evan <Evan.Quan at amd.com>
Cc: amd-gfx at lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher at amd.com>; mcoffin13 at gmail.com
Subject: Re: [PATCH 8/8] drm/amdgpu/smu11: add support for SMU AC/DC interrupts
On Sun, Mar 22, 2020 at 11:54 PM Quan, Evan <Evan.Quan at amd.com> wrote:
>
> Thanks Alex. The series is reviewed-by: Evan Quan <evan.quan at amd.com>
Thanks Evan. Can you verify that the client and source id are correct for the interrupt? I wasn't able to find them.
Alex
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Alex Deucher
> Sent: Saturday, March 21, 2020 2:27 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>;
> mcoffin13 at gmail.com
> Subject: [PATCH 8/8] drm/amdgpu/smu11: add support for SMU AC/DC
> interrupts
>
> Driver needs to send the ack message when it receives the AC/DC interrupt from the SMU.
>
> TODO: verify the client and src ids.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index 20174bed11ce..d19e1d0d56c0 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -1525,6 +1525,13 @@ int smu_v11_0_set_xgmi_pstate(struct smu_context *smu,
> return ret;
> }
>
> +static int smu_v11_0_ack_ac_dc_interrupt(struct smu_context *smu) {
> + return smu_send_smc_msg(smu,
> + SMU_MSG_ReenableAcDcInterrupt,
> + NULL); }
> +
> #define THM_11_0__SRCID__THM_DIG_THERM_L2H 0 /* ASIC_TEMP > CG_THERMAL_INT.DIG_THERM_INTH */
> #define THM_11_0__SRCID__THM_DIG_THERM_H2L 1 /* ASIC_TEMP < CG_THERMAL_INT.DIG_THERM_INTL */
>
> @@ -1558,6 +1565,9 @@ static int smu_v11_0_irq_process(struct amdgpu_device *adev,
> break;
>
> }
> + } else if (client_id == SOC15_IH_CLIENTID_MP1) {
> + if (src_id == 0xfe)
> + smu_v11_0_ack_ac_dc_interrupt(&adev->smu);
> }
>
> return 0;
> @@ -1597,6 +1607,12 @@ int smu_v11_0_register_irq_handler(struct smu_context *smu)
> if (ret)
> return ret;
>
> + ret = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_MP1,
> + 0xfe,
> + irq_src);
> + if (ret)
> + return ret;
> +
> return ret;
> }
>
> --
> 2.25.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CEv
> an.Quan%40amd.com%7C0738875d4cae44f1574908d7cf3907c6%7C3dd8961fe4884e6
> 08e11a82d994e183d%7C0%7C0%7C637205716159695922&sdata=Yct4d%2ByJkHL
> TXhL9ihK1jr65V8k2CJLlQrDGI4hjJx0%3D&reserved=0
More information about the amd-gfx
mailing list