drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11
authorjsg <jsg@openbsd.org>
Fri, 10 Feb 2023 14:43:15 +0000 (14:43 +0000)
committerjsg <jsg@openbsd.org>
Fri, 10 Feb 2023 14:43:15 +0000 (14:43 +0000)
From Tim Huang
91ef43f6b65b5aea03e71d70bb510efc61637ff6 in linux-6.1.y/6.1.11
1538709c9f1c207d30afd95ea41b3aeb973f67e7 in mainline linux

sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c

index aacc250..1e071db 100644 (file)
@@ -1498,6 +1498,20 @@ static int smu_disable_dpms(struct smu_context *smu)
                }
        }
 
+       /*
+        * For SMU 13.0.4/11, PMFW will handle the features disablement properly
+        * for gpu reset case. Driver involvement is unnecessary.
+        */
+       if (amdgpu_in_reset(adev)) {
+               switch (adev->ip_versions[MP1_HWIP][0]) {
+               case IP_VERSION(13, 0, 4):
+               case IP_VERSION(13, 0, 11):
+                       return 0;
+               default:
+                       break;
+               }
+       }
+
        /*
         * For gpu reset, runpm and hibernation through BACO,
         * BACO feature has to be kept enabled.