1
0

drm/i915/pch: move PCH detection to intel_display_driver_early_probe()

Make PCH detection part of display. For now, call it also for
!HAS_DISPLAY() to avoid functional changes here.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/de70b35b170c9a74edddb497a209eb10427b77de.1744364975.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula
2025-04-11 12:54:13 +03:00
parent ad2837640b
commit 3090ea0344
5 changed files with 5 additions and 8 deletions

View File

@@ -180,6 +180,9 @@ static void intel_plane_possible_crtcs_init(struct intel_display *display)
void intel_display_driver_early_probe(struct intel_display *display)
{
/* This must be called before any calls to HAS_PCH_* */
intel_pch_detect(display);
if (!HAS_DISPLAY(display))
return;

View File

@@ -250,7 +250,7 @@ intel_virt_detect_pch(const struct intel_display *display,
*pch_id = id;
}
void intel_detect_pch(struct intel_display *display)
void intel_pch_detect(struct intel_display *display)
{
struct pci_dev *pch = NULL;
unsigned short id;

View File

@@ -53,6 +53,6 @@ enum intel_pch {
#define HAS_PCH_NOP(display) (INTEL_PCH_TYPE(display) == PCH_NOP)
#define HAS_PCH_SPLIT(display) (INTEL_PCH_TYPE(display) != PCH_NONE)
void intel_detect_pch(struct intel_display *display);
void intel_pch_detect(struct intel_display *display);
#endif /* __INTEL_PCH__ */

View File

@@ -263,9 +263,6 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
i915_gem_init_early(dev_priv);
/* This must be called before any calls to HAS_PCH_* */
intel_detect_pch(display);
intel_irq_init(dev_priv);
intel_display_driver_early_probe(display);
intel_clock_gating_hooks_init(dev_priv);

View File

@@ -133,9 +133,6 @@ int xe_display_init_early(struct xe_device *xe)
/* Fake uncore lock */
spin_lock_init(&xe->uncore.lock);
/* This must be called before any calls to HAS_PCH_* */
intel_detect_pch(display);
intel_display_driver_early_probe(display);
/* Early display init.. */