From 018462d015c5672de0be8045b1acff19f5df6010 Mon Sep 17 00:00:00 2001 From: Rex Zhu Date: Tue, 29 Dec 2015 11:19:14 +0800 Subject: [PATCH] drm/amd/powerplay: enable set boot state task Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 6 ++++-- drivers/gpu/drm/amd/powerplay/eventmgr/psm.c | 3 +-- drivers/gpu/drm/amd/powerplay/eventmgr/psm.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c index f0700d0..f0b4491 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 5740fbf..a46225c 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 1380470..fbdff3e 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); -- 2.7.4