drm/dp_mst: Lower down debug info level when receive NAK
Subsystems (2)
PATCH 1/1 drm/dp_mst: Lower down debug info level when receive NAK
[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'
--- drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/display/drm_dp_mst_topology.c +1 -2
@@ -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;
Signature · 1 line
2.36.0
Will push to drm-misc-next in a bit
Quoted 47 lines · Wayne Lin
[Why]
It's reasonable that we receive NAK while doingDP_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 asBAD_PARAMindicating this port can't do aux DPCD read.It's expected result. Not an error.
[How]
Usedrm_dbg_kms()to replacedrm_err()when receive NAK.Changes since v1:
*drm_dp_mst_topology.cfile path changed. Folder was rename from 'dp' to 'display'Signed-off-by Wayne Lin <[email protected]>Reviewed-by Harry Wentland <[email protected]>---
drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +--1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/display/drm_dp_mst_topology.c +0
-0@@ -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;
gotofail_free;
Signature · 3 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
Lin, Wayne
Reviewed-by Lyude Paul[Public]
Thank you Lyude!
Regards,
Wayne
________________________________________
From: Lyude Paul <[email protected]>
Sent: Friday, April 29, 2022 00:45
To: Lin, Wayne; [email protected]
Cc: [email protected]; Wentland, Harry; Zuo, Jerry; Siqueira, Rodrigo
Subject: Re: [PATCH] drm/dp_mst: Lower down debug info level when receive NAK
Will push to drm-misc-next in a bit
Quoted 44 lines · Wayne Lin
[Why]
It's reasonable that we receive NAK while doingDP_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 asBAD_PARAMindicating this port can't do aux DPCD read.It's expected result. Not an error.
[How]
Usedrm_dbg_kms()to replacedrm_err()when receive NAK.Changes since v1:
*drm_dp_mst_topology.cfile path changed. Folder was rename from 'dp' to 'display'Signed-off-by Wayne Lin <[email protected]>Reviewed-by Harry Wentland <[email protected]>--- drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/display/drm_dp_mst_topology.c +1
-2@@ -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",
Quoted 3 lines
mstb, port->port_num, offset, size);
ret = -EIO;
goto fail_free;--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat