]> www.infradead.org Git - nvme.git/commitdiff
drm/amd/pm: avoid to load smu firmware for APUs
authorTim Huang <Tim.Huang@amd.com>
Thu, 13 Jun 2024 02:34:13 +0000 (10:34 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Jul 2024 20:46:30 +0000 (16:46 -0400)
Certain call paths still load the SMU firmware for APUs,
which needs to be skipped.

Signed-off-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
drivers/gpu/drm/amd/pm/amdgpu_dpm.c

index a52c72739b4089f43a9e01186e64707be4833e06..4bc2abe97087b8ebad8f3ebf98863afb1e894134 100644 (file)
@@ -7324,11 +7324,9 @@ static int gfx_v10_0_hw_init(void *handle)
                 * loaded firstly, so in direct type, it has to load smc ucode
                 * here before rlc.
                 */
-               if (!(adev->flags & AMD_IS_APU)) {
-                       r = amdgpu_pm_load_smu_firmware(adev, NULL);
-                       if (r)
-                               return r;
-               }
+               r = amdgpu_pm_load_smu_firmware(adev, NULL);
+               if (r)
+                       return r;
                gfx_v10_0_disable_gpa_mode(adev);
        }
 
index 6228dd0450a70d1f062e79f7236d8ebdbada4fc1..4f57cf3dac4844450ba8ea86d08ae6d62beddb56 100644 (file)
@@ -4558,11 +4558,9 @@ static int gfx_v11_0_hw_init(void *handle)
                 * loaded firstly, so in direct type, it has to load smc ucode
                 * here before rlc.
                 */
-               if (!(adev->flags & AMD_IS_APU)) {
-                       r = amdgpu_pm_load_smu_firmware(adev, NULL);
-                       if (r)
-                               return r;
-               }
+               r = amdgpu_pm_load_smu_firmware(adev, NULL);
+               if (r)
+                       return r;
        }
 
        gfx_v11_0_constants_init(adev);
index ccb26f78252a5d57ded21d788b73f54e977f0dd1..40edda2c3003c665322c0169800d90013008ef47 100644 (file)
@@ -3306,11 +3306,9 @@ static int gfx_v12_0_hw_init(void *handle)
                 * loaded firstly, so in direct type, it has to load smc ucode
                 * here before rlc.
                 */
-               if (!(adev->flags & AMD_IS_APU)) {
-                       r = amdgpu_pm_load_smu_firmware(adev, NULL);
-                       if (r)
-                               return r;
-               }
+               r = amdgpu_pm_load_smu_firmware(adev, NULL);
+               if (r)
+                       return r;
        }
 
        gfx_v12_0_constants_init(adev);
index b3b5e7b74c85f2cf758bd7522a2e164e3c235608..a1b8a82d77cf9a8f138f2ec98ff9efd9ab26332b 100644 (file)
@@ -618,7 +618,7 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio
        const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
        int r = 0;
 
-       if (!pp_funcs || !pp_funcs->load_firmware)
+       if (!pp_funcs || !pp_funcs->load_firmware || adev->flags & AMD_IS_APU)
                return 0;
 
        mutex_lock(&adev->pm.mutex);