Re: [PATCH v2 3/4] drm/i915/display: remove strap checks from gen 9

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

 



On Tue, 27 Apr 2021, Lucas De Marchi <lucas.demarchi@xxxxxxxxx> wrote:
> Direction on gen9+ was to stop reading the straps and only rely on the
> VBT for marking the port presence. This happened while dealing with
> WaIgnoreDDIAStrap and instead of using it as a WA, it should now be the
> normal flow. See commit 885d3e5b6f08 ("drm/i915/display: fix comment on
> skl straps").
>
> For gen 10 it's hard to say if this will work or not since I can't test
> it, so leave it with the same behavior as before.
>
> For PCH_TGP we should still rely on the VBT to make ports E and F not
> available.
>
> v2 (Ville):
>   - use display ver >= 9 to make it consistent with the rest of the
>     driver instead of checking for == 9
>   - also handle CNL and only initialize port F if it is
>     IS_CNL_WITH_PORT_F. Eventually CNL may be removed, but while it
>     isn't let's keep it consistent everywhere

I agree with this.

Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
> Reviewed-by: Anusha Srivatsa <anusha.srivatsa@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 38 +++++++-------------
>  1 file changed, 13 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 37fe35f6de2c..55f8f2ceada2 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -10883,34 +10883,27 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
>  		intel_ddi_init(dev_priv, PORT_B);
>  		intel_ddi_init(dev_priv, PORT_C);
>  		vlv_dsi_init(dev_priv);
> +	} else if (DISPLAY_VER(dev_priv) >= 9) {
> +		intel_ddi_init(dev_priv, PORT_A);
> +		intel_ddi_init(dev_priv, PORT_B);
> +		intel_ddi_init(dev_priv, PORT_C);
> +		intel_ddi_init(dev_priv, PORT_D);
> +		intel_ddi_init(dev_priv, PORT_E);
> +
> +		if (IS_CNL_WITH_PORT_F(dev_priv))
> +			intel_ddi_init(dev_priv, PORT_F);
>  	} else if (HAS_DDI(dev_priv)) {
> -		int found;
> +		u32 found;
>  
>  		if (intel_ddi_crt_present(dev_priv))
>  			intel_crt_init(dev_priv);
>  
> -		/*
> -		 * Haswell uses DDI functions to detect digital outputs.
> -		 * On SKL pre-D0 the strap isn't connected. Later SKUs may or
> -		 * may not have it - it was supposed to be fixed by the same
> -		 * time we stopped using straps. Assume it's there.
> -		 */
> +		/* Haswell uses DDI functions to detect digital outputs. */
>  		found = intel_de_read(dev_priv, DDI_BUF_CTL(PORT_A)) & DDI_INIT_DISPLAY_DETECTED;
> -		/* WaIgnoreDDIAStrap: skl */
> -		if (found || DISPLAY_VER(dev_priv) == 9)
> +		if (found)
>  			intel_ddi_init(dev_priv, PORT_A);
>  
> -		/* DDI B, C, D, and F detection is indicated by the SFUSE_STRAP
> -		 * register */
> -		if (HAS_PCH_TGP(dev_priv)) {
> -			/* W/A due to lack of STRAP config on TGP PCH*/
> -			found = (SFUSE_STRAP_DDIB_DETECTED |
> -				 SFUSE_STRAP_DDIC_DETECTED |
> -				 SFUSE_STRAP_DDID_DETECTED);
> -		} else {
> -			found = intel_de_read(dev_priv, SFUSE_STRAP);
> -		}
> -
> +		found = intel_de_read(dev_priv, SFUSE_STRAP);
>  		if (found & SFUSE_STRAP_DDIB_DETECTED)
>  			intel_ddi_init(dev_priv, PORT_B);
>  		if (found & SFUSE_STRAP_DDIC_DETECTED)
> @@ -10919,11 +10912,6 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
>  			intel_ddi_init(dev_priv, PORT_D);
>  		if (found & SFUSE_STRAP_DDIF_DETECTED)
>  			intel_ddi_init(dev_priv, PORT_F);
> -		/*
> -		 * On SKL we don't have a way to detect DDI-E so we rely on VBT.
> -		 */
> -		if (DISPLAY_VER(dev_priv) == 9)
> -			intel_ddi_init(dev_priv, PORT_E);
>  	} else if (HAS_PCH_SPLIT(dev_priv)) {
>  		int found;

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



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

  Powered by Linux