Skip to contentSkip to conversation

drm/amd/powerplay: remove the dpm checking in the boot sequence

PATCH In review Kenneth Feng 2 participants 2 messages Jul 22, 2020

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

PATCH 1/1 drm/amd/powerplay: remove the dpm checking in the boot sequence

It's not necessary to retrieve the power features status when the asic is booted up the first time. This patch can have the features enablement status still checked in suspend/resume case and removed from the first boot up sequence.

---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +1 -1
index f778b00e49eb..6b03f750e63b 100644
@@ -735,7 +735,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)
 	uint32_t pcie_gen = 0, pcie_width = 0;
 	int ret;
 
-	if (smu_is_dpm_running(smu) && adev->in_suspend) {
+	if (adev->in_suspend && smu_is_dpm_running(smu)) {
 		dev_info(adev->dev, "dpm has been enabled\n");
 		return 0;
 	}
Signature · 6 lines
2.17.1

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

Reviewed-by:
Kevin Wang <[email protected]>

Quoted 32 lines · 在 2020年7月22日,下午9:37,Kenneth Feng <[email protected]> 写道:

It's not necessary to retrieve the power features status when the asic is booted up the first time. This patch can have the features enablement status still checked in suspend/resume case and removed from the first boot up sequence.

---
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +1 -1
index f778b00e49eb..6b03f750e63b 100644
@@ -735,7 +735,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)
   uint32_t pcie_gen = 0, pcie_width = 0;
   int ret;
 
-    if (smu_is_dpm_running(smu) && adev->in_suspend) {
+    if (adev->in_suspend && smu_is_dpm_running(smu)) {
       dev_info(adev->dev, "dpm has been enabled\n");
       return 0;
   }
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CKevin1.Wang%40amd.com%7C03a3e81b66504da6163408d82e4457a9%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637310218355834517&amp;sdata=7isqyyB0267zcneJg5pRMdFbOId98XzAFFkRv1T9d0Y%3D&amp;reserved=0

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