Commit 27a468ea authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: unify the prompts on thermal interrupts

The prompts will contain pci address(segment/bus/port/function),
severity(warn or error) and some keywords(GPU, amdgpu). Also this
address the issue that pci bus retrieved by PCI_BUS_NUM(adev->pdev->devfn)
is wrong.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fa63ed81
...@@ -597,58 +597,40 @@ int phm_irq_process(struct amdgpu_device *adev, ...@@ -597,58 +597,40 @@ int phm_irq_process(struct amdgpu_device *adev,
if (client_id == AMDGPU_IRQ_CLIENTID_LEGACY) { if (client_id == AMDGPU_IRQ_CLIENTID_LEGACY) {
if (src_id == VISLANDS30_IV_SRCID_CG_TSS_THERMAL_LOW_TO_HIGH) { if (src_id == VISLANDS30_IV_SRCID_CG_TSS_THERMAL_LOW_TO_HIGH) {
pr_warn("GPU over temperature range detected on PCIe %d:%d.%d!\n", dev_emerg(adev->dev, "ERROR: GPU over temperature range(SW CTF) detected!\n");
PCI_BUS_NUM(adev->pdev->devfn),
PCI_SLOT(adev->pdev->devfn),
PCI_FUNC(adev->pdev->devfn));
/* /*
* SW CTF just occurred. * SW CTF just occurred.
* Try to do a graceful shutdown to prevent further damage. * Try to do a graceful shutdown to prevent further damage.
*/ */
dev_emerg(adev->dev, "System is going to shutdown due to SW CTF!\n"); dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
orderly_poweroff(true); orderly_poweroff(true);
} else if (src_id == VISLANDS30_IV_SRCID_CG_TSS_THERMAL_HIGH_TO_LOW) } else if (src_id == VISLANDS30_IV_SRCID_CG_TSS_THERMAL_HIGH_TO_LOW)
pr_warn("GPU under temperature range detected on PCIe %d:%d.%d!\n", dev_emerg(adev->dev, "ERROR: GPU under temperature range detected!\n");
PCI_BUS_NUM(adev->pdev->devfn),
PCI_SLOT(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", dev_emerg(adev->dev, "ERROR: GPU HW Critical Temperature Fault(aka CTF) detected!\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. * HW CTF just occurred. Shutdown to prevent further damage.
*/ */
dev_emerg(adev->dev, "System is going to shutdown due to HW CTF!\n"); dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU HW CTF!\n");
orderly_poweroff(true); 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", dev_emerg(adev->dev, "ERROR: GPU over temperature range(SW CTF) detected!\n");
PCI_BUS_NUM(adev->pdev->devfn),
PCI_SLOT(adev->pdev->devfn),
PCI_FUNC(adev->pdev->devfn));
/* /*
* SW CTF just occurred. * SW CTF just occurred.
* Try to do a graceful shutdown to prevent further damage. * Try to do a graceful shutdown to prevent further damage.
*/ */
dev_emerg(adev->dev, "System is going to shutdown due to SW CTF!\n"); dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
orderly_poweroff(true); orderly_poweroff(true);
} else } else
pr_warn("GPU under temperature range detected on PCIe %d:%d.%d!\n", dev_emerg(adev->dev, "ERROR: GPU under temperature range detected!\n");
PCI_BUS_NUM(adev->pdev->devfn),
PCI_SLOT(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", dev_emerg(adev->dev, "ERROR: GPU HW Critical Temperature Fault(aka CTF) detected!\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. * HW CTF just occurred. Shutdown to prevent further damage.
*/ */
dev_emerg(adev->dev, "System is going to shutdown due to HW CTF!\n"); dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU HW CTF!\n");
orderly_poweroff(true); orderly_poweroff(true);
} }
......
...@@ -1565,40 +1565,28 @@ static int smu_v11_0_irq_process(struct amdgpu_device *adev, ...@@ -1565,40 +1565,28 @@ static int smu_v11_0_irq_process(struct amdgpu_device *adev,
if (client_id == SOC15_IH_CLIENTID_THM) { if (client_id == SOC15_IH_CLIENTID_THM) {
switch (src_id) { switch (src_id) {
case THM_11_0__SRCID__THM_DIG_THERM_L2H: case THM_11_0__SRCID__THM_DIG_THERM_L2H:
pr_warn("GPU over temperature range detected on PCIe %d:%d.%d!\n", dev_emerg(adev->dev, "ERROR: GPU over temperature range(SW CTF) detected!\n");
PCI_BUS_NUM(adev->pdev->devfn),
PCI_SLOT(adev->pdev->devfn),
PCI_FUNC(adev->pdev->devfn));
/* /*
* SW CTF just occurred. * SW CTF just occurred.
* Try to do a graceful shutdown to prevent further damage. * Try to do a graceful shutdown to prevent further damage.
*/ */
dev_emerg(adev->dev, "System is going to shutdown due to SW CTF!\n"); dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
orderly_poweroff(true); orderly_poweroff(true);
break; break;
case THM_11_0__SRCID__THM_DIG_THERM_H2L: case THM_11_0__SRCID__THM_DIG_THERM_H2L:
pr_warn("GPU under temperature range detected on PCIe %d:%d.%d!\n", dev_emerg(adev->dev, "ERROR: GPU under temperature range detected\n");
PCI_BUS_NUM(adev->pdev->devfn),
PCI_SLOT(adev->pdev->devfn),
PCI_FUNC(adev->pdev->devfn));
break; break;
default: default:
pr_warn("GPU under temperature range unknown src id (%d), detected on PCIe %d:%d.%d!\n", dev_emerg(adev->dev, "ERROR: GPU under temperature range unknown src id (%d)\n",
src_id, src_id);
PCI_BUS_NUM(adev->pdev->devfn),
PCI_SLOT(adev->pdev->devfn),
PCI_FUNC(adev->pdev->devfn));
break; break;
} }
} 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", dev_emerg(adev->dev, "ERROR: GPU HW Critical Temperature Fault(aka CTF) detected!\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. * HW CTF just occurred. Shutdown to prevent further damage.
*/ */
dev_emerg(adev->dev, "System is going to shutdown due to HW CTF!\n"); dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU HW CTF!\n");
orderly_poweroff(true); 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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment