drm/amd/powerplay: fix a couple locking issues
We should return unlock on the error path in pp_dpm_dispatch_tasks()
and there is a double lock bug in pp_dpm_set_sclk_od().
Fixes: 2a5071056e
("drm/amd/powerplay: add global PowerPlay mutex.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
0f987cd0d7
commit
99147e6442
|
@ -493,8 +493,10 @@ static int pp_dpm_dispatch_tasks(void *handle, enum amd_pp_event event_id,
|
||||||
{
|
{
|
||||||
enum amd_pm_state_type ps;
|
enum amd_pm_state_type ps;
|
||||||
|
|
||||||
if (input == NULL)
|
if (input == NULL) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
ps = *(unsigned long *)input;
|
ps = *(unsigned long *)input;
|
||||||
|
|
||||||
data.requested_ui_label = power_state_convert(ps);
|
data.requested_ui_label = power_state_convert(ps);
|
||||||
|
|
Loading…
Reference in New Issue