xref: /linux/drivers/gpu/drm/xe/display/xe_display.h (revision 2c1ed907520c50326b8f604907a8478b27881a2e)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef _XE_DISPLAY_H_
7 #define _XE_DISPLAY_H_
8 
9 #include "xe_device.h"
10 
11 struct drm_driver;
12 
13 #if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
14 
15 bool xe_display_driver_probe_defer(struct pci_dev *pdev);
16 void xe_display_driver_set_hooks(struct drm_driver *driver);
17 void xe_display_driver_remove(struct xe_device *xe);
18 
19 int xe_display_create(struct xe_device *xe);
20 
21 int xe_display_probe(struct xe_device *xe);
22 
23 int xe_display_init_nommio(struct xe_device *xe);
24 int xe_display_init_noirq(struct xe_device *xe);
25 int xe_display_init_noaccel(struct xe_device *xe);
26 int xe_display_init(struct xe_device *xe);
27 void xe_display_fini(struct xe_device *xe);
28 
29 void xe_display_register(struct xe_device *xe);
30 void xe_display_unregister(struct xe_device *xe);
31 
32 void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl);
33 void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir);
34 void xe_display_irq_reset(struct xe_device *xe);
35 void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt);
36 
37 void xe_display_pm_suspend(struct xe_device *xe);
38 void xe_display_pm_shutdown(struct xe_device *xe);
39 void xe_display_pm_suspend_late(struct xe_device *xe);
40 void xe_display_pm_shutdown_late(struct xe_device *xe);
41 void xe_display_pm_resume_early(struct xe_device *xe);
42 void xe_display_pm_resume(struct xe_device *xe);
43 void xe_display_pm_runtime_suspend(struct xe_device *xe);
44 void xe_display_pm_runtime_suspend_late(struct xe_device *xe);
45 void xe_display_pm_runtime_resume(struct xe_device *xe);
46 
47 #else
48 
xe_display_driver_probe_defer(struct pci_dev * pdev)49 static inline int xe_display_driver_probe_defer(struct pci_dev *pdev) { return 0; }
xe_display_driver_set_hooks(struct drm_driver * driver)50 static inline void xe_display_driver_set_hooks(struct drm_driver *driver) { }
xe_display_driver_remove(struct xe_device * xe)51 static inline void xe_display_driver_remove(struct xe_device *xe) {}
52 
xe_display_create(struct xe_device * xe)53 static inline int xe_display_create(struct xe_device *xe) { return 0; }
54 
xe_display_probe(struct xe_device * xe)55 static inline int xe_display_probe(struct xe_device *xe) { return 0; }
56 
xe_display_init_nommio(struct xe_device * xe)57 static inline int xe_display_init_nommio(struct xe_device *xe) { return 0; }
xe_display_init_noirq(struct xe_device * xe)58 static inline int xe_display_init_noirq(struct xe_device *xe) { return 0; }
xe_display_init_noaccel(struct xe_device * xe)59 static inline int xe_display_init_noaccel(struct xe_device *xe) { return 0; }
xe_display_init(struct xe_device * xe)60 static inline int xe_display_init(struct xe_device *xe) { return 0; }
xe_display_fini(struct xe_device * xe)61 static inline void xe_display_fini(struct xe_device *xe) {}
62 
xe_display_register(struct xe_device * xe)63 static inline void xe_display_register(struct xe_device *xe) {}
xe_display_unregister(struct xe_device * xe)64 static inline void xe_display_unregister(struct xe_device *xe) {}
65 
xe_display_irq_handler(struct xe_device * xe,u32 master_ctl)66 static inline void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl) {}
xe_display_irq_enable(struct xe_device * xe,u32 gu_misc_iir)67 static inline void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir) {}
xe_display_irq_reset(struct xe_device * xe)68 static inline void xe_display_irq_reset(struct xe_device *xe) {}
xe_display_irq_postinstall(struct xe_device * xe,struct xe_gt * gt)69 static inline void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt) {}
70 
xe_display_pm_suspend(struct xe_device * xe)71 static inline void xe_display_pm_suspend(struct xe_device *xe) {}
xe_display_pm_shutdown(struct xe_device * xe)72 static inline void xe_display_pm_shutdown(struct xe_device *xe) {}
xe_display_pm_suspend_late(struct xe_device * xe)73 static inline void xe_display_pm_suspend_late(struct xe_device *xe) {}
xe_display_pm_shutdown_late(struct xe_device * xe)74 static inline void xe_display_pm_shutdown_late(struct xe_device *xe) {}
xe_display_pm_resume_early(struct xe_device * xe)75 static inline void xe_display_pm_resume_early(struct xe_device *xe) {}
xe_display_pm_resume(struct xe_device * xe)76 static inline void xe_display_pm_resume(struct xe_device *xe) {}
xe_display_pm_runtime_suspend(struct xe_device * xe)77 static inline void xe_display_pm_runtime_suspend(struct xe_device *xe) {}
xe_display_pm_runtime_suspend_late(struct xe_device * xe)78 static inline void xe_display_pm_runtime_suspend_late(struct xe_device *xe) {}
xe_display_pm_runtime_resume(struct xe_device * xe)79 static inline void xe_display_pm_runtime_resume(struct xe_device *xe) {}
80 
81 #endif /* CONFIG_DRM_XE_DISPLAY */
82 #endif /* _XE_DISPLAY_H_ */
83