drm/amdgpu/swsmu: add interrupt work handler for smu11 parts
We need to schedule the smu AC/DC interrupt ack to avoid
potentially sleeping if the smu message mutex is contended.
Fixes: e1188aacad
("drm/amdgpu/smu11: add support for SMU AC/DC interrupts")
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
1a8a763b21
commit
234676d6db
|
@ -280,5 +280,7 @@ int smu_v11_0_gfx_ulv_control(struct smu_context *smu,
|
|||
int smu_v11_0_deep_sleep_control(struct smu_context *smu,
|
||||
bool enablement);
|
||||
|
||||
void smu_v11_0_interrupt_work(struct smu_context *smu);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -2388,6 +2388,7 @@ static const struct pptable_funcs arcturus_ppt_funcs = {
|
|||
.gfx_ulv_control = smu_v11_0_gfx_ulv_control,
|
||||
.deep_sleep_control = smu_v11_0_deep_sleep_control,
|
||||
.get_fan_parameters = arcturus_get_fan_parameters,
|
||||
.interrupt_work = smu_v11_0_interrupt_work,
|
||||
};
|
||||
|
||||
void arcturus_set_ppt_funcs(struct smu_context *smu)
|
||||
|
|
|
@ -2755,6 +2755,7 @@ static const struct pptable_funcs navi10_ppt_funcs = {
|
|||
.deep_sleep_control = smu_v11_0_deep_sleep_control,
|
||||
.get_fan_parameters = navi10_get_fan_parameters,
|
||||
.post_init = navi10_post_smu_init,
|
||||
.interrupt_work = smu_v11_0_interrupt_work,
|
||||
};
|
||||
|
||||
void navi10_set_ppt_funcs(struct smu_context *smu)
|
||||
|
|
|
@ -2784,6 +2784,7 @@ static const struct pptable_funcs sienna_cichlid_ppt_funcs = {
|
|||
.gfx_ulv_control = smu_v11_0_gfx_ulv_control,
|
||||
.deep_sleep_control = smu_v11_0_deep_sleep_control,
|
||||
.get_fan_parameters = sienna_cichlid_get_fan_parameters,
|
||||
.interrupt_work = smu_v11_0_interrupt_work,
|
||||
};
|
||||
|
||||
void sienna_cichlid_set_ppt_funcs(struct smu_context *smu)
|
||||
|
|
|
@ -955,6 +955,12 @@ static int smu_v11_0_process_pending_interrupt(struct smu_context *smu)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void smu_v11_0_interrupt_work(struct smu_context *smu)
|
||||
{
|
||||
if (smu_v11_0_ack_ac_dc_interrupt(smu))
|
||||
dev_err(smu->adev->dev, "Ack AC/DC interrupt Failed!\n");
|
||||
}
|
||||
|
||||
int smu_v11_0_enable_thermal_alert(struct smu_context *smu)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -1320,11 +1326,11 @@ static int smu_v11_0_irq_process(struct amdgpu_device *adev,
|
|||
switch (ctxid) {
|
||||
case 0x3:
|
||||
dev_dbg(adev->dev, "Switched to AC mode!\n");
|
||||
smu_v11_0_ack_ac_dc_interrupt(&adev->smu);
|
||||
schedule_work(&smu->interrupt_work);
|
||||
break;
|
||||
case 0x4:
|
||||
dev_dbg(adev->dev, "Switched to DC mode!\n");
|
||||
smu_v11_0_ack_ac_dc_interrupt(&adev->smu);
|
||||
schedule_work(&smu->interrupt_work);
|
||||
break;
|
||||
case 0x7:
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue