xref: /linux/drivers/gpu/drm/i915/pxp/intel_pxp_irq.h (revision 0526b56cbc3c489642bd6a5fe4b718dea7ef0ee8)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright(c) 2020, Intel Corporation. All rights reserved.
4  */
5 
6 #ifndef __INTEL_PXP_IRQ_H__
7 #define __INTEL_PXP_IRQ_H__
8 
9 #include <linux/types.h>
10 
11 struct intel_pxp;
12 
13 #define GEN12_DISPLAY_PXP_STATE_TERMINATED_INTERRUPT BIT(1)
14 #define GEN12_DISPLAY_APP_TERMINATED_PER_FW_REQ_INTERRUPT BIT(2)
15 #define GEN12_DISPLAY_STATE_RESET_COMPLETE_INTERRUPT BIT(3)
16 
17 #define GEN12_PXP_INTERRUPTS \
18 	(GEN12_DISPLAY_PXP_STATE_TERMINATED_INTERRUPT | \
19 	 GEN12_DISPLAY_APP_TERMINATED_PER_FW_REQ_INTERRUPT | \
20 	 GEN12_DISPLAY_STATE_RESET_COMPLETE_INTERRUPT)
21 
22 #ifdef CONFIG_DRM_I915_PXP
23 void intel_pxp_irq_enable(struct intel_pxp *pxp);
24 void intel_pxp_irq_disable(struct intel_pxp *pxp);
25 void intel_pxp_irq_handler(struct intel_pxp *pxp, u16 iir);
26 #else
27 static inline void intel_pxp_irq_handler(struct intel_pxp *pxp, u16 iir)
28 {
29 }
30 
31 static inline void intel_pxp_irq_enable(struct intel_pxp *pxp)
32 {
33 }
34 
35 static inline void intel_pxp_irq_disable(struct intel_pxp *pxp)
36 {
37 }
38 #endif
39 
40 #endif /* __INTEL_PXP_IRQ_H__ */
41