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