Re: [PATCH v3 16/22] drm/i915/rkl: Don't try to access transcoder D

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

 



On Wed, May 06, 2020 at 02:14:05PM -0700, Matt Roper wrote:
> There are a couple places in our driver that loop over transcoders A..D
> for gen11+; since RKL only has three pipes/transcoders, this can lead to
> unclaimed register reads/writes.  We should add checks for transcoder
> existence where appropriate.
> 
> v2: Move one transcoder check that wound up in the wrong function after
>     conflict resolution.  It belongs in bdw_get_trans_port_sync_config
>     rather than bxt_get_dsi_transcoder_state.
> 
> Cc: Aditya Swarup <aditya.swarup@xxxxxxxxx>
> Signed-off-by: Matt Roper <matthew.d.roper@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 3 +++
>  drivers/gpu/drm/i915/i915_irq.c          | 6 ++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 0ab03282c397..f93bc0661d00 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4131,6 +4131,9 @@ static void bdw_get_trans_port_sync_config(struct intel_crtc_state *crtc_state)
>  		enum intel_display_power_domain power_domain;
>  		intel_wakeref_t trans_wakeref;
>  
> +		if (!HAS_TRANSCODER(dev_priv, cpu_transcoder))
> +			continue;

for_each_cpu_transcoder_masked() already handles this for us.

Perhaps should just convert the other places to use it as well.

> +
>  		power_domain = POWER_DOMAIN_TRANSCODER(cpu_transcoder);
>  		trans_wakeref = intel_display_power_get_if_enabled(dev_priv,
>  								   power_domain);
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 3c3fb9d9df62..297d4cacfb6a 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2849,6 +2849,9 @@ static void gen11_display_irq_reset(struct drm_i915_private *dev_priv)
>  		for (trans = TRANSCODER_A; trans <= TRANSCODER_D; trans++) {
>  			enum intel_display_power_domain domain;
>  
> +			if (!HAS_TRANSCODER(dev_priv, trans))
> +				continue;
> +
>  			domain = POWER_DOMAIN_TRANSCODER(trans);
>  			if (!intel_display_power_is_enabled(dev_priv, domain))
>  				continue;
> @@ -3397,6 +3400,9 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
>  		for (trans = TRANSCODER_A; trans <= TRANSCODER_D; trans++) {
>  			enum intel_display_power_domain domain;
>  
> +			if (!HAS_TRANSCODER(dev_priv, trans))
> +				continue;
> +
>  			domain = POWER_DOMAIN_TRANSCODER(trans);
>  			if (!intel_display_power_is_enabled(dev_priv, domain))
>  				continue;
> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
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