Skip to contentSkip to conversation

Revert "drm/amdgpu: drop runtime pm disablement quirk on several sienna cichlid cards"

PATCH In review Guchun Chen 3 participants 4 messages Sep 7, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "drm/amdgpu: drop runtime pm disablement quirk on several sienna cichlid cards"

This reverts commit e2994d23d8afa2fb465fdb8cf544b736f67ab8ba.

Frequent BACO enter/exit will cause EMI failure, so disable runtime PM on these server SKUs.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +13 -0
index 1369c25448dc..4f6473faaf24 100644
@@ -43,6 +43,17 @@
 #include "amdgpu_display.h"
 #include "amdgpu_ras.h"
 
+static void amdgpu_runtime_pm_quirk(struct amdgpu_device *adev)
+{
+	/*
+	 * Add below quirk on several sienna_cichlid cards to disable
+	 * runtime pm to fix EMI failures.
+	 */
+	if (((adev->pdev->device == 0x73A1) && (adev->pdev->revision == 0x00)) ||
+	    ((adev->pdev->device == 0x73BF) && (adev->pdev->revision == 0xCF)))
+		adev->pm.rpm_mode = AMDGPU_RUNPM_NONE;
+}
+
 void amdgpu_unregister_gpu_instance(struct amdgpu_device *adev)
 {
 	struct amdgpu_gpu_instance *gpu_instance;
@@ -176,6 +187,8 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
 			break;
 		}
 
+		amdgpu_runtime_pm_quirk(adev);
+
 		if (adev->pm.rpm_mode == AMDGPU_RUNPM_BACO)
 			dev_info(adev->dev, "Using BACO for runtime pm\n");
 	}
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Quoted 59 lines

-----Original Message-----
From: Chen, Guchun <[email protected]>
Sent: Wednesday, September 7, 2022 12:53 PM
To: [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>; Lazar, Lijo <[email protected]>; Quan, Evan <[email protected]>; Feng, Kenneth <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu: drop runtime pm disablement quirk on several sienna cichlid cards"

This reverts commit e2994d23d8afa2fb465fdb8cf544b736f67ab8ba.

Frequent BACO enter/exit will cause EMI failure, so disable runtime PM on these server SKUs.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +7 -0
index 1369c25448dc..4f6473faaf24 100644
@@ -43,6 +43,17 @@
 #include "amdgpu_display.h"
 #include "amdgpu_ras.h"
 
+static void amdgpu_runtime_pm_quirk(struct amdgpu_device *adev)
+{
+	/*
+	 * Add below quirk on several sienna_cichlid cards to disable
+	 * runtime pm to fix EMI failures.
+	 */
+	if (((adev->pdev->device == 0x73A1) && (adev->pdev->revision ==

0x00)) ||

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
+	    ((adev->pdev->device == 0x73BF) && (adev->pdev->revision ==

0xCF)))

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +5 -0
+		adev->pm.rpm_mode = AMDGPU_RUNPM_NONE;
+}
+
 void amdgpu_unregister_gpu_instance(struct amdgpu_device *adev)
 {
 	struct amdgpu_gpu_instance *gpu_instance;
@@ -176,6 +187,8 @@ int amdgpu_driver_load_kms(struct amdgpu_device
 *adev, unsigned long flags)
 			break;
 		}
 
+		amdgpu_runtime_pm_quirk(adev);
+
 		if (adev->pm.rpm_mode == AMDGPU_RUNPM_BACO)
 			dev_info(adev->dev, "Using BACO for runtime

pm\n");
}
--
2.25.1

#2 lore raw
In reply to Guchun Chen
Quoted 5 lines · Guchun Chen

This reverts commit e2994d23d8afa2fb465fdb8cf544b736f67ab8ba.

Frequent BACO enter/exit will cause EMI failure, so disable runtime PM on these server SKUs.

Apart from this, any BACO entry/exit in quick succession could cause the same failure. If BACO is used for reset in these SKUs, that also may not work.

Thanks,
Lijo

Quoted 37 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 +++++++++++++
  1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +13 -0
index 1369c25448dc..4f6473faaf24 100644
@@ -43,6 +43,17 @@
  #include "amdgpu_display.h"
  #include "amdgpu_ras.h"
 
+static void amdgpu_runtime_pm_quirk(struct amdgpu_device *adev)
+{
+	/*
+	 * Add below quirk on several sienna_cichlid cards to disable
+	 * runtime pm to fix EMI failures.
+	 */
+	if (((adev->pdev->device == 0x73A1) && (adev->pdev->revision == 0x00)) ||
+	    ((adev->pdev->device == 0x73BF) && (adev->pdev->revision == 0xCF)))
+		adev->pm.rpm_mode = AMDGPU_RUNPM_NONE;
+}
+
  void amdgpu_unregister_gpu_instance(struct amdgpu_device *adev)
  {
  	struct amdgpu_gpu_instance *gpu_instance;
@@ -176,6 +187,8 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
  			break;
  		}
 
+		amdgpu_runtime_pm_quirk(adev);
+
  		if (adev->pm.rpm_mode == AMDGPU_RUNPM_BACO)
  			dev_info(adev->dev, "Using BACO for runtime pm\n");
  	}
#3 lore raw

Good point. Looks we need to disable BACO entry/exit together, not limited to runtime PM. I will drop this revert and provide a new patch accordingly.

Regards,
Guchun

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, September 7, 2022 1:58 PM
To: Chen, Guchun <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>; Quan, Evan <[email protected]>; Feng, Kenneth <[email protected]>
Subject: Re: [PATCH] Revert "drm/amdgpu: drop runtime pm disablement quirk on several sienna cichlid cards"

Quoted 5 lines · Guchun Chen

This reverts commit e2994d23d8afa2fb465fdb8cf544b736f67ab8ba.

Frequent BACO enter/exit will cause EMI failure, so disable runtime PM on these server SKUs.

Apart from this, any BACO entry/exit in quick succession could cause the same failure. If BACO is used for reset in these SKUs, that also may not work.

Thanks,
Lijo

Quoted 36 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 +++++++++++++
  1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +9 -0
index 1369c25448dc..4f6473faaf24 100644
@@ -43,6 +43,17 @@
  #include "amdgpu_display.h"
  #include "amdgpu_ras.h"
 
+static void amdgpu_runtime_pm_quirk(struct amdgpu_device *adev) {
+	/*
+	 * Add below quirk on several sienna_cichlid cards to disable
+	 * runtime pm to fix EMI failures.
+	 */
+	if (((adev->pdev->device == 0x73A1) && (adev->pdev->revision == 0x00)) ||
+	    ((adev->pdev->device == 0x73BF) && (adev->pdev->revision == 0xCF)))
+		adev->pm.rpm_mode = AMDGPU_RUNPM_NONE; }
+
  void amdgpu_unregister_gpu_instance(struct amdgpu_device *adev)
  {
  	struct amdgpu_gpu_instance *gpu_instance; @@ -176,6 +187,8 @@ int 

amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
break;
}

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -0
+		amdgpu_runtime_pm_quirk(adev);
+
  		if (adev->pm.rpm_mode == AMDGPU_RUNPM_BACO)
  			dev_info(adev->dev, "Using BACO for runtime pm\n");
  	}