drm/amd/powerplay: enable set boot state task
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 29 Dec 2015 03:19:14 +0000 (11:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Jan 2016 20:39:26 +0000 (15:39 -0500)
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>
drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c
drivers/gpu/drm/amd/powerplay/eventmgr/psm.c
drivers/gpu/drm/amd/powerplay/eventmgr/psm.h

index f0700d07792518699aefbe06f9f3625ac257ad26..f0b44915765324be50e92a62586c95c0f46bbe90 100644 (file)
@@ -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;
 }
index 5740fbfcbeabdf010be0533be04fc3aa9a5f8294..a46225c0fc012080105071fc4a1bf00cbc871c31 100644 (file)
@@ -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)
 {
 
index 1380470fdb1cd4f73b56cfc25f5c15db38619944..fbdff3e02aa396358161bad8d56b484727047c09 100644 (file)
@@ -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);