drm/amd/powerplay: shutdown on HW CTF
To prevent further damage. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9495220577
commit
e528ccf932
@ -612,11 +612,17 @@ int phm_irq_process(struct amdgpu_device *adev,
|
|||||||
PCI_BUS_NUM(adev->pdev->devfn),
|
PCI_BUS_NUM(adev->pdev->devfn),
|
||||||
PCI_SLOT(adev->pdev->devfn),
|
PCI_SLOT(adev->pdev->devfn),
|
||||||
PCI_FUNC(adev->pdev->devfn));
|
PCI_FUNC(adev->pdev->devfn));
|
||||||
else if (src_id == VISLANDS30_IV_SRCID_GPIO_19)
|
else if (src_id == VISLANDS30_IV_SRCID_GPIO_19) {
|
||||||
pr_warn("GPU Critical Temperature Fault detected on PCIe %d:%d.%d!\n",
|
pr_warn("GPU Critical Temperature Fault detected on PCIe %d:%d.%d!\n",
|
||||||
PCI_BUS_NUM(adev->pdev->devfn),
|
PCI_BUS_NUM(adev->pdev->devfn),
|
||||||
PCI_SLOT(adev->pdev->devfn),
|
PCI_SLOT(adev->pdev->devfn),
|
||||||
PCI_FUNC(adev->pdev->devfn));
|
PCI_FUNC(adev->pdev->devfn));
|
||||||
|
/*
|
||||||
|
* HW CTF just occurred. Shutdown to prevent further damage.
|
||||||
|
*/
|
||||||
|
dev_emerg(adev->dev, "System is going to shutdown due to HW CTF!\n");
|
||||||
|
orderly_poweroff(true);
|
||||||
|
}
|
||||||
} else if (client_id == SOC15_IH_CLIENTID_THM) {
|
} else if (client_id == SOC15_IH_CLIENTID_THM) {
|
||||||
if (src_id == 0) {
|
if (src_id == 0) {
|
||||||
pr_warn("GPU over temperature range detected on PCIe %d:%d.%d!\n",
|
pr_warn("GPU over temperature range detected on PCIe %d:%d.%d!\n",
|
||||||
@ -634,11 +640,17 @@ int phm_irq_process(struct amdgpu_device *adev,
|
|||||||
PCI_BUS_NUM(adev->pdev->devfn),
|
PCI_BUS_NUM(adev->pdev->devfn),
|
||||||
PCI_SLOT(adev->pdev->devfn),
|
PCI_SLOT(adev->pdev->devfn),
|
||||||
PCI_FUNC(adev->pdev->devfn));
|
PCI_FUNC(adev->pdev->devfn));
|
||||||
} else if (client_id == SOC15_IH_CLIENTID_ROM_SMUIO)
|
} else if (client_id == SOC15_IH_CLIENTID_ROM_SMUIO) {
|
||||||
pr_warn("GPU Critical Temperature Fault detected on PCIe %d:%d.%d!\n",
|
pr_warn("GPU Critical Temperature Fault detected on PCIe %d:%d.%d!\n",
|
||||||
PCI_BUS_NUM(adev->pdev->devfn),
|
PCI_BUS_NUM(adev->pdev->devfn),
|
||||||
PCI_SLOT(adev->pdev->devfn),
|
PCI_SLOT(adev->pdev->devfn),
|
||||||
PCI_FUNC(adev->pdev->devfn));
|
PCI_FUNC(adev->pdev->devfn));
|
||||||
|
/*
|
||||||
|
* HW CTF just occurred. Shutdown to prevent further damage.
|
||||||
|
*/
|
||||||
|
dev_emerg(adev->dev, "System is going to shutdown due to HW CTF!\n");
|
||||||
|
orderly_poweroff(true);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1548,6 +1548,8 @@ static int smu_v11_0_ack_ac_dc_interrupt(struct smu_context *smu)
|
|||||||
#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_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 */
|
#define THM_11_0__SRCID__THM_DIG_THERM_H2L 1 /* ASIC_TEMP < CG_THERMAL_INT.DIG_THERM_INTL */
|
||||||
|
|
||||||
|
#define SMUIO_11_0__SRCID__SMUIO_GPIO19 83
|
||||||
|
|
||||||
static int smu_v11_0_irq_process(struct amdgpu_device *adev,
|
static int smu_v11_0_irq_process(struct amdgpu_device *adev,
|
||||||
struct amdgpu_irq_src *source,
|
struct amdgpu_irq_src *source,
|
||||||
struct amdgpu_iv_entry *entry)
|
struct amdgpu_iv_entry *entry)
|
||||||
@ -1582,8 +1584,17 @@ static int smu_v11_0_irq_process(struct amdgpu_device *adev,
|
|||||||
PCI_SLOT(adev->pdev->devfn),
|
PCI_SLOT(adev->pdev->devfn),
|
||||||
PCI_FUNC(adev->pdev->devfn));
|
PCI_FUNC(adev->pdev->devfn));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else if (client_id == SOC15_IH_CLIENTID_ROM_SMUIO) {
|
||||||
|
pr_warn("GPU Critical Temperature Fault detected on PCIe %d:%d.%d!\n",
|
||||||
|
PCI_BUS_NUM(adev->pdev->devfn),
|
||||||
|
PCI_SLOT(adev->pdev->devfn),
|
||||||
|
PCI_FUNC(adev->pdev->devfn));
|
||||||
|
/*
|
||||||
|
* HW CTF just occurred. Shutdown to prevent further damage.
|
||||||
|
*/
|
||||||
|
dev_emerg(adev->dev, "System is going to shutdown due to HW CTF!\n");
|
||||||
|
orderly_poweroff(true);
|
||||||
} else if (client_id == SOC15_IH_CLIENTID_MP1) {
|
} else if (client_id == SOC15_IH_CLIENTID_MP1) {
|
||||||
if (src_id == 0xfe)
|
if (src_id == 0xfe)
|
||||||
smu_v11_0_ack_ac_dc_interrupt(&adev->smu);
|
smu_v11_0_ack_ac_dc_interrupt(&adev->smu);
|
||||||
@ -1626,6 +1637,13 @@ int smu_v11_0_register_irq_handler(struct smu_context *smu)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
/* Register CTF(GPIO_19) interrupt */
|
||||||
|
ret = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_ROM_SMUIO,
|
||||||
|
SMUIO_11_0__SRCID__SMUIO_GPIO19,
|
||||||
|
irq_src);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ret = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_MP1,
|
ret = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_MP1,
|
||||||
0xfe,
|
0xfe,
|
||||||
irq_src);
|
irq_src);
|
||||||
|
Loading…
Reference in New Issue
Block a user