]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/pm: drop unneeded dpm features disablement for SMU 13.0.4/11
authorTim Huang <tim.huang@amd.com>
Sat, 21 Jan 2023 02:35:04 +0000 (10:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:24 +0000 (11:28 +0100)
commit 1538709c9f1c207d30afd95ea41b3aeb973f67e7 upstream.

PMFW will handle the features disablement properly for gpu reset case,
driver involvement may cause some unexpected issues.

Cc: stable@vger.kernel.org # 6.1
Signed-off-by: Tim Huang <tim.huang@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

index 2875f6bc3a6a2d229420aa9db64445eb7d104ba0..ed36088ebcfde1c19e735b47d2d669212cd0e910 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.