From: Harry Wentland <harry.wentland@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: stable@vger.kernel.org, stanislav.lisovskiy@intel.com,
jerry.zuo@amd.com, bskeggs@redhat.com, Wayne.Lin@amd.com,
Harry Wentland <harry.wentland@amd.com>,
ville.syrjala@linux.intel.com, mario.limonciello@amd.com
Subject: [PATCH 3/7] drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD
Date: Thu, 19 Jan 2023 18:51:56 -0500 [thread overview]
Message-ID: <20230119235200.441386-4-harry.wentland@amd.com> (raw)
In-Reply-To: <20230119235200.441386-1-harry.wentland@amd.com>
From: Wayne Lin <Wayne.Lin@amd.com>
[Why & How]
Now the vc_start_slot is controlled at drm side. When we
service a long HPD, we still need to run
dm_helpers_dp_mst_write_payload_allocation_table() to update
drm mst_mgr's relevant variable. Otherwise, on the next plug-in,
payload will get assigned with a wrong start slot.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state")
Cc: stable@vger.kernel.org # 6.1
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index d9e490eca10f..bf5a31e2be8a 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -3999,10 +3999,13 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
struct fixed31_32 avg_time_slots_per_mtp = dc_fixpt_from_int(0);
int i;
bool mst_mode = (link->type == dc_connection_mst_branch);
+ /* adjust for drm changes*/
+ bool update_drm_mst_state = true;
const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
const struct dc_link_settings empty_link_settings = {0};
DC_LOGGER_INIT(link->ctx->logger);
+
/* deallocate_mst_payload is called before disable link. When mode or
* disable/enable monitor, new stream is created which is not in link
* stream[] yet. For this, payload is not allocated yet, so de-alloc
@@ -4018,7 +4021,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
&empty_link_settings,
avg_time_slots_per_mtp);
- if (mst_mode) {
+ if (mst_mode || update_drm_mst_state) {
/* when link is in mst mode, reply on mst manager to remove
* payload
*/
@@ -4081,11 +4084,18 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
stream->ctx,
stream);
+ if (!update_drm_mst_state)
+ dm_helpers_dp_mst_send_payload_allocation(
+ stream->ctx,
+ stream,
+ false);
+ }
+
+ if (update_drm_mst_state)
dm_helpers_dp_mst_send_payload_allocation(
stream->ctx,
stream,
false);
- }
return DC_OK;
}
--
2.39.0
WARNING: multiple messages have this Message-ID (diff)
From: Harry Wentland <harry.wentland@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: <ville.syrjala@linux.intel.com>, <stanislav.lisovskiy@intel.com>,
<bskeggs@redhat.com>, <jerry.zuo@amd.com>,
<mario.limonciello@amd.com>, <lyude@redhat.com>,
<stable@vger.kernel.org>, <Wayne.Lin@amd.com>,
"Harry Wentland" <harry.wentland@amd.com>
Subject: [PATCH 3/7] drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD
Date: Thu, 19 Jan 2023 18:51:56 -0500 [thread overview]
Message-ID: <20230119235200.441386-4-harry.wentland@amd.com> (raw)
In-Reply-To: <20230119235200.441386-1-harry.wentland@amd.com>
From: Wayne Lin <Wayne.Lin@amd.com>
[Why & How]
Now the vc_start_slot is controlled at drm side. When we
service a long HPD, we still need to run
dm_helpers_dp_mst_write_payload_allocation_table() to update
drm mst_mgr's relevant variable. Otherwise, on the next plug-in,
payload will get assigned with a wrong start slot.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state")
Cc: stable@vger.kernel.org # 6.1
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index d9e490eca10f..bf5a31e2be8a 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -3999,10 +3999,13 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
struct fixed31_32 avg_time_slots_per_mtp = dc_fixpt_from_int(0);
int i;
bool mst_mode = (link->type == dc_connection_mst_branch);
+ /* adjust for drm changes*/
+ bool update_drm_mst_state = true;
const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
const struct dc_link_settings empty_link_settings = {0};
DC_LOGGER_INIT(link->ctx->logger);
+
/* deallocate_mst_payload is called before disable link. When mode or
* disable/enable monitor, new stream is created which is not in link
* stream[] yet. For this, payload is not allocated yet, so de-alloc
@@ -4018,7 +4021,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
&empty_link_settings,
avg_time_slots_per_mtp);
- if (mst_mode) {
+ if (mst_mode || update_drm_mst_state) {
/* when link is in mst mode, reply on mst manager to remove
* payload
*/
@@ -4081,11 +4084,18 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
stream->ctx,
stream);
+ if (!update_drm_mst_state)
+ dm_helpers_dp_mst_send_payload_allocation(
+ stream->ctx,
+ stream,
+ false);
+ }
+
+ if (update_drm_mst_state)
dm_helpers_dp_mst_send_payload_allocation(
stream->ctx,
stream,
false);
- }
return DC_OK;
}
--
2.39.0
WARNING: multiple messages have this Message-ID (diff)
From: Harry Wentland <harry.wentland@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: stable@vger.kernel.org, stanislav.lisovskiy@intel.com,
jerry.zuo@amd.com, bskeggs@redhat.com, Wayne.Lin@amd.com,
mario.limonciello@amd.com
Subject: [PATCH 3/7] drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD
Date: Thu, 19 Jan 2023 18:51:56 -0500 [thread overview]
Message-ID: <20230119235200.441386-4-harry.wentland@amd.com> (raw)
In-Reply-To: <20230119235200.441386-1-harry.wentland@amd.com>
From: Wayne Lin <Wayne.Lin@amd.com>
[Why & How]
Now the vc_start_slot is controlled at drm side. When we
service a long HPD, we still need to run
dm_helpers_dp_mst_write_payload_allocation_table() to update
drm mst_mgr's relevant variable. Otherwise, on the next plug-in,
payload will get assigned with a wrong start slot.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state")
Cc: stable@vger.kernel.org # 6.1
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index d9e490eca10f..bf5a31e2be8a 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -3999,10 +3999,13 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
struct fixed31_32 avg_time_slots_per_mtp = dc_fixpt_from_int(0);
int i;
bool mst_mode = (link->type == dc_connection_mst_branch);
+ /* adjust for drm changes*/
+ bool update_drm_mst_state = true;
const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
const struct dc_link_settings empty_link_settings = {0};
DC_LOGGER_INIT(link->ctx->logger);
+
/* deallocate_mst_payload is called before disable link. When mode or
* disable/enable monitor, new stream is created which is not in link
* stream[] yet. For this, payload is not allocated yet, so de-alloc
@@ -4018,7 +4021,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
&empty_link_settings,
avg_time_slots_per_mtp);
- if (mst_mode) {
+ if (mst_mode || update_drm_mst_state) {
/* when link is in mst mode, reply on mst manager to remove
* payload
*/
@@ -4081,11 +4084,18 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
stream->ctx,
stream);
+ if (!update_drm_mst_state)
+ dm_helpers_dp_mst_send_payload_allocation(
+ stream->ctx,
+ stream,
+ false);
+ }
+
+ if (update_drm_mst_state)
dm_helpers_dp_mst_send_payload_allocation(
stream->ctx,
stream,
false);
- }
return DC_OK;
}
--
2.39.0
next prev parent reply other threads:[~2023-01-19 23:52 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 23:51 [PATCH 0/7] Fix MST on amdgpu Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` [PATCH 1/7] drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count assignments Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` [PATCH 2/7] drm/amdgpu/display/mst: limit payload to be updated one by one Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland [this message]
2023-01-19 23:51 ` [PATCH 3/7] drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` [PATCH 4/7] drm/drm_print: correct format problem Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:54 ` kernel test robot
2023-01-19 23:51 ` [PATCH 5/7] drm/display/dp_mst: Correct the kref of port Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` [PATCH 6/7] drm/amdgpu/display/mst: adjust the naming of mst_port and port of aconnector Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:52 ` [PATCH 7/7] drm/amdgpu/display/mst: adjust the logic in 2nd phase of updating payload Harry Wentland
2023-01-19 23:52 ` Harry Wentland
2023-01-19 23:52 ` Harry Wentland
2023-01-20 23:15 ` [PATCH 0/7] Fix MST on amdgpu Lyude Paul
2023-01-20 23:15 ` Lyude Paul
2023-01-20 23:15 ` Lyude Paul
2023-01-23 17:03 ` Harry Wentland
2023-01-23 17:03 ` Harry Wentland
2023-01-23 17:03 ` Harry Wentland
2023-01-22 19:12 ` Didier 'OdyX' Raboud
2023-01-22 19:12 ` Didier 'OdyX' Raboud
2023-01-22 19:12 ` Didier 'OdyX' Raboud
2023-01-23 17:03 ` Harry Wentland
2023-01-23 17:03 ` Harry Wentland
2023-01-23 17:03 ` Harry Wentland
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=20230119235200.441386-4-harry.wentland@amd.com \
--to=harry.wentland@amd.com \
--cc=Wayne.Lin@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jerry.zuo@amd.com \
--cc=mario.limonciello@amd.com \
--cc=stable@vger.kernel.org \
--cc=stanislav.lisovskiy@intel.com \
--cc=ville.syrjala@linux.intel.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.