diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-05-15 11:51:30 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-05-20 19:56:05 +0200 |
commit | 029f41535ac5e07e1fa17ca963a9f9fd05fb665f (patch) | |
tree | 994b5e25e9c3c4e790728b9f266ea60758feb543 /drivers/gpu | |
parent | drm/amdgpu/gmc9: set vram_width properly for SR-IOV (diff) | |
download | linux-029f41535ac5e07e1fa17ca963a9f9fd05fb665f.tar.xz linux-029f41535ac5e07e1fa17ca963a9f9fd05fb665f.zip |
drm/amd/powerplay: fix locking in smu_feature_set_supported()
There is a typo so the code unlocks twice instead of taking the lock and
then releasing it.
Fixes: f14a323db5b0 ("drm/amd/powerplay: implement update enabled feature state to smc for smu11")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index c058c784180e..eec329ab6037 100644 --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c @@ -280,7 +280,7 @@ int smu_feature_set_supported(struct smu_context *smu, int feature_id, WARN_ON(feature_id > feature->feature_num); - mutex_unlock(&feature->mutex); + mutex_lock(&feature->mutex); if (enable) test_and_set_bit(feature_id, feature->supported); else |