From: Wayne Lin <Wayne.Lin@amd.com>
To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org>
Cc: Jerry.Zuo@amd.com, harry.wentland@amd.com,
Nicholas.Kazlauskas@amd.com, Wayne Lin <Wayne.Lin@amd.com>
Subject: [PATCH] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()
Date: Mon, 2 Dec 2019 11:58:41 +0800 [thread overview]
Message-ID: <20191202035841.16984-1-Wayne.Lin@amd.com> (raw)
[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
WARNING: multiple messages have this Message-ID (diff)
From: Wayne Lin <Wayne.Lin@amd.com>
To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: Jerry.Zuo@amd.com, Nicholas.Kazlauskas@amd.com,
Wayne Lin <Wayne.Lin@amd.com>
Subject: [PATCH] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()
Date: Mon, 2 Dec 2019 11:58:41 +0800 [thread overview]
Message-ID: <20191202035841.16984-1-Wayne.Lin@amd.com> (raw)
[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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Wayne Lin <Wayne.Lin@amd.com>
To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org>
Cc: Jerry.Zuo@amd.com, Nicholas.Kazlauskas@amd.com,
Wayne Lin <Wayne.Lin@amd.com>
Subject: [PATCH] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()
Date: Mon, 2 Dec 2019 11:58:41 +0800 [thread overview]
Message-ID: <20191202035841.16984-1-Wayne.Lin@amd.com> (raw)
Message-ID: <20191202035841.z_QGNVqBQmOx4CChsCbshew72Gn27BPj63WsMFTaazw@z> (raw)
[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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2019-12-02 3:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 3:58 Wayne Lin [this message]
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 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191202035841.16984-1-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=Jerry.Zuo@amd.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.