dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "S, Srinivasan" <srinivasan.s@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
Date: Thu, 19 Sep 2019 15:03:31 +0300	[thread overview]
Message-ID: <20190919120331.GR1208@intel.com> (raw)
In-Reply-To: <BFA53C78450B204BBCED0B0A62E9EAE73254C690@BGSMSX110.gar.corp.intel.com>

On Thu, Sep 19, 2019 at 07:23:30AM +0000, S, Srinivasan wrote:
> Would the following be appropriate fix?
> 
>         if (connector || connector->base.status == connector_status_connected) {
>                 ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
>                 if (ret) {
>                         DRM_ERROR("failed to update payload %d\n", ret);
>                 }
>         }

The whole connector->status check is racy. IMO don't do it.

> 
> Regards,
> -----Original Message-----
> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Manasi Navare
> Sent: Wednesday, September 18, 2019 11:55 PM
> To: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: S, Srinivasan <srinivasan.s@intel.com>; intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> Subject: Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
> 
> On Wed, Sep 18, 2019 at 09:11:36PM +0300, Ville Syrjälä wrote:
> > On Wed, Sep 18, 2019 at 10:50:39AM -0700, Manasi Navare wrote:
> > > On Wed, Sep 18, 2019 at 07:09:43AM +0530, srinivasan.s@intel.com wrote:
> > > > From: Srinivasan S <srinivasan.s@intel.com>
> > > > 
> > > > This patch avoids DP MST payload error message in dmesg, as it is 
> > > > trying to read the payload from the disconnected DP MST device. 
> > > > After the unplug the connector status is disconnected and we 
> > > > should not be looking for the payload and hence remove the error and throw the warning.
> > > > 
> > > > This details can be found in:
> > > > https://bugs.freedesktop.org/show_bug.cgi?id=111632
> > > 
> > > Please add this link as Bugzilla: 
> > > https://bugs.freedesktop.org/show_bug.cgi?id=111632 after the Sign 
> > > off statement
> > > 
> > > > 
> > > > Signed-off-by: Srinivasan S <srinivasan.s@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/display/intel_dp_mst.c | 7 ++++++-
> > > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
> > > > b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > > > index eeeb3f933aa4..5b2278fdf675 100644
> > > > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > > > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > > > @@ -215,7 +215,12 @@ static void intel_mst_disable_dp(struct 
> > > > intel_encoder *encoder,
> > > >  
> > > >  	ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
> > > >  	if (ret) {
> > > > -		DRM_ERROR("failed to update payload %d\n", ret);
> > > > +		if (!connector ||
> > > > +		    connector->base.status != connector_status_connected) {
> > > > +			DRM_WARN("DP MST disconnect\n");
> > > 
> > > May be adding this check before calling drm_dp_update_payload_part1() is a better idea?
> > > If the connector is disconnected, why update payload?
> > > 
> > > Jani, Ville, thoughts?
> > 
> > Or just convert it to a debug?
> 
> Sure that will work, but do we really want to update the payload if the connector status is disconnected.
> So shouldnt checking that before calling the function be a better fix?
> 
> Manasi
> 
> > 
> > > 
> > > Regards
> > > Manasi
> > > 
> > > > +		} else {
> > > > +			DRM_ERROR("failed to update payload %d\n", ret);
> > > > +		}
> > > >  	}
> > > >  	if (old_crtc_state->has_audio)
> > > >  		intel_audio_codec_disable(encoder,
> > > > --
> > > > 2.7.4
> > > > 
> > 
> > --
> > Ville Syrjälä
> > Intel
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-19 12:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  1:39 [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable srinivasan.s
2019-09-18 17:50 ` Manasi Navare
2019-09-18 18:11   ` Ville Syrjälä
2019-09-18 18:25     ` Manasi Navare
2019-09-19  7:23       ` S, Srinivasan
2019-09-19 12:03         ` Ville Syrjälä [this message]
2019-09-19 13:52           ` S, Srinivasan
2019-09-25 15:02             ` S, Srinivasan
2019-09-30 20:06               ` S, Srinivasan
2019-09-19 12:18   ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2019-09-25  0:35 srinivasan.s
2019-10-01 12:01 ` Ville Syrjälä
2019-10-01 12:45   ` S, Srinivasan

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=20190919120331.GR1208@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=srinivasan.s@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