On Mon, May 04, 2020 at 03:52:21PM -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. > > Cc: Aditya Swarup <aditya.swarup@xxxxxxxxx> > Signed-off-by: Matt Roper <matthew.d.roper@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_display.c | 3 +++ > drivers/gpu/drm/i915/i915_irq.c | 6 ++++++ > 2 files changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index fcfc3812ef28..2eeafda82188 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -11007,6 +11007,9 @@ static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc, > else > cpu_transcoder = TRANSCODER_DSI_C; > > + if (!HAS_TRANSCODER(dev_priv, cpu_transcoder)) > + continue; > + It looks like this hunk wound up in the wrong function after a conflict resolution. It was supposed to be in icl_get_trans_port_sync_config() instead (this BXT function doesn't execute on gen >= 11). Matt > power_domain = POWER_DOMAIN_TRANSCODER(cpu_transcoder); > drm_WARN_ON(dev, *power_domain_mask & BIT_ULL(power_domain)); > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 622986759ec6..1381cb530c2f 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; > @@ -3399,6 +3402,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 > -- Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx