dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
@ 2019-09-25  0:35 srinivasan.s
  2019-10-01 12:01 ` Ville Syrjälä
  0 siblings, 1 reply; 13+ messages in thread
From: srinivasan.s @ 2019-09-25  0:35 UTC (permalink / raw)
  To: intel-gfx, jani.nikula, manasi.d.navare, ville.syrjala,
	lakshminarayana.vudum, dri-devel
  Cc: Srinivasan S

From: Srinivasan S <srinivasan.s@intel.com>

This patch avoids DP MST payload error message in dmesg, as it is trying
to update the payload to the disconnected DP MST device. After DP MST
device is disconnected we should not be updating the payload and
hence remove the error.

v2: Removed the connector status check and converted from error to debug.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111632
Signed-off-by: Srinivasan S <srinivasan.s@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
 1 file changed, 1 insertion(+), 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..497a6ae0d2c0 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -215,7 +215,7 @@ 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);
+		DRM_DEBUG_KMS("failed to update payload %d\n", ret);
 	}
 	if (old_crtc_state->has_audio)
 		intel_audio_codec_disable(encoder,
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-25  0:35 [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable srinivasan.s
@ 2019-10-01 12:01 ` Ville Syrjälä
  2019-10-01 12:45   ` S, Srinivasan
  0 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2019-10-01 12:01 UTC (permalink / raw)
  To: srinivasan.s; +Cc: manasi.d.navare, intel-gfx, dri-devel, lakshminarayana.vudum

On Wed, Sep 25, 2019 at 06:05:42AM +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 update the payload to the disconnected DP MST device. After DP MST
> device is disconnected we should not be updating the payload and
> hence remove the error.
> 
> v2: Removed the connector status check and converted from error to debug.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111632
> Signed-off-by: Srinivasan S <srinivasan.s@intel.com>

Pushed to dinq. Thanks for the patch.

PS. Next time please use --in-reply-to when sending an updated patch
so that it's easier to keep track of the discussion.

> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
>  1 file changed, 1 insertion(+), 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..497a6ae0d2c0 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -215,7 +215,7 @@ 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);
> +		DRM_DEBUG_KMS("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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-10-01 12:01 ` Ville Syrjälä
@ 2019-10-01 12:45   ` S, Srinivasan
  0 siblings, 0 replies; 13+ messages in thread
From: S, Srinivasan @ 2019-10-01 12:45 UTC (permalink / raw)
  To: Ville Syrjälä,
	Navare, Manasi D, Kahola, Mika, Nikula, Jani, Vudum,
	Lakshminarayana
  Cc: intel-gfx, dri-devel

Thanks a lot Manasi, Ville, Mika, Jani, Lakshmi, for all your time in reviewing this patch.

Best Regards,

> -----Original Message-----
> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Ville
> Syrjälä
> Sent: Tuesday, October 1, 2019 5:31 PM
> To: S, Srinivasan <srinivasan.s@intel.com>
> Cc: Navare, Manasi D <manasi.d.navare@intel.com>; intel-
> gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Vudum,
> Lakshminarayana <lakshminarayana.vudum@intel.com>
> Subject: Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC
> cable
> 
> On Wed, Sep 25, 2019 at 06:05:42AM +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 update the payload to the disconnected DP MST device. After DP MST
> > device is disconnected we should not be updating the payload and
> > hence remove the error.
> >
> > v2: Removed the connector status check and converted from error to debug.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111632
> > Signed-off-by: Srinivasan S <srinivasan.s@intel.com>
> 
> Pushed to dinq. Thanks for the patch.
> 
> PS. Next time please use --in-reply-to when sending an updated patch
> so that it's easier to keep track of the discussion.
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
> >  1 file changed, 1 insertion(+), 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..497a6ae0d2c0 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > @@ -215,7 +215,7 @@ 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);
> > +		DRM_DEBUG_KMS("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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-25 15:02             ` S, Srinivasan
@ 2019-09-30 20:06               ` S, Srinivasan
  0 siblings, 0 replies; 13+ messages in thread
From: S, Srinivasan @ 2019-09-30 20:06 UTC (permalink / raw)
  To: 'intel-gfx@lists.freedesktop.org'
  Cc: Navare, Manasi D, 'dri-devel@lists.freedesktop.org'

Could anyone please review the patch below & let me know if any other ideas please?

https://patchwork.freedesktop.org/patch/332806/?series=66837&rev=3

Thanks,

> -----Original Message-----
> From: S, Srinivasan
> Sent: Wednesday, September 25, 2019 8:33 PM
> To: 'Ville Syrjälä' <ville.syrjala@linux.intel.com>
> Cc: Navare, Manasi D <manasi.d.navare@intel.com>; '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
> 
> Hi Ville,
> 
> I have revised the patch from DRM_ERROR to DRM_DEBUG, could you please
> review?
> 
> https://patchwork.freedesktop.org/patch/332806/?series=66837&rev=3
> 
> Thanks,
> 
> -----Original Message-----
> From: S, Srinivasan
> Sent: Thursday, September 19, 2019 7:22 PM
> To: 'Ville Syrjälä' <ville.syrjala@linux.intel.com>
> Cc: Navare, Manasi D <manasi.d.navare@intel.com>; '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
> 
> Then it's better that, could we change it to DRM_DEBUG_KMS("failed to update
> payload %d\n", ret); instead of DRM_ERROR("failed to update payload %d\n",
> ret);, without any connector status check, would that be fine?
> 
> Regards,
> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Thursday, September 19, 2019 5:34 PM
> To: S, Srinivasan <srinivasan.s@intel.com>
> Cc: Navare, Manasi D <manasi.d.navare@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 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-19 13:52           ` S, Srinivasan
@ 2019-09-25 15:02             ` S, Srinivasan
  2019-09-30 20:06               ` S, Srinivasan
  0 siblings, 1 reply; 13+ messages in thread
From: S, Srinivasan @ 2019-09-25 15:02 UTC (permalink / raw)
  To: 'Ville Syrjälä'
  Cc: 'intel-gfx@lists.freedesktop.org',
	'dri-devel@lists.freedesktop.org'

Hi Ville,

I have revised the patch from DRM_ERROR to DRM_DEBUG, could you please review?

https://patchwork.freedesktop.org/patch/332806/?series=66837&rev=3

Thanks,

-----Original Message-----
From: S, Srinivasan 
Sent: Thursday, September 19, 2019 7:22 PM
To: 'Ville Syrjälä' <ville.syrjala@linux.intel.com>
Cc: Navare, Manasi D <manasi.d.navare@intel.com>; '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

Then it's better that, could we change it to DRM_DEBUG_KMS("failed to update payload %d\n", ret); instead of DRM_ERROR("failed to update payload %d\n", ret);, without any connector status check, would that be fine?

Regards,
-----Original Message-----
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Sent: Thursday, September 19, 2019 5:34 PM
To: S, Srinivasan <srinivasan.s@intel.com>
Cc: Navare, Manasi D <manasi.d.navare@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 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-19 12:03         ` Ville Syrjälä
@ 2019-09-19 13:52           ` S, Srinivasan
  2019-09-25 15:02             ` S, Srinivasan
  0 siblings, 1 reply; 13+ messages in thread
From: S, Srinivasan @ 2019-09-19 13:52 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Navare, Manasi D, intel-gfx, dri-devel

Then it's better that, could we change it to DRM_DEBUG_KMS("failed to update payload %d\n", ret); instead of DRM_ERROR("failed to update payload %d\n", ret);, without any connector status check, would that be fine?

Regards,
-----Original Message-----
From: Ville Syrjälä <ville.syrjala@linux.intel.com> 
Sent: Thursday, September 19, 2019 5:34 PM
To: S, Srinivasan <srinivasan.s@intel.com>
Cc: Navare, Manasi D <manasi.d.navare@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 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-18 17:50 ` Manasi Navare
  2019-09-18 18:11   ` Ville Syrjälä
@ 2019-09-19 12:18   ` Jani Nikula
  1 sibling, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2019-09-19 12:18 UTC (permalink / raw)
  To: Manasi Navare, srinivasan.s; +Cc: intel-gfx, dri-devel

On Wed, 18 Sep 2019, Manasi Navare <manasi.d.navare@intel.com> 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

ITYM *before* Signed-off-by. But yeah, use the Bugzilla: tag, and please
use git log to see plenty of examples.

BR,
Jani.

>
>> 
>> 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?
>
> 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
>> 

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-19  7:23       ` S, Srinivasan
@ 2019-09-19 12:03         ` Ville Syrjälä
  2019-09-19 13:52           ` S, Srinivasan
  0 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2019-09-19 12:03 UTC (permalink / raw)
  To: S, Srinivasan; +Cc: intel-gfx, dri-devel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-18 18:25     ` Manasi Navare
@ 2019-09-19  7:23       ` S, Srinivasan
  2019-09-19 12:03         ` Ville Syrjälä
  0 siblings, 1 reply; 13+ messages in thread
From: S, Srinivasan @ 2019-09-19  7:23 UTC (permalink / raw)
  To: Navare, Manasi D, Ville Syrjälä; +Cc: intel-gfx, dri-devel

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);
                }
        }

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-18 18:11   ` Ville Syrjälä
@ 2019-09-18 18:25     ` Manasi Navare
  2019-09-19  7:23       ` S, Srinivasan
  0 siblings, 1 reply; 13+ messages in thread
From: Manasi Navare @ 2019-09-18 18:25 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel

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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  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 12:18   ` Jani Nikula
  1 sibling, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2019-09-18 18:11 UTC (permalink / raw)
  To: Manasi Navare; +Cc: srinivasan.s, intel-gfx, dri-devel

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?

> 
> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
  2019-09-18  1:39 srinivasan.s
@ 2019-09-18 17:50 ` Manasi Navare
  2019-09-18 18:11   ` Ville Syrjälä
  2019-09-19 12:18   ` Jani Nikula
  0 siblings, 2 replies; 13+ messages in thread
From: Manasi Navare @ 2019-09-18 17:50 UTC (permalink / raw)
  To: srinivasan.s; +Cc: dri-devel, intel-gfx

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?

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
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable
@ 2019-09-18  1:39 srinivasan.s
  2019-09-18 17:50 ` Manasi Navare
  0 siblings, 1 reply; 13+ messages in thread
From: srinivasan.s @ 2019-09-18  1:39 UTC (permalink / raw)
  To: intel-gfx, jani.nikula, manasi.d.navare, ville.syrjala, dri-devel
  Cc: Srinivasan S

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

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");
+		} else {
+			DRM_ERROR("failed to update payload %d\n", ret);
+		}
 	}
 	if (old_crtc_state->has_audio)
 		intel_audio_codec_disable(encoder,
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-10-01 12:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25  0:35 [PATCH] drm/i915/dp: Fix DP MST error after unplugging TypeC cable srinivasan.s
2019-10-01 12:01 ` Ville Syrjälä
2019-10-01 12:45   ` S, Srinivasan
  -- strict thread matches above, loose matches on Subject: below --
2019-09-18  1:39 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ä
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

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).