[Intel-gfx] [PATCH v3 10/15] drm/i915/rkl: Don't try to read out DSI transcoders

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Jun 4 16:59:00 UTC 2020


On Wed, Jun 03, 2020 at 02:15:24PM -0700, Matt Roper wrote:
> From: Aditya Swarup <aditya.swarup at intel.com>
> 
> RKL doesn't have DSI outputs, so we shouldn't try to read out the DSI
> transcoder registers.
> 
> v2(MattR):
>  - Just set the 'extra panel mask' to edp | dsi0 | dsi1 and then mask
>    against the platform's cpu_transcoder_mask to filter out the ones
>    that don't exist on a given platform.  (Ville)
> 
> Signed-off-by: Aditya Swarup <aditya.swarup at intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 019fef8023ca..bcc6dc4e321b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -10904,19 +10904,13 @@ static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
>  	struct drm_device *dev = crtc->base.dev;
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	enum intel_display_power_domain power_domain;
> -	unsigned long panel_transcoder_mask = 0;
> +	unsigned long panel_transcoder_mask = BIT(TRANSCODER_EDP) |
> +		BIT(TRANSCODER_DSI_0) | BIT(TRANSCODER_DSI_1);

TRANSCODER_DSI_0/1 alias TRANSCODER_DSI_A/C which we do not
want in this mask.

>  	unsigned long enabled_panel_transcoders = 0;
>  	enum transcoder panel_transcoder;
>  	intel_wakeref_t wf;
>  	u32 tmp;
>  
> -	if (INTEL_GEN(dev_priv) >= 11)
> -		panel_transcoder_mask |=
> -			BIT(TRANSCODER_DSI_0) | BIT(TRANSCODER_DSI_1);
> -
> -	if (HAS_TRANSCODER(dev_priv, TRANSCODER_EDP))
> -		panel_transcoder_mask |= BIT(TRANSCODER_EDP);
> -
>  	/*
>  	 * The pipe->transcoder mapping is fixed with the exception of the eDP
>  	 * and DSI transcoders handled below.
> @@ -10927,6 +10921,7 @@ static bool hsw_get_transcoder_state(struct intel_crtc *crtc,
>  	 * XXX: Do intel_display_power_get_if_enabled before reading this (for
>  	 * consistency and less surprising code; it's in always on power).
>  	 */
> +	panel_transcoder_mask &= INTEL_INFO(dev_priv)->cpu_transcoder_mask;
>  	for_each_set_bit(panel_transcoder,
>  			 &panel_transcoder_mask,
>  			 ARRAY_SIZE(INTEL_INFO(dev_priv)->trans_offsets)) {

Can't we just use for_each_cpu_transcoder_masked() ?

> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list