drm/exynos: Stop using drm_framebuffer_unregister_private
[linux/fpc-iii.git] / drivers / gpu / drm / amd / powerplay / eventmgr / eventsubchains.c
blob9ef2d90e28869f7a6058eb7a1f9771241bb7fc9d
1 /*
2 * Copyright 2015 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
24 #include "eventmgr.h"
25 #include "eventsubchains.h"
26 #include "eventtasks.h"
27 #include "hardwaremanager.h"
29 const pem_event_action reset_display_phy_access_tasks[] = {
30 pem_task_reset_display_phys_access,
31 NULL
34 const pem_event_action broadcast_power_policy_tasks[] = {
35 /* PEM_Task_BroadcastPowerPolicyChange, */
36 NULL
39 const pem_event_action unregister_interrupt_tasks[] = {
40 pem_task_unregister_interrupts,
41 NULL
44 /* Disable GFX Voltage Islands Power Gating */
45 const pem_event_action disable_gfx_voltage_island_powergating_tasks[] = {
46 pem_task_disable_voltage_island_power_gating,
47 NULL
50 const pem_event_action disable_gfx_clockgating_tasks[] = {
51 pem_task_disable_gfx_clock_gating,
52 NULL
55 const pem_event_action block_adjust_power_state_tasks[] = {
56 pem_task_block_adjust_power_state,
57 NULL
61 const pem_event_action unblock_adjust_power_state_tasks[] = {
62 pem_task_unblock_adjust_power_state,
63 NULL
66 const pem_event_action set_performance_state_tasks[] = {
67 pem_task_set_performance_state,
68 NULL
71 const pem_event_action get_2d_performance_state_tasks[] = {
72 pem_task_get_2D_performance_state_id,
73 NULL
76 const pem_event_action conditionally_force3D_performance_state_tasks[] = {
77 pem_task_conditionally_force_3d_performance_state,
78 NULL
81 const pem_event_action process_vbios_eventinfo_tasks[] = {
82 /* PEM_Task_ProcessVbiosEventInfo,*/
83 NULL
86 const pem_event_action enable_dynamic_state_management_tasks[] = {
87 /* PEM_Task_ResetBAPMPolicyChangedFlag,*/
88 pem_task_get_boot_state_id,
89 pem_task_enable_dynamic_state_management,
90 pem_task_register_interrupts,
91 NULL
94 const pem_event_action enable_clock_power_gatings_tasks[] = {
95 pem_task_enable_clock_power_gatings_tasks,
96 pem_task_powerdown_uvd_tasks,
97 pem_task_powerdown_vce_tasks,
98 NULL
101 const pem_event_action setup_asic_tasks[] = {
102 pem_task_setup_asic,
103 NULL
106 const pem_event_action power_budget_tasks[] = {
107 /* TODO
108 * PEM_Task_PowerBudgetWaiverAvailable,
109 * PEM_Task_PowerBudgetWarningMessage,
110 * PEM_Task_PruneStatesBasedOnPowerBudget,
112 NULL
115 const pem_event_action system_config_tasks[] = {
116 /* PEM_Task_PruneStatesBasedOnSystemConfig,*/
117 NULL
121 const pem_event_action conditionally_force_3d_performance_state_tasks[] = {
122 pem_task_conditionally_force_3d_performance_state,
123 NULL
126 const pem_event_action ungate_all_display_phys_tasks[] = {
127 /* PEM_Task_GetDisplayPhyAccessInfo */
128 NULL
131 const pem_event_action uninitialize_display_phy_access_tasks[] = {
132 /* PEM_Task_UninitializeDisplayPhysAccess, */
133 NULL
136 const pem_event_action disable_gfx_voltage_island_power_gating_tasks[] = {
137 /* PEM_Task_DisableVoltageIslandPowerGating, */
138 NULL
141 const pem_event_action disable_gfx_clock_gating_tasks[] = {
142 pem_task_disable_gfx_clock_gating,
143 NULL
146 const pem_event_action set_boot_state_tasks[] = {
147 pem_task_get_boot_state_id,
148 pem_task_set_boot_state,
149 NULL
152 const pem_event_action adjust_power_state_tasks[] = {
153 pem_task_notify_hw_mgr_display_configuration_change,
154 pem_task_adjust_power_state,
155 pem_task_notify_smc_display_config_after_power_state_adjustment,
156 pem_task_update_allowed_performance_levels,
157 /* to do pem_task_Enable_disable_bapm, */
158 NULL
161 const pem_event_action disable_dynamic_state_management_tasks[] = {
162 pem_task_unregister_interrupts,
163 pem_task_get_boot_state_id,
164 pem_task_disable_dynamic_state_management,
165 NULL
168 const pem_event_action disable_clock_power_gatings_tasks[] = {
169 pem_task_disable_clock_power_gatings_tasks,
170 NULL
173 const pem_event_action cleanup_asic_tasks[] = {
174 /* PEM_Task_DisableFPS,*/
175 pem_task_cleanup_asic,
176 NULL
179 const pem_event_action prepare_for_pnp_stop_tasks[] = {
180 /* PEM_Task_PrepareForPnpStop,*/
181 NULL
184 const pem_event_action set_power_source_tasks[] = {
185 pem_task_set_power_source,
186 pem_task_notify_hw_of_power_source,
187 NULL
190 const pem_event_action set_power_saving_state_tasks[] = {
191 pem_task_reset_power_saving_state,
192 pem_task_get_power_saving_state,
193 pem_task_set_power_saving_state,
194 /* PEM_Task_ResetODDCState,
195 * PEM_Task_GetODDCState,
196 * PEM_Task_SetODDCState,*/
197 NULL
200 const pem_event_action enable_disable_fps_tasks[] = {
201 /* PEM_Task_EnableDisableFPS,*/
202 NULL
205 const pem_event_action set_nbmcu_state_tasks[] = {
206 /* PEM_Task_NBMCUStateChange,*/
207 NULL
210 const pem_event_action reset_hardware_dc_notification_tasks[] = {
211 /* PEM_Task_ResetHardwareDCNotification,*/
212 NULL
216 const pem_event_action notify_smu_suspend_tasks[] = {
217 /* PEM_Task_NotifySMUSuspend,*/
218 NULL
221 const pem_event_action disable_smc_firmware_ctf_tasks[] = {
222 /* PEM_Task_DisableSMCFirmwareCTF,*/
223 NULL
226 const pem_event_action disable_fps_tasks[] = {
227 /* PEM_Task_DisableFPS,*/
228 NULL
231 const pem_event_action vari_bright_suspend_tasks[] = {
232 /* PEM_Task_VariBright_Suspend,*/
233 NULL
236 const pem_event_action reset_fan_speed_to_default_tasks[] = {
237 /* PEM_Task_ResetFanSpeedToDefault,*/
238 NULL
241 const pem_event_action power_down_asic_tasks[] = {
242 /* PEM_Task_DisableFPS,*/
243 pem_task_power_down_asic,
244 NULL
247 const pem_event_action disable_stutter_mode_tasks[] = {
248 /* PEM_Task_DisableStutterMode,*/
249 NULL
252 const pem_event_action set_connected_standby_tasks[] = {
253 /* PEM_Task_SetConnectedStandby,*/
254 NULL
257 const pem_event_action block_hw_access_tasks[] = {
258 pem_task_block_hw_access,
259 NULL
262 const pem_event_action unblock_hw_access_tasks[] = {
263 pem_task_un_block_hw_access,
264 NULL
267 const pem_event_action resume_connected_standby_tasks[] = {
268 /* PEM_Task_ResumeConnectedStandby,*/
269 NULL
272 const pem_event_action notify_smu_resume_tasks[] = {
273 /* PEM_Task_NotifySMUResume,*/
274 NULL
277 const pem_event_action reset_display_configCounter_tasks[] = {
278 pem_task_reset_display_phys_access,
279 NULL
282 const pem_event_action update_dal_configuration_tasks[] = {
283 /* PEM_Task_CheckVBlankTime,*/
284 NULL
287 const pem_event_action vari_bright_resume_tasks[] = {
288 /* PEM_Task_VariBright_Resume,*/
289 NULL
292 const pem_event_action notify_hw_power_source_tasks[] = {
293 pem_task_notify_hw_of_power_source,
294 NULL
297 const pem_event_action process_vbios_event_info_tasks[] = {
298 /* PEM_Task_ProcessVbiosEventInfo,*/
299 NULL
302 const pem_event_action enable_gfx_clock_gating_tasks[] = {
303 pem_task_enable_gfx_clock_gating,
304 NULL
307 const pem_event_action enable_gfx_voltage_island_power_gating_tasks[] = {
308 pem_task_enable_voltage_island_power_gating,
309 NULL
312 const pem_event_action reset_clock_gating_tasks[] = {
313 /* PEM_Task_ResetClockGating*/
314 NULL
317 const pem_event_action notify_smu_vpu_recovery_end_tasks[] = {
318 /* PEM_Task_NotifySmuVPURecoveryEnd,*/
319 NULL
322 const pem_event_action disable_vpu_cap_tasks[] = {
323 /* PEM_Task_DisableVPUCap,*/
324 NULL
327 const pem_event_action execute_escape_sequence_tasks[] = {
328 /* PEM_Task_ExecuteEscapesequence,*/
329 NULL
332 const pem_event_action notify_power_state_change_tasks[] = {
333 pem_task_notify_power_state_change,
334 NULL
337 const pem_event_action enable_cgpg_tasks[] = {
338 pem_task_enable_cgpg,
339 NULL
342 const pem_event_action disable_cgpg_tasks[] = {
343 pem_task_disable_cgpg,
344 NULL
347 const pem_event_action enable_user_2d_performance_tasks[] = {
348 /* PEM_Task_SetUser2DPerformanceFlag,*/
349 /* PEM_Task_UpdateUser2DPerformanceEnableEvents,*/
350 NULL
353 const pem_event_action add_user_2d_performance_state_tasks[] = {
354 /* PEM_Task_Get2DPerformanceTemplate,*/
355 /* PEM_Task_AllocateNewPowerStateMemory,*/
356 /* PEM_Task_CopyNewPowerStateInfo,*/
357 /* PEM_Task_UpdateNewPowerStateClocks,*/
358 /* PEM_Task_UpdateNewPowerStateUser2DPerformanceFlag,*/
359 /* PEM_Task_AddPowerState,*/
360 /* PEM_Task_ReleaseNewPowerStateMemory,*/
361 NULL
364 const pem_event_action delete_user_2d_performance_state_tasks[] = {
365 /* PEM_Task_GetCurrentUser2DPerformanceStateID,*/
366 /* PEM_Task_DeletePowerState,*/
367 /* PEM_Task_SetCurrentUser2DPerformanceStateID,*/
368 NULL
371 const pem_event_action disable_user_2d_performance_tasks[] = {
372 /* PEM_Task_ResetUser2DPerformanceFlag,*/
373 /* PEM_Task_UpdateUser2DPerformanceDisableEvents,*/
374 NULL
377 const pem_event_action enable_stutter_mode_tasks[] = {
378 pem_task_enable_stutter_mode,
379 NULL
382 const pem_event_action enable_disable_bapm_tasks[] = {
383 /*PEM_Task_EnableDisableBAPM,*/
384 NULL
387 const pem_event_action reset_boot_state_tasks[] = {
388 pem_task_reset_boot_state,
389 NULL
392 const pem_event_action create_new_user_performance_state_tasks[] = {
393 pem_task_create_user_performance_state,
394 NULL
397 const pem_event_action initialize_thermal_controller_tasks[] = {
398 pem_task_initialize_thermal_controller,
399 NULL
402 const pem_event_action uninitialize_thermal_controller_tasks[] = {
403 pem_task_uninitialize_thermal_controller,
404 NULL
407 const pem_event_action set_cpu_power_state[] = {
408 pem_task_set_cpu_power_state,
409 NULL