Skip to contentSkip to conversation

drm/amdgpu/powerplay: fix locking typo

PATCH In review Alex Deucher 3 participants 3 messages Mar 31, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/powerplay: fix locking typo

Fixes 2a5071056e6a601e ("drm/amd/powerplay: add global PowerPlay mutex.")
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1 -1
index dfd4fe6..6f0ed07 100644
@@ -894,7 +894,7 @@ static int pp_dpm_set_sclk_od(void *handle, uint32_t value)
 
 	mutex_lock(&pp_handle->pp_lock);
 	ret = hwmgr->hwmgr_func->set_sclk_od(hwmgr, value);
-	mutex_lock(&pp_handle->pp_lock);
+	mutex_unlock(&pp_handle->pp_lock);
 	return ret;
 }
 
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1490972090-14071-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 31.03.2017 um 16:54 schrieb Alex Deucher:

Quoted 3 lines
Fixes 2a5071056e6a601e ("drm/amd/powerplay: add global PowerPlay mutex.")
Quoted 9 lines
---
  drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +0 -0
index dfd4fe6..6f0ed07 100644

drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_dpm_set_sclk_od(void *handle, uint32_t value) · line 900

Quoted 8 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1 -1
@@ -894,7 +894,7 @@ static int pp_dpm_set_sclk_od(void *handle, uint32_t value)
 
  	mutex_lock(&pp_handle->pp_lock);
  	ret = hwmgr->hwmgr_func->set_sclk_od(hwmgr, value);
-	mutex_lock(&pp_handle->pp_lock);
+	mutex_unlock(&pp_handle->pp_lock);
  	return ret;
  }
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 4bacb95f-7e64-022f-97a9-dd384892c2a0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

Reviewed-by
#4 lore raw
Quoted 24 lines · Christian König

Am 31.03.2017 um 16:54 schrieb Alex Deucher:

Quoted 4 lines
Fixes 2a5071056e6a601e ("drm/amd/powerplay: add global PowerPlay

mutex.")

Quoted 16 lines
---
  drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +1 -1
index dfd4fe6..6f0ed07 100644
@@ -894,7 +894,7 @@ static int pp_dpm_set_sclk_od(void *handle,
 uint32_t value)
        mutex_lock(&pp_handle->pp_lock);
      ret = hwmgr->hwmgr_func->set_sclk_od(hwmgr, value);
-    mutex_lock(&pp_handle->pp_lock);
+    mutex_unlock(&pp_handle->pp_lock);
      return ret;
Quoted 8 lines

drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_dpm_set_sclk_od(void *handle, · line 900

Quoted 2 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +0 -0
  }
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx