mirror of
https://github.com/torvalds/linux.git
synced 2026-04-22 16:53:59 -04:00
In XE, display runtime suspend / resume routines are called only if d3cold is allowed. This makes the driver unable to detect any HPDs once the device goes into runtime suspend state in platforms like LNL. Update the display runtime suspend / resume routines to include HPD polling regardless of d3cold status. While xe_display_pm_suspend/resume() performs steps during runtime suspend/resume that shouldn't happen, like suspending MST and they are missing other steps like enabling DC9, this patchset is meant to keep the current behavior wrt. these, leaving the corresponding updates for a follow-up v2: have a separate function for display runtime s/r (Rodrigo) v3: better streamlining of system s/r and runtime s/r calls (Imre) v4: rebased Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240823112148.327015-4-vinod.govindapillai@intel.com
77 lines
3.1 KiB
C
77 lines
3.1 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_DISPLAY_H_
|
|
#define _XE_DISPLAY_H_
|
|
|
|
#include "xe_device.h"
|
|
|
|
struct drm_driver;
|
|
|
|
#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
|
|
|
|
bool xe_display_driver_probe_defer(struct pci_dev *pdev);
|
|
void xe_display_driver_set_hooks(struct drm_driver *driver);
|
|
void xe_display_driver_remove(struct xe_device *xe);
|
|
|
|
int xe_display_create(struct xe_device *xe);
|
|
|
|
int xe_display_probe(struct xe_device *xe);
|
|
|
|
int xe_display_init_nommio(struct xe_device *xe);
|
|
int xe_display_init_noirq(struct xe_device *xe);
|
|
int xe_display_init_noaccel(struct xe_device *xe);
|
|
int xe_display_init(struct xe_device *xe);
|
|
void xe_display_fini(struct xe_device *xe);
|
|
|
|
void xe_display_register(struct xe_device *xe);
|
|
void xe_display_unregister(struct xe_device *xe);
|
|
|
|
void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl);
|
|
void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir);
|
|
void xe_display_irq_reset(struct xe_device *xe);
|
|
void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt);
|
|
|
|
void xe_display_pm_suspend(struct xe_device *xe, bool runtime);
|
|
void xe_display_pm_suspend_late(struct xe_device *xe);
|
|
void xe_display_pm_resume_early(struct xe_device *xe);
|
|
void xe_display_pm_resume(struct xe_device *xe, bool runtime);
|
|
void xe_display_pm_runtime_suspend(struct xe_device *xe);
|
|
void xe_display_pm_runtime_resume(struct xe_device *xe);
|
|
|
|
#else
|
|
|
|
static inline int xe_display_driver_probe_defer(struct pci_dev *pdev) { return 0; }
|
|
static inline void xe_display_driver_set_hooks(struct drm_driver *driver) { }
|
|
static inline void xe_display_driver_remove(struct xe_device *xe) {}
|
|
|
|
static inline int xe_display_create(struct xe_device *xe) { return 0; }
|
|
|
|
static inline int xe_display_probe(struct xe_device *xe) { return 0; }
|
|
|
|
static inline int xe_display_init_nommio(struct xe_device *xe) { return 0; }
|
|
static inline int xe_display_init_noirq(struct xe_device *xe) { return 0; }
|
|
static inline int xe_display_init_noaccel(struct xe_device *xe) { return 0; }
|
|
static inline int xe_display_init(struct xe_device *xe) { return 0; }
|
|
static inline void xe_display_fini(struct xe_device *xe) {}
|
|
|
|
static inline void xe_display_register(struct xe_device *xe) {}
|
|
static inline void xe_display_unregister(struct xe_device *xe) {}
|
|
|
|
static inline void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl) {}
|
|
static inline void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir) {}
|
|
static inline void xe_display_irq_reset(struct xe_device *xe) {}
|
|
static inline void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt) {}
|
|
|
|
static inline void xe_display_pm_suspend(struct xe_device *xe, bool runtime) {}
|
|
static inline void xe_display_pm_suspend_late(struct xe_device *xe) {}
|
|
static inline void xe_display_pm_resume_early(struct xe_device *xe) {}
|
|
static inline void xe_display_pm_resume(struct xe_device *xe, bool runtime) {}
|
|
static inline void xe_display_pm_runtime_suspend(struct xe_device *xe) {}
|
|
static inline void xe_display_pm_runtime_resume(struct xe_device *xe) {}
|
|
|
|
#endif /* CONFIG_DRM_XE_DISPLAY */
|
|
#endif /* _XE_DISPLAY_H_ */
|