Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Add a bit of locking to intel_dp_hpd_pulse()
Date: Mon, 4 Aug 2014 15:50:34 +0300	[thread overview]
Message-ID: <20140804125034.GF4193@intel.com> (raw)
In-Reply-To: <20140804081050.GK8727@phenom.ffwll.local>

On Mon, Aug 04, 2014 at 10:10:50AM +0200, Daniel Vetter wrote:
> On Fri, Aug 01, 2014 at 02:55:22PM +0300, Ville Syrjälä wrote:
> > On Thu, Jul 31, 2014 at 08:59:08PM +1000, Dave Airlie wrote:
> > > On 31 July 2014 17:37, Daniel Vetter <daniel@ffwll.ch> wrote:
> > > > On Thu, Jul 31, 2014 at 1:49 AM, Dave Airlie <airlied@gmail.com> wrote:
> > > >> Daniel, the only way intel_dp->is_mst can get reset is inside this path.
> > > >
> > > > Ok, so that one should be safe. Then I guess we can just push the
> > > > locking down into the respective non-mst leafs (since atm we do
> > > > link-retraining without any locking, which isn't good). And it needs
> > > > to be dev->mode_config.mutex, not connection mutex.
> > 
> > Why that? We can't be doing a modeset w/o connection_mutex so that
> > seems like it should be enough. Well, there's also dpms which leaves
> > the crtc<->encoder<->connector links intact but that too takes
> > connection_mutex currently.
> > 
> > > 
> > > I'd like to know why we do link training at this point though as well,
> > > adding locking is required of course, I was just going to wrap the
> > > short irq call to the link status check with the lock, but I think it
> > > should be possible to push it down further,
> > 
> > I don't really know why the sink generates the hpd when we turn off the
> > port, but that doesn't really matter I think. We need to be prepared for
> > hpds at any time.
> > 
> > intel_dp_check_link_status() just checks if there's a crtc, which there
> > is (either the old one or the new one, depending on how far along the
> > modeset path we are I guess), and then it just checks
> > drm_dp_channel_eq_ok() which says false since the link was turned off,
> > and then it proceeds to retrain the link.
> > 
> > Maybe it should also check crtc->active? Though that itself won't 
> > eliminate the problem unless the locking gets fixed somehow.
> 
> We check encoder->connectors_active, which is equivalent.

Only after intel_sanitize_encoder(). Before that we can have
!crtc->active && encoder->connectors_active.

-- 
Ville Syrjälä
Intel OTC

  parent reply	other threads:[~2014-08-04 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 15:39 [PATCH] drm/i915: Add a bit of locking to intel_dp_hpd_pulse() ville.syrjala
2014-07-30 23:49 ` Dave Airlie
2014-07-31  7:37   ` Daniel Vetter
2014-07-31 10:59     ` Dave Airlie
2014-08-01 11:55       ` Ville Syrjälä
2014-08-04  8:10         ` Daniel Vetter
2014-08-04  8:21           ` Dave Airlie
2014-08-04 12:50           ` Ville Syrjälä [this message]
2014-08-04 14:58             ` Daniel Vetter

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=20140804125034.GF4193@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /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