xref: /linux/drivers/gpu/drm/amd/pm/powerplay/inc/ppinterrupt.h (revision 837d542a09cd533055423dfca7e621a9c1d13c5b)
1c82baa28Syanyang1 /*
2c82baa28Syanyang1  * Copyright 2015 Advanced Micro Devices, Inc.
3c82baa28Syanyang1  *
4c82baa28Syanyang1  * Permission is hereby granted, free of charge, to any person obtaining a
5c82baa28Syanyang1  * copy of this software and associated documentation files (the "Software"),
6c82baa28Syanyang1  * to deal in the Software without restriction, including without limitation
7c82baa28Syanyang1  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8c82baa28Syanyang1  * and/or sell copies of the Software, and to permit persons to whom the
9c82baa28Syanyang1  * Software is furnished to do so, subject to the following conditions:
10c82baa28Syanyang1  *
11c82baa28Syanyang1  * The above copyright notice and this permission notice shall be included in
12c82baa28Syanyang1  * all copies or substantial portions of the Software.
13c82baa28Syanyang1  *
14c82baa28Syanyang1  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15c82baa28Syanyang1  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16c82baa28Syanyang1  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17c82baa28Syanyang1  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18c82baa28Syanyang1  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19c82baa28Syanyang1  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20c82baa28Syanyang1  * OTHER DEALINGS IN THE SOFTWARE.
21c82baa28Syanyang1  *
22c82baa28Syanyang1  */
23c82baa28Syanyang1 
24*251bb34fSRex Zhu #ifndef _PP_INTERRUPT_H_
25*251bb34fSRex Zhu #define _PP_INTERRUPT_H_
26c82baa28Syanyang1 
27*251bb34fSRex Zhu enum amd_thermal_irq {
28*251bb34fSRex Zhu 	AMD_THERMAL_IRQ_LOW_TO_HIGH = 0,
29*251bb34fSRex Zhu 	AMD_THERMAL_IRQ_HIGH_TO_LOW,
30*251bb34fSRex Zhu 
31*251bb34fSRex Zhu 	AMD_THERMAL_IRQ_LAST
32c82baa28Syanyang1 };
33c82baa28Syanyang1 
34*251bb34fSRex Zhu /* The type of the interrupt callback functions in PowerPlay */
35*251bb34fSRex Zhu typedef int (*irq_handler_func_t)(void *private_data,
36*251bb34fSRex Zhu 				unsigned src_id, const uint32_t *iv_entry);
37c82baa28Syanyang1 
38*251bb34fSRex Zhu /* Event Manager action chain list information */
39*251bb34fSRex Zhu struct pp_interrupt_registration_info {
40*251bb34fSRex Zhu 	irq_handler_func_t call_back; /* Pointer to callback function */
41*251bb34fSRex Zhu 	void *context;                   /* Pointer to callback function context */
42*251bb34fSRex Zhu 	uint32_t src_id;               /* Registered interrupt id */
43*251bb34fSRex Zhu 	const uint32_t *iv_entry;
44*251bb34fSRex Zhu };
45*251bb34fSRex Zhu 
46*251bb34fSRex Zhu #endif /* _PP_INTERRUPT_H_ */
47