From: Rex Zhu Date: Tue, 29 Dec 2015 03:19:14 +0000 (+0800) Subject: drm/amd/powerplay: enable set boot state task X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=018462d015c5672de0be8045b1acff19f5df6010;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/amd/powerplay: enable set boot state task Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c index f0700d077925..f0b449157653 100644 --- a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c +++ b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c @@ -74,7 +74,9 @@ int pem_task_power_down_asic(struct pp_eventmgr *eventmgr, struct pem_event_data int pem_task_set_boot_state(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) { - /* TODO */ + if (pem_is_event_data_valid(event_data->valid_fields, PEM_EventDataValid_RequestedStateID)) + return psm_set_states(eventmgr, &(event_data->requested_state_id)); + return 0; } @@ -343,7 +345,7 @@ int pem_task_disable_gfx_clock_gating(struct pp_eventmgr *eventmgr, struct pem_e int pem_task_set_performance_state(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) { if (pem_is_event_data_valid(event_data->valid_fields, PEM_EventDataValid_RequestedStateID)) - return psm_set_performance_states(eventmgr, &(event_data->requested_state_id)); + return psm_set_states(eventmgr, &(event_data->requested_state_id)); return 0; } diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c b/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c index 5740fbfcbeab..a46225c0fc01 100644 --- a/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c +++ b/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c @@ -62,7 +62,7 @@ int psm_get_state_by_classification(struct pp_eventmgr *eventmgr, enum PP_StateC return -1; } -int psm_set_performance_states(struct pp_eventmgr *eventmgr, unsigned long *state_id) +int psm_set_states(struct pp_eventmgr *eventmgr, unsigned long *state_id) { struct pp_power_state *state; int table_entries; @@ -82,7 +82,6 @@ int psm_set_performance_states(struct pp_eventmgr *eventmgr, unsigned long *stat return -1; } - int psm_adjust_power_state_dynamic(struct pp_eventmgr *eventmgr, bool skip) { diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/psm.h b/drivers/gpu/drm/amd/powerplay/eventmgr/psm.h index 1380470fdb1c..fbdff3e02aa3 100644 --- a/drivers/gpu/drm/amd/powerplay/eventmgr/psm.h +++ b/drivers/gpu/drm/amd/powerplay/eventmgr/psm.h @@ -31,7 +31,7 @@ int psm_get_ui_state(struct pp_eventmgr *eventmgr, enum PP_StateUILabel ui_label int psm_get_state_by_classification(struct pp_eventmgr *eventmgr, enum PP_StateClassificationFlag flag, unsigned long *state_id); -int psm_set_performance_states(struct pp_eventmgr *eventmgr, unsigned long *state_id); +int psm_set_states(struct pp_eventmgr *eventmgr, unsigned long *state_id); int psm_adjust_power_state_dynamic(struct pp_eventmgr *eventmgr, bool skip);