All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/dp_mst: Lower down debug info level when receive NAK
@ 2022-03-29  8:05 Wayne Lin
  2022-03-29 13:21 ` Harry Wentland
  0 siblings, 1 reply; 5+ messages in thread
From: Wayne Lin @ 2022-03-29  8:05 UTC (permalink / raw)
  To: dri-devel; +Cc: jerry.zuo, Wayne Lin

[Why]
It's reasonable that we receive NAK while doing DP_REMOTE_DPCD_READ.
Downstream device might reply NAK with the reason and source should
react accordingly.

e.g.
1. When downstream device can't handle corresponding message in time,
it then replies NAK as reason been set as DEFER.
2. When multi-function branch-sink device doesn't enumerate virtual
DP peer devices for those multi-function down facing ports. Without
virtual DPCD, branch device might reply NAK with reason as BAD_PARAM
indicating this port can't do aux DPCD read.

It's expected result. Not an error.

[How]
Use drm_dbg_kms() to replace drm_err() when receive NAK.

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
---
 drivers/gpu/drm/dp/drm_dp_mst_topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/dp/drm_dp_mst_topology.c b/drivers/gpu/drm/dp/drm_dp_mst_topology.c
index 11300b53d24f..764a6b59bc1e 100644
--- a/drivers/gpu/drm/dp/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/dp/drm_dp_mst_topology.c
@@ -3557,9 +3557,8 @@ static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,
 	if (ret < 0)
 		goto fail_free;
 
-	/* DPCD read should never be NACKed */
 	if (txmsg->reply.reply_type == 1) {
-		drm_err(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n",
+		drm_dbg_kms(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n",
 			mstb, port->port_num, offset, size);
 		ret = -EIO;
 		goto fail_free;
-- 
2.35.1


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

* Re: [PATCH] drm/dp_mst: Lower down debug info level when receive NAK
  2022-03-29  8:05 [PATCH] drm/dp_mst: Lower down debug info level when receive NAK Wayne Lin
@ 2022-03-29 13:21 ` Harry Wentland
  0 siblings, 0 replies; 5+ messages in thread
From: Harry Wentland @ 2022-03-29 13:21 UTC (permalink / raw)
  To: Wayne Lin, dri-devel; +Cc: jerry.zuo



On 2022-03-29 04:05, Wayne Lin wrote:
> [Why]
> It's reasonable that we receive NAK while doing DP_REMOTE_DPCD_READ.
> Downstream device might reply NAK with the reason and source should
> react accordingly.
> 
> e.g.
> 1. When downstream device can't handle corresponding message in time,
> it then replies NAK as reason been set as DEFER.
> 2. When multi-function branch-sink device doesn't enumerate virtual
> DP peer devices for those multi-function down facing ports. Without
> virtual DPCD, branch device might reply NAK with reason as BAD_PARAM
> indicating this port can't do aux DPCD read.
> 
> It's expected result. Not an error.
> 
> [How]
> Use drm_dbg_kms() to replace drm_err() when receive NAK.
> 
> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/dp/drm_dp_mst_topology.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/dp/drm_dp_mst_topology.c b/drivers/gpu/drm/dp/drm_dp_mst_topology.c
> index 11300b53d24f..764a6b59bc1e 100644
> --- a/drivers/gpu/drm/dp/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/dp/drm_dp_mst_topology.c
> @@ -3557,9 +3557,8 @@ static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,
>  	if (ret < 0)
>  		goto fail_free;
>  
> -	/* DPCD read should never be NACKed */
>  	if (txmsg->reply.reply_type == 1) {
> -		drm_err(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n",
> +		drm_dbg_kms(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n",
>  			mstb, port->port_num, offset, size);
>  		ret = -EIO;
>  		goto fail_free;


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

* Re: [PATCH] drm/dp_mst: Lower down debug info level when receive NAK
  2022-04-28 16:45 ` Lyude Paul
@ 2022-04-29  6:28   ` Lin, Wayne
  0 siblings, 0 replies; 5+ messages in thread
From: Lin, Wayne @ 2022-04-29  6:28 UTC (permalink / raw)
  To: Lyude Paul, dri-devel; +Cc: Siqueira, Rodrigo, Zuo, Jerry

[Public]

Thank you Lyude!

Regards,
Wayne
________________________________________
From: Lyude Paul <lyude@redhat.com>
Sent: Friday, April 29, 2022 00:45
To: Lin, Wayne; dri-devel@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com; Wentland, Harry; Zuo, Jerry; Siqueira, Rodrigo
Subject: Re: [PATCH] drm/dp_mst: Lower down debug info level when receive NAK

Reviewed-by: Lyude Paul <lyude@redhat.com>

Will push to drm-misc-next in a bit

On Thu, 2022-04-28 at 20:49 +0800, Wayne Lin wrote:
> [Why]
> It's reasonable that we receive NAK while doing DP_REMOTE_DPCD_READ.
> Downstream device might reply NAK with the reason and source should
> react accordingly.
>
> e.g.
> 1. When downstream device can't handle corresponding message in time,
> it then replies NAK as reason been set as DEFER.
> 2. When multi-function branch-sink device doesn't enumerate virtual
> DP peer devices for those multi-function down facing ports. Without
> virtual DPCD, branch device might reply NAK with reason as BAD_PARAM
> indicating this port can't do aux DPCD read.
>
> It's expected result. Not an error.
>
> [How]
> Use drm_dbg_kms() to replace drm_err() when receive NAK.
>
> Changes since v1:
> * drm_dp_mst_topology.c file path changed. Folder was rename from
>  'dp' to 'display'
>
> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> ---
>  drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 8526aae75c6d..f27aa0b95bea 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -3557,9 +3557,8 @@ static int drm_dp_send_dpcd_read(struct
> drm_dp_mst_topology_mgr *mgr,
>         if (ret < 0)
>                 goto fail_free;
>
> -       /* DPCD read should never be NACKed */
>         if (txmsg->reply.reply_type == 1) {
> -               drm_err(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x
> for %d bytes NAKed\n",
> +               drm_dbg_kms(mgr->dev, "mstb %p port %d: DPCD read on addr
> 0x%x for %d bytes NAKed\n",
>                         mstb, port->port_num, offset, size);
>                 ret = -EIO;
>                 goto fail_free;

--
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat


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

* Re: [PATCH] drm/dp_mst: Lower down debug info level when receive NAK
  2022-04-28 12:49 Wayne Lin
@ 2022-04-28 16:45 ` Lyude Paul
  2022-04-29  6:28   ` Lin, Wayne
  0 siblings, 1 reply; 5+ messages in thread
From: Lyude Paul @ 2022-04-28 16:45 UTC (permalink / raw)
  To: Wayne Lin, dri-devel; +Cc: rodrigo.siqueira, jerry.zuo

Reviewed-by: Lyude Paul <lyude@redhat.com>

Will push to drm-misc-next in a bit

On Thu, 2022-04-28 at 20:49 +0800, Wayne Lin wrote:
> [Why]
> It's reasonable that we receive NAK while doing DP_REMOTE_DPCD_READ.
> Downstream device might reply NAK with the reason and source should
> react accordingly.
> 
> e.g.
> 1. When downstream device can't handle corresponding message in time,
> it then replies NAK as reason been set as DEFER.
> 2. When multi-function branch-sink device doesn't enumerate virtual
> DP peer devices for those multi-function down facing ports. Without
> virtual DPCD, branch device might reply NAK with reason as BAD_PARAM
> indicating this port can't do aux DPCD read.
> 
> It's expected result. Not an error.
> 
> [How]
> Use drm_dbg_kms() to replace drm_err() when receive NAK.
> 
> Changes since v1:
> * drm_dp_mst_topology.c file path changed. Folder was rename from
>  'dp' to 'display'
> 
> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> ---
>  drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 8526aae75c6d..f27aa0b95bea 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -3557,9 +3557,8 @@ static int drm_dp_send_dpcd_read(struct
> drm_dp_mst_topology_mgr *mgr,
>         if (ret < 0)
>                 goto fail_free;
>  
> -       /* DPCD read should never be NACKed */
>         if (txmsg->reply.reply_type == 1) {
> -               drm_err(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x
> for %d bytes NAKed\n",
> +               drm_dbg_kms(mgr->dev, "mstb %p port %d: DPCD read on addr
> 0x%x for %d bytes NAKed\n",
>                         mstb, port->port_num, offset, size);
>                 ret = -EIO;
>                 goto fail_free;

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat


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

* [PATCH] drm/dp_mst: Lower down debug info level when receive NAK
@ 2022-04-28 12:49 Wayne Lin
  2022-04-28 16:45 ` Lyude Paul
  0 siblings, 1 reply; 5+ messages in thread
From: Wayne Lin @ 2022-04-28 12:49 UTC (permalink / raw)
  To: dri-devel; +Cc: rodrigo.siqueira, jerry.zuo, Wayne Lin

[Why]
It's reasonable that we receive NAK while doing DP_REMOTE_DPCD_READ.
Downstream device might reply NAK with the reason and source should
react accordingly.

e.g.
1. When downstream device can't handle corresponding message in time,
it then replies NAK as reason been set as DEFER.
2. When multi-function branch-sink device doesn't enumerate virtual
DP peer devices for those multi-function down facing ports. Without
virtual DPCD, branch device might reply NAK with reason as BAD_PARAM
indicating this port can't do aux DPCD read.

It's expected result. Not an error.

[How]
Use drm_dbg_kms() to replace drm_err() when receive NAK.

Changes since v1:
* drm_dp_mst_topology.c file path changed. Folder was rename from
 'dp' to 'display'

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index 8526aae75c6d..f27aa0b95bea 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -3557,9 +3557,8 @@ static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,
 	if (ret < 0)
 		goto fail_free;
 
-	/* DPCD read should never be NACKed */
 	if (txmsg->reply.reply_type == 1) {
-		drm_err(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n",
+		drm_dbg_kms(mgr->dev, "mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n",
 			mstb, port->port_num, offset, size);
 		ret = -EIO;
 		goto fail_free;
-- 
2.36.0


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

end of thread, other threads:[~2022-04-29  6:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29  8:05 [PATCH] drm/dp_mst: Lower down debug info level when receive NAK Wayne Lin
2022-03-29 13:21 ` Harry Wentland
2022-04-28 12:49 Wayne Lin
2022-04-28 16:45 ` Lyude Paul
2022-04-29  6:28   ` Lin, Wayne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.