intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Do not reset detect_done flag in intel_dp_detect
Date: Wed, 7 Dec 2016 12:46:59 -0800	[thread overview]
Message-ID: <20161207204659.GA5673@intel.com> (raw)
In-Reply-To: <20161207140556.GI31595@intel.com>

On Wed, Dec 07, 2016 at 04:05:56PM +0200, Ville Syrjälä wrote:
> On Tue, Dec 06, 2016 at 04:43:51PM -0800, Manasi Navare wrote:
> > The detect_done flag was introduced in the commit
> > 7d23e3c37bb3fc6952dc84007ee60cb533fd2d5c in order to avoid
> > multiple detects on hotplug where intel_dp_long_pulse()
> > was called from HPD handler as well as in intel_dp_detect.
> > So this detect_done flag was required to make sure intel_dp_detect()
> > did not call long pulse handler again if it was already been called
> > from HPD handler. However commit 1015811609c0328b5ed670d07748591b837e74eb
> > differs the long hpd handling entirely until the hotplug work runs to
> > avoid the double long hpd handling the "detect_done" flag is trying
> > to prevent.
> 
> That sentence doesn't parse here. Anyways, the flag indeed is now a nop
> and your patch is pretty much the same what I did here:
> https://patchwork.freedesktop.org/patch/101476/
>

I looked at this patch and yes it is the same thing except that it keeps
the name of the flag unchanged plus previous patch is too old and wont
apply cleanly unless you rebase it. I will add the reseting of this flag in the
resume case. 
Thoughts?

> > 
> > So now we do not need to reset the detect_done flag to false in
> > intel_dp_detect. It will be reset in the intel_dp_hpd_pulse so
> > that intel_dp_detect does a full detect. However if the .detect
> > gets called during mode enumeration then we do not need to do a
> > full detect. This patch avoids the WARNS_ONS during connected boot
> > case when it calls intel_dp_check_link_status() due to multiple
> > detects
> 
> How exactly does it do that? Also we shouldn't sweep that under the rug
> anyway. Instead someone should actually fix the problem that causes the
> WARN.
>

Actually an additional call to intel_dp_long_pulse from intel_dp_detect()
because we are not resetting the detect_done flag, makes the function
call intel_dp_check_link_status() in the case when intel_dp->lane_count is 
0 and throws the WARN about that. So by resetting the flag we avoid this
unwanted call to intel_dp_long_pulse and that gets rid of the warning.

Manasi
 
> > and also avoids DP compliance failures. It avoids doing
> > a full detect every single time on .detect().
> > 
> > Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index db75bb9..9c9277e 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -4470,8 +4470,6 @@ static bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
> >  	if (!intel_dp->detect_done)
> >  		status = intel_dp_long_pulse(intel_dp->attached_connector);
> >  
> > -	intel_dp->detect_done = false;
> > -
> >  	return status;
> >  }
> >  
> > -- 
> > 1.9.1
> 
> -- 
> Ville Syrjälä
> Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-12-07 20:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07  0:43 [PATCH] drm/i915: Do not reset detect_done flag in intel_dp_detect Manasi Navare
2016-12-07  1:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-12-07  8:52 ` [PATCH] " Jani Nikula
2016-12-07 14:05 ` Ville Syrjälä
2016-12-07 20:46   ` Manasi Navare [this message]
2016-12-08  3:51   ` Manasi Navare
2016-12-08 15:58     ` Ville Syrjälä
2016-12-08 17:50       ` Manasi Navare
2016-12-20  2:42         ` [PATCH v2] drm/i915/dp: " Dhinakaran Pandiyan
2016-12-20  8:08           ` Jani Nikula
2016-12-20 21:05             ` Pandiyan, Dhinakaran
2016-12-21  1:57             ` [PATCH v3] " Dhinakaran Pandiyan

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=20161207204659.GA5673@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --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;
as well as URLs for NNTP newsgroup(s).