Skip to content

Commit

Permalink
drm/amdgpu: stop loading firmware with pm.mutex locked
Browse files Browse the repository at this point in the history
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: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
  • Loading branch information
Christian König authored and Alex Deucher committed Jun 4, 2015
1 parent e176fe1 commit faad24c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/ci_dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit faad24c

Please sign in to comment.