Re: [PATCH 10/10] drm/i915/display: add intel_display_driver_early_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Jani Nikula (2023-04-13 06:47:36)
> Add intel_display_driver_early_probe() as the early probe call to
> replace intel_init_display_hooks(). The latter will be "demoted" to
> setting up hooks in intel_display.c only.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Reviewed-by: Gustavo Sousa <gustavo.sousa@xxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/display/intel_display.c       | 11 -----------
>  .../gpu/drm/i915/display/intel_display_driver.c    | 14 ++++++++++++++
>  .../gpu/drm/i915/display/intel_display_driver.h    |  1 +
>  drivers/gpu/drm/i915/i915_driver.c                 |  2 +-
>  4 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 9eb9898885bb..afc5bc38d006 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -8005,15 +8005,6 @@ static const struct intel_display_funcs i9xx_display_funcs = {
>   */
>  void intel_init_display_hooks(struct drm_i915_private *dev_priv)
>  {
> -  if (!HAS_DISPLAY(dev_priv))
> -          return;
> -
> -  intel_color_init_hooks(dev_priv);
> -  intel_init_cdclk_hooks(dev_priv);
> -  intel_audio_hooks_init(dev_priv);
> -
> -  intel_dpll_init_clock_hook(dev_priv);
> -
>         if (DISPLAY_VER(dev_priv) >= 9) {
>                 dev_priv->display.funcs.display = &skl_display_funcs;
>         } else if (HAS_DDI(dev_priv)) {
> @@ -8026,8 +8017,6 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv)
>         } else {
>                 dev_priv->display.funcs.display = &i9xx_display_funcs;
>         }
> -
> -  intel_fdi_init_hook(dev_priv);
>  }
>  
>  int intel_initial_commit(struct drm_device *dev)
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index d20a279fdf51..b3dbfe2a892e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -32,6 +32,7 @@
>  #include "intel_display_types.h"
>  #include "intel_dmc.h"
>  #include "intel_dp.h"
> +#include "intel_dpll.h"
>  #include "intel_dpll_mgr.h"
>  #include "intel_fb.h"
>  #include "intel_fbc.h"
> @@ -169,6 +170,19 @@ static void intel_plane_possible_crtcs_init(struct drm_i915_private *dev_priv)
>         }
>  }
>  
> +void intel_display_driver_early_probe(struct drm_i915_private *i915)
> +{
> +  if (!HAS_DISPLAY(i915))
> +          return;
> +
> +  intel_color_init_hooks(i915);
> +  intel_init_cdclk_hooks(i915);
> +  intel_audio_hooks_init(i915);
> +  intel_dpll_init_clock_hook(i915);
> +  intel_init_display_hooks(i915);
> +  intel_fdi_init_hook(i915);
> +}
> +
>  /* part #1: call before irq install */
>  int intel_display_driver_probe_noirq(struct drm_i915_private *i915)
>  {
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h
> index 84e7977f265a..c276a58ee329 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
> @@ -15,6 +15,7 @@ struct pci_dev;
>  
>  bool intel_display_driver_probe_defer(struct pci_dev *pdev);
>  void intel_display_driver_init_hw(struct drm_i915_private *i915);
> +void intel_display_driver_early_probe(struct drm_i915_private *i915);
>  int intel_display_driver_probe_noirq(struct drm_i915_private *i915);
>  int intel_display_driver_probe_nogem(struct drm_i915_private *i915);
>  int intel_display_driver_probe(struct drm_i915_private *i915);
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 082393ea3833..8a0a893443b4 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -252,7 +252,7 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
>         intel_detect_pch(dev_priv);
>  
>         intel_irq_init(dev_priv);
> -  intel_init_display_hooks(dev_priv);
> +  intel_display_driver_early_probe(dev_priv);
>         intel_clock_gating_hooks_init(dev_priv);
>  
>         intel_detect_preproduction_hw(dev_priv);
> -- 
> 2.39.2
>




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux