Commit faad24cf authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: stop loading firmware with pm.mutex locked

Loading firmware is a rather complicated process, in the end we add a
dependency between the pm mutex and the mm semaphore which results in
a harmless but annoying error message.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarJammy Zhou <Jammy.Zhou@amd.com>
parent e176fe17
...@@ -5839,10 +5839,6 @@ static int ci_dpm_init(struct amdgpu_device *adev) ...@@ -5839,10 +5839,6 @@ static int ci_dpm_init(struct amdgpu_device *adev)
int ret; int ret;
u32 mask; u32 mask;
ret = ci_dpm_init_microcode(adev);
if (ret)
return ret;
pi = kzalloc(sizeof(struct ci_power_info), GFP_KERNEL); pi = kzalloc(sizeof(struct ci_power_info), GFP_KERNEL);
if (pi == NULL) if (pi == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -6224,6 +6220,10 @@ static int ci_dpm_sw_init(void *handle) ...@@ -6224,6 +6220,10 @@ static int ci_dpm_sw_init(void *handle)
if (amdgpu_dpm == 0) if (amdgpu_dpm == 0)
return 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); INIT_WORK(&adev->pm.dpm.thermal.work, amdgpu_dpm_thermal_work_handler);
mutex_lock(&adev->pm.mutex); mutex_lock(&adev->pm.mutex);
ret = ci_dpm_init(adev); ret = ci_dpm_init(adev);
......
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