Skip to content

Commit

Permalink
drm/amd/powerplay: fix bug dpm level unexpectly be reset to auto.
Browse files Browse the repository at this point in the history
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Rex Zhu authored and Alex Deucher committed Jan 27, 2017
1 parent e5d03ac commit 0d12570
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@
int pem_task_update_allowed_performance_levels(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
{

if (eventmgr == NULL || eventmgr->hwmgr == NULL)
return -EINVAL;

if (pem_is_hw_access_blocked(eventmgr))
return 0;

phm_force_dpm_levels(eventmgr->hwmgr, AMD_DPM_FORCED_LEVEL_AUTO);
phm_force_dpm_levels(eventmgr->hwmgr, eventmgr->hwmgr->dpm_level);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
hwmgr->usec_timeout = AMD_MAX_USEC_TIMEOUT;
hwmgr->power_source = PP_PowerSource_AC;
hwmgr->pp_table_version = PP_TABLE_V1;

hwmgr->dpm_level = AMD_DPM_FORCED_LEVEL_AUTO;
hwmgr_init_default_caps(hwmgr);
hwmgr_set_user_specify_caps(hwmgr);

Expand Down

0 comments on commit 0d12570

Please sign in to comment.