All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()
@ 2019-12-02  3:58 ` Wayne Lin
  0 siblings, 0 replies; 11+ messages in thread
From: Wayne Lin @ 2019-12-02  3:58 UTC (permalink / raw)
  To: dri-devel, amd-gfx
  Cc: Jerry.Zuo, harry.wentland, Nicholas.Kazlauskas, Wayne Lin

[Why]
If the payload_state is DP_PAYLOAD_DELETE_LOCAL in series, current
code doesn't delete the payload at current index and just move the
index to next one after shuffling payloads.

[How]
After shuffling payloads, decide whether to move on index or not
according to payload_state of current payload.

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

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 81e92b260d7a..8da5d461ea01 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3176,7 +3176,8 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)
 			drm_dp_mst_topology_put_port(port);
 	}
 
-	for (i = 0; i < mgr->max_payloads; i++) {
+	for (i = 0; i < mgr->max_payloads;
+		(mgr->payloads[i].payload_state == DP_PAYLOAD_DELETE_LOCAL) ? i : i++) {
 		if (mgr->payloads[i].payload_state != DP_PAYLOAD_DELETE_LOCAL)
 			continue;
 
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2019-12-03  4:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-02  3:58 [PATCH] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1() Wayne Lin
2019-12-02  3:58 ` Wayne Lin
2019-12-02  3:58 ` Wayne Lin
2019-12-02 16:03 ` Liu, Zhan
2019-12-02 16:03   ` Liu, Zhan
2019-12-02 16:03   ` Liu, Zhan
2019-12-03  0:23 ` Lyude Paul
2019-12-03  0:23   ` Lyude Paul
2019-12-03  0:23   ` Lyude Paul
2019-12-03  4:18   ` Lin, Wayne
2019-12-03  4:18     ` 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.