Commit e0b71a7e authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/powerplay: Reload and initialize the smc firmware on powerplay resume.

Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a969e163
...@@ -203,13 +203,29 @@ static int pp_resume(void *handle) ...@@ -203,13 +203,29 @@ static int pp_resume(void *handle)
struct pp_instance *pp_handle; struct pp_instance *pp_handle;
struct pp_eventmgr *eventmgr; struct pp_eventmgr *eventmgr;
struct pem_event_data event_data = { {0} }; struct pem_event_data event_data = { {0} };
struct pp_smumgr *smumgr;
int ret;
if (handle == NULL) if (handle == NULL)
return -EINVAL; return -EINVAL;
pp_handle = (struct pp_instance *)handle; pp_handle = (struct pp_instance *)handle;
smumgr = pp_handle->smu_mgr;
if (smumgr == NULL || smumgr->smumgr_funcs == NULL ||
smumgr->smumgr_funcs->start_smu == NULL)
return -EINVAL;
ret = smumgr->smumgr_funcs->start_smu(smumgr);
if (ret) {
printk(KERN_ERR "[ powerplay ] smc start failed\n");
smumgr->smumgr_funcs->smu_fini(smumgr);
return ret;
}
eventmgr = pp_handle->eventmgr; eventmgr = pp_handle->eventmgr;
pem_handle_event(eventmgr, AMD_PP_EVENT_RESUME, &event_data); pem_handle_event(eventmgr, AMD_PP_EVENT_RESUME, &event_data);
return 0; return 0;
} }
...@@ -624,6 +640,7 @@ int amd_powerplay_display_configuration_change(void *handle, const void *input) ...@@ -624,6 +640,7 @@ int amd_powerplay_display_configuration_change(void *handle, const void *input)
hwmgr = ((struct pp_instance *)handle)->hwmgr; hwmgr = ((struct pp_instance *)handle)->hwmgr;
phm_store_dal_configuration_data(hwmgr, display_config); phm_store_dal_configuration_data(hwmgr, display_config);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment