summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/ci_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/ci_dpm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index 03809f1bcfd5..b1a4fbc22e69 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -5839,10 +5839,6 @@ static int ci_dpm_init(struct amdgpu_device *adev)
int ret;
u32 mask;
- ret = ci_dpm_init_microcode(adev);
- if (ret)
- return ret;
-
pi = kzalloc(sizeof(struct ci_power_info), GFP_KERNEL);
if (pi == NULL)
return -ENOMEM;
@@ -6224,6 +6220,10 @@ static int ci_dpm_sw_init(void *handle)
if (amdgpu_dpm == 0)
return 0;
+ ret = ci_dpm_init_microcode(adev);
+ if (ret)
+ return ret;
+
INIT_WORK(&adev->pm.dpm.thermal.work, amdgpu_dpm_thermal_work_handler);
mutex_lock(&adev->pm.mutex);
ret = ci_dpm_init(adev);