Skip to contentSkip to conversation

drm/amdgpu: sw pstate switch should only be for vega20

PATCH In review Jonathan Kim 2 participants 3 messages Apr 24, 2020

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

PATCH 1/1 drm/amdgpu: sw pstate switch should only be for vega20

Driver steered p-state switching is designed for Vega20 only. Also simplify early return for temporary disable due to SMU FW bug.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +3 -1
index 54d8a3e7e75c..48c0ce13f68e 100644
@@ -395,7 +395,9 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
 	bool init_low = hive->pstate == AMDGPU_XGMI_PSTATE_UNKNOWN;
 
 	/* fw bug so temporarily disable pstate switching */
-	if (!hive || adev->asic_type == CHIP_VEGA20)
+	return 0;
+
+	if (!hive || adev->asic_type != CHIP_VEGA20)
 		return 0;
 
 	mutex_lock(&hive->hive_lock);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Am 2020-04-24 um 6:22 p.m. schrieb Jonathan Kim:

Quoted 5 lines

Driver steered p-state switching is designed for Vega20 only. Also simplify early return for temporary disable due to SMU FW bug.

I assume the early return would be qualified with a firmware version check once a firmware fix is available.

Quoted 9 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +0 -0
index 54d8a3e7e75c..48c0ce13f68e 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate) · line 403

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +3 -1
@@ -395,7 +395,9 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
 	bool init_low = hive->pstate == AMDGPU_XGMI_PSTATE_UNKNOWN;
 
 	/* fw bug so temporarily disable pstate switching */
-	if (!hive || adev->asic_type == CHIP_VEGA20)
+	return 0;
+
+	if (!hive || adev->asic_type != CHIP_VEGA20)
 		return 0;
 
 	mutex_lock(&hive->hive_lock);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author Reviewed-by Felix Kuehling
#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

Yes that is correct.

Thank you,

Jon

-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Friday, April 24, 2020 6:51 PM
To: Kim, Jonathan <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: sw pstate switch should only be for vega20

Am 2020-04-24 um 6:22 p.m. schrieb Jonathan Kim:

Quoted 4 lines

Driver steered p-state switching is designed for Vega20 only. Also simplify early return for temporary disable due to SMU FW bug.

I assume the early return would be qualified with a firmware version check once a firmware fix is available.

Quoted 10 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +0 -0
index 54d8a3e7e75c..48c0ce13f68e 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate) · line 403

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +3 -1
@@ -395,7 +395,9 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
 	bool init_low = hive->pstate == AMDGPU_XGMI_PSTATE_UNKNOWN;
 
 	/* fw bug so temporarily disable pstate switching */
-	if (!hive || adev->asic_type == CHIP_VEGA20)
+	return 0;
+
+	if (!hive || adev->asic_type != CHIP_VEGA20)
 		return 0;
 
 	mutex_lock(&hive->hive_lock);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx