Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Move the lspcon resume from .reset() to intel_dp_sink_dpms()
Date: Mon, 19 Oct 2020 18:51:37 +0300	[thread overview]
Message-ID: <20201019155137.GI3199870@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20201019153434.GR6112@intel.com>

On Mon, Oct 19, 2020 at 06:34:34PM +0300, Ville Syrjälä wrote:
> On Mon, Oct 19, 2020 at 06:27:01PM +0300, Imre Deak wrote:
> > On Fri, Oct 16, 2020 at 10:47:59PM +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Rather that try to trick LSPCON back into PCON mode from the .reset()
> > > hook let's just do that as a regular part of the normal modeset
> > > sequence, which is going to take care of the system resume case. During
> > > a normal modeset this should normally be a nop as the mode should have
> > > already been switched by .detect().
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_dp.c | 5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > > index 52075a241eaf..4784aaeb934e 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > > @@ -3490,6 +3490,8 @@ void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
> > >  	} else {
> > >  		struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
> > >  
> > > +		lspcon_resume(dp_to_dig_port(intel_dp));
> > 
> > Only applies when lspcon->active (the check could be moved to
> > lspcon_resume).
> 
> lspcon->active is mostly nonsense these days, and lspcon_resume()
> already checks it to se if it should take the resume or init path.
> I have no idea why there would be any difference between those paths
> anyway.

Ah ok, I was looking at an old version of the code, so this patch looks
ok.

> > 
> > With that fixed:
> > Reviewed-by: Imre Deak <imre.deak@intel.com>
> > 
> > > +
> > >  		/*
> > >  		 * When turning on, we need to retry for 1ms to give the sink
> > >  		 * time to wake up.
> > > @@ -6782,14 +6784,11 @@ void intel_dp_encoder_reset(struct drm_encoder *encoder)
> > >  {
> > >  	struct drm_i915_private *dev_priv = to_i915(encoder->dev);
> > >  	struct intel_dp *intel_dp = enc_to_intel_dp(to_intel_encoder(encoder));
> > > -	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> > >  	intel_wakeref_t wakeref;
> > >  
> > >  	if (!HAS_DDI(dev_priv))
> > >  		intel_dp->DP = intel_de_read(dev_priv, intel_dp->output_reg);
> > >  
> > > -	lspcon_resume(dig_port);
> > > -
> > >  	intel_dp->reset_link_params = true;
> > >  
> > >  	if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv) &&
> > > -- 
> > > 2.26.2
> > > 
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2020-10-19 15:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 19:47 [Intel-gfx] [PATCH 1/2] drm/i915: Move the lspcon resume from .reset() to intel_dp_sink_dpms() Ville Syrjala
2020-10-16 19:48 ` [Intel-gfx] [PATCH 2/2] drm/i915: s/intel_dp_sink_dpms/intel_dp_set_power/ Ville Syrjala
2020-10-19 15:31   ` Imre Deak
2020-10-16 20:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Move the lspcon resume from .reset() to intel_dp_sink_dpms() Patchwork
2020-10-17  0:14 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-10-19 15:27 ` [Intel-gfx] [PATCH 1/2] " Imre Deak
2020-10-19 15:34   ` Ville Syrjälä
2020-10-19 15:51     ` Imre Deak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201019155137.GI3199870@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox