Message ID | 20180313034646.3721-1-dhinakaran.pandiyan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, 2018-03-13 at 04:23 +0000, Patchwork wrote: > == Series Details == > > Series: series starting with [1/2] drm/i915/psr: Move PSR aux setup to it's own function. > URL : https://patchwork.freedesktop.org/series/39825/ > State : warning > > == Summary == > > Series 39825v1 series starting with [1/2] drm/i915/psr: Move PSR aux setup to it's own function. > https://patchwork.freedesktop.org/api/1.0/series/39825/revisions/1/mbox/ > > ---- Possible new issues: > > Test drv_module_reload: > Subgroup basic-reload: > pass -> DMESG-WARN (fi-elk-e7500) Platform does not have PSR, error looks spurious.
On Mon, Mar 12, 2018 at 08:46:45PM -0700, Dhinakaran Pandiyan wrote: > Non-functional change useful for the following patch. > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: José Roberto de Souza <jose.souza@intel.com> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > --- > drivers/gpu/drm/i915/intel_psr.c | 31 ++++++++++++++++++++----------- > 1 file changed, 20 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c > index 975ebb51c7af..86d6c19c9ae6 100644 > --- a/drivers/gpu/drm/i915/intel_psr.c > +++ b/drivers/gpu/drm/i915/intel_psr.c > @@ -246,7 +246,7 @@ static i915_reg_t psr_aux_data_reg(struct drm_i915_private *dev_priv, > return EDP_PSR_AUX_DATA(index); > } > > -static void hsw_psr_enable_sink(struct intel_dp *intel_dp) > +static void hsw_psr_setup_aux(struct intel_dp *intel_dp) > { > struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); > struct drm_device *dev = dig_port->base.base.dev; > @@ -267,6 +267,24 @@ static void hsw_psr_enable_sink(struct intel_dp *intel_dp) > BUILD_BUG_ON(sizeof(aux_msg) > 20); > > aux_clock_divider = intel_dp->get_aux_clock_divider(intel_dp, 0); > + aux_ctl_reg = psr_aux_ctl_reg(dev_priv, port); > + > + /* Setup AUX registers */ > + for (i = 0; i < sizeof(aux_msg); i += 4) > + I915_WRITE(psr_aux_data_reg(dev_priv, port, i >> 2), > + intel_dp_pack_aux(&aux_msg[i], sizeof(aux_msg) - i)); > + > + aux_ctl = intel_dp->get_aux_send_ctl(intel_dp, 0, sizeof(aux_msg), > + aux_clock_divider); > + I915_WRITE(aux_ctl_reg, aux_ctl); > +} > + > +static void hsw_psr_enable_sink(struct intel_dp *intel_dp) > +{ > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); > + struct drm_device *dev = dig_port->base.base.dev; > + struct drm_i915_private *dev_priv = to_i915(dev); > + > > /* Enable AUX frame sync at sink */ > if (dev_priv->psr.aux_frame_sync) > @@ -285,16 +303,7 @@ static void hsw_psr_enable_sink(struct intel_dp *intel_dp) > drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, > DP_PSR_ENABLE); > > - aux_ctl_reg = psr_aux_ctl_reg(dev_priv, port); > - > - /* Setup AUX registers */ > - for (i = 0; i < sizeof(aux_msg); i += 4) > - I915_WRITE(psr_aux_data_reg(dev_priv, port, i >> 2), > - intel_dp_pack_aux(&aux_msg[i], sizeof(aux_msg) - i)); > - > - aux_ctl = intel_dp->get_aux_send_ctl(intel_dp, 0, sizeof(aux_msg), > - aux_clock_divider); > - I915_WRITE(aux_ctl_reg, aux_ctl); > + hsw_psr_setup_aux(intel_dp); > } > > static void vlv_psr_enable_source(struct intel_dp *intel_dp, > -- > 2.14.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 975ebb51c7af..86d6c19c9ae6 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -246,7 +246,7 @@ static i915_reg_t psr_aux_data_reg(struct drm_i915_private *dev_priv, return EDP_PSR_AUX_DATA(index); } -static void hsw_psr_enable_sink(struct intel_dp *intel_dp) +static void hsw_psr_setup_aux(struct intel_dp *intel_dp) { struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); struct drm_device *dev = dig_port->base.base.dev; @@ -267,6 +267,24 @@ static void hsw_psr_enable_sink(struct intel_dp *intel_dp) BUILD_BUG_ON(sizeof(aux_msg) > 20); aux_clock_divider = intel_dp->get_aux_clock_divider(intel_dp, 0); + aux_ctl_reg = psr_aux_ctl_reg(dev_priv, port); + + /* Setup AUX registers */ + for (i = 0; i < sizeof(aux_msg); i += 4) + I915_WRITE(psr_aux_data_reg(dev_priv, port, i >> 2), + intel_dp_pack_aux(&aux_msg[i], sizeof(aux_msg) - i)); + + aux_ctl = intel_dp->get_aux_send_ctl(intel_dp, 0, sizeof(aux_msg), + aux_clock_divider); + I915_WRITE(aux_ctl_reg, aux_ctl); +} + +static void hsw_psr_enable_sink(struct intel_dp *intel_dp) +{ + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); + struct drm_device *dev = dig_port->base.base.dev; + struct drm_i915_private *dev_priv = to_i915(dev); + /* Enable AUX frame sync at sink */ if (dev_priv->psr.aux_frame_sync) @@ -285,16 +303,7 @@ static void hsw_psr_enable_sink(struct intel_dp *intel_dp) drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, DP_PSR_ENABLE); - aux_ctl_reg = psr_aux_ctl_reg(dev_priv, port); - - /* Setup AUX registers */ - for (i = 0; i < sizeof(aux_msg); i += 4) - I915_WRITE(psr_aux_data_reg(dev_priv, port, i >> 2), - intel_dp_pack_aux(&aux_msg[i], sizeof(aux_msg) - i)); - - aux_ctl = intel_dp->get_aux_send_ctl(intel_dp, 0, sizeof(aux_msg), - aux_clock_divider); - I915_WRITE(aux_ctl_reg, aux_ctl); + hsw_psr_setup_aux(intel_dp); } static void vlv_psr_enable_source(struct intel_dp *intel_dp,
Non-functional change useful for the following patch. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> --- drivers/gpu/drm/i915/intel_psr.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-)