[Why & How]
According to DP spec, broadcast message LCT equals to 1 and LCR equals
to 6. Current implementation is incorrect. Fix it.
In addition, revise a bit the hdr->rad handling to include broadcast
case.

Signed-off-by: Wayne Lin <wayne....@amd.com>
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c 
b/drivers/gpu/drm/drm_dp_mst_topology.c
index 17dbed0a9800..f11b3f718031 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -2727,10 +2727,15 @@ static int set_hdr_from_dst_qlock(struct 
drm_dp_sideband_msg_hdr *hdr,
        else
                hdr->broadcast = 0;
        hdr->path_msg = txmsg->path_msg;
-       hdr->lct = mstb->lct;
-       hdr->lcr = mstb->lct - 1;
-       if (mstb->lct > 1)
-               memcpy(hdr->rad, mstb->rad, mstb->lct / 2);
+       if (hdr->broadcast) {
+               hdr->lct = 1;
+               hdr->lcr = 6;
+       } else {
+               hdr->lct = mstb->lct;
+               hdr->lcr = mstb->lct - 1;
+       }
+
+       memcpy(hdr->rad, mstb->rad, hdr->lct / 2);
 
        return 0;
 }
-- 
2.17.1

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

Reply via email to