Commit 064d9243 authored by Tim Huang's avatar Tim Huang Committed by Alex Deucher

drm/amd/pm: avoid to load smu firmware for APUs

Certain call paths still load the SMU firmware for APUs,
which needs to be skipped.
Signed-off-by: default avatarTim Huang <Tim.Huang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 78347b65
...@@ -7324,11 +7324,9 @@ static int gfx_v10_0_hw_init(void *handle) ...@@ -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 * loaded firstly, so in direct type, it has to load smc ucode
* here before rlc. * here before rlc.
*/ */
if (!(adev->flags & AMD_IS_APU)) { r = amdgpu_pm_load_smu_firmware(adev, NULL);
r = amdgpu_pm_load_smu_firmware(adev, NULL); if (r)
if (r) return r;
return r;
}
gfx_v10_0_disable_gpa_mode(adev); gfx_v10_0_disable_gpa_mode(adev);
} }
......
...@@ -4558,11 +4558,9 @@ static int gfx_v11_0_hw_init(void *handle) ...@@ -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 * loaded firstly, so in direct type, it has to load smc ucode
* here before rlc. * here before rlc.
*/ */
if (!(adev->flags & AMD_IS_APU)) { r = amdgpu_pm_load_smu_firmware(adev, NULL);
r = amdgpu_pm_load_smu_firmware(adev, NULL); if (r)
if (r) return r;
return r;
}
} }
gfx_v11_0_constants_init(adev); gfx_v11_0_constants_init(adev);
......
...@@ -3306,11 +3306,9 @@ static int gfx_v12_0_hw_init(void *handle) ...@@ -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 * loaded firstly, so in direct type, it has to load smc ucode
* here before rlc. * here before rlc.
*/ */
if (!(adev->flags & AMD_IS_APU)) { r = amdgpu_pm_load_smu_firmware(adev, NULL);
r = amdgpu_pm_load_smu_firmware(adev, NULL); if (r)
if (r) return r;
return r;
}
} }
gfx_v12_0_constants_init(adev); gfx_v12_0_constants_init(adev);
......
...@@ -618,7 +618,7 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio ...@@ -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; const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
int r = 0; int r = 0;
if (!pp_funcs || !pp_funcs->load_firmware) if (!pp_funcs || !pp_funcs->load_firmware || adev->flags & AMD_IS_APU)
return 0; return 0;
mutex_lock(&adev->pm.mutex); mutex_lock(&adev->pm.mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment