Recently someone else from Red Hat notified me that their dock had stopped working in Fedora after the recent 5.6 kernel update. It turns out that Fedora picked up a couple of extra post-5.6 fixes for MST (these are the F32 shas):
* 7012f01efd65461c1adc93bfcdc015d95a940672 drm/dp_mst: Fix W=1 warnings * 0cf94a193d2219c75d666c55abc8b5270550f87d drm/dp_mst: Make drm_dp_mst_dpcd_write() consistent with drm_dp_dpcd_write() * 89c111383b8bd08c6fed3c35f1a9c2bda7dd1c4b drm/dp_mst: Fix drm_dp_check_mstb_guid() return code
The first patch in that series regressed a couple of things, and the second two patches fixed said regressions - but there was still one issue leftover that I didn't notice and fix until last week. I've backported that patch so it can be included in F31/32.
Lyude Paul (1): drm/dp_mst: Fix drm_dp_send_dpcd_write() return code
drivers/gpu/drm/drm_dp_mst_topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drm_dp_mst_wait_tx_reply() returns > 1 if time elapsed in wait_event_timeout() before check_txmsg_state(mgr, txmsg) evaluated to true. However, we make the mistake of returning this time from drm_dp_send_dpcd_write() on success instead of returning the number of bytes written - causing spontaneous failures during link probing:
[drm:drm_dp_send_link_address [drm_kms_helper]] *ERROR* GUID check on 10:01 failed: 3975
Yikes! So, fix this by returning the number of bytes written on success instead.
Signed-off-by: Lyude Paul lyude@redhat.com Fixes: cb897542c6d2 ("drm/dp_mst: Fix W=1 warnings") Cc: Benjamin Gaignard benjamin.gaignard@st.com Cc: Sean Paul sean@poorly.run Acked-by: Alex Deucher alexander.deucher@amd.com Reviewed-by: Sean Paul sean@poorly.run Link: https://patchwork.freedesktop.org/patch/msgid/20200424190722.775284-1-lyude@... --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 77f6d2cbefac..46920e9be9e6 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3438,8 +3438,12 @@ static int drm_dp_send_dpcd_write(struct drm_dp_mst_topology_mgr *mgr, drm_dp_queue_down_tx(mgr, txmsg);
ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); - if (ret > 0 && txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) - ret = -EIO; + if (ret > 0) { + if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK) + ret = -EIO; + else + ret = size; + }
kfree(txmsg); fail_put:
On Mon, Apr 27, 2020 at 2:50 PM Lyude Paul lyude@redhat.com wrote:
Recently someone else from Red Hat notified me that their dock had stopped working in Fedora after the recent 5.6 kernel update. It turns out that Fedora picked up a couple of extra post-5.6 fixes for MST (these are the F32 shas):
- 7012f01efd65461c1adc93bfcdc015d95a940672 drm/dp_mst: Fix W=1 warnings
- 0cf94a193d2219c75d666c55abc8b5270550f87d drm/dp_mst: Make drm_dp_mst_dpcd_write() consistent with drm_dp_dpcd_write()
- 89c111383b8bd08c6fed3c35f1a9c2bda7dd1c4b drm/dp_mst: Fix drm_dp_check_mstb_guid() return code
The first patch in that series regressed a couple of things, and the second two patches fixed said regressions - but there was still one issue leftover that I didn't notice and fix until last week. I've backported that patch so it can be included in F31/32.
Thanks, this has been applied to Fedora 32/31/30 and will make the 5.6.8 builds.
Justin
kernel@lists.fedoraproject.org