Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10f950f6 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: fix locking in force performance level



Looks like a copy paste typo when we added powerplay
support.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 04ab3b76
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -157,6 +157,7 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
		mutex_lock(&adev->pm.mutex);
		mutex_lock(&adev->pm.mutex);
		if (adev->pm.dpm.thermal_active) {
		if (adev->pm.dpm.thermal_active) {
			count = -EINVAL;
			count = -EINVAL;
			mutex_unlock(&adev->pm.mutex);
			goto fail;
			goto fail;
		}
		}
		ret = amdgpu_dpm_force_performance_level(adev, level);
		ret = amdgpu_dpm_force_performance_level(adev, level);
@@ -167,8 +168,6 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
		mutex_unlock(&adev->pm.mutex);
		mutex_unlock(&adev->pm.mutex);
	}
	}
fail:
fail:
	mutex_unlock(&adev->pm.mutex);

	return count;
	return count;
}
}