From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
roman.li@amd.com, solomon.chiu@amd.com, Aurabindo.Pillai@amd.com,
Nevenko Stupar <Nevenko.Stupar@amd.com>,
Alvin Lee <Alvin.Lee2@amd.com>,
wayne.lin@amd.com, Jun Lei <Jun.Lei@amd.com>,
Bhawanpreet.Lakha@amd.com, agustin.gutierrez@amd.com,
pavle.kotarac@amd.com
Subject: [PATCH V3 14/47] drm/amd/display: SubVP pipe split case
Date: Wed, 14 Sep 2022 13:10:13 +0800 [thread overview]
Message-ID: <20220914051046.1131186-15-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20220914051046.1131186-1-Wayne.Lin@amd.com>
From: Alvin Lee <Alvin.Lee2@amd.com>
[Why and How]
For SubVP pipe split case, pass in split index for
main and phantom pipes to ensure that the P-State
sequence will force P-State for all required pipes.
Reviewed-by: Nevenko Stupar <Nevenko.Stupar@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
---
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 29 ++++++++++++++++++-
.../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 11 ++++---
.../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 18 ++++++++----
3 files changed, 47 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
index df5ad02fc4b3..f09a3ddcf30d 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
@@ -674,12 +674,32 @@ static void populate_subvp_cmd_pipe_info(struct dc *dc,
pipe_data->pipe_config.subvp_data.processing_delay_lines =
div64_u64(((uint64_t)(dc->caps.subvp_fw_processing_delay_us) * ((uint64_t)phantom_timing->pix_clk_100hz * 100) +
((uint64_t)phantom_timing->h_total * 1000000 - 1)), ((uint64_t)phantom_timing->h_total * 1000000));
+
+ /* TODO: Uncomment once FW headers are promoted
+ if (subvp_pipe->bottom_pipe) {
+ pipe_data->pipe_config.subvp_data.main_split_pipe_index = subvp_pipe->bottom_pipe->pipe_idx;
+ } else if (subvp_pipe->next_odm_pipe) {
+ pipe_data->pipe_config.subvp_data.main_split_pipe_index = subvp_pipe->next_odm_pipe->pipe_idx;
+ } else {
+ pipe_data->pipe_config.subvp_data.main_split_pipe_index = 0;
+ }
+ */
+
// Find phantom pipe index based on phantom stream
for (j = 0; j < dc->res_pool->pipe_count; j++) {
struct pipe_ctx *phantom_pipe = &context->res_ctx.pipe_ctx[j];
if (phantom_pipe->stream == subvp_pipe->stream->mall_stream_config.paired_stream) {
pipe_data->pipe_config.subvp_data.phantom_pipe_index = phantom_pipe->pipe_idx;
+ /* TODO: Uncomment once FW headers are promoted
+ if (phantom_pipe->bottom_pipe) {
+ pipe_data->pipe_config.subvp_data.phantom_split_pipe_index = phantom_pipe->bottom_pipe->pipe_idx;
+ } else if (phantom_pipe->next_odm_pipe) {
+ pipe_data->pipe_config.subvp_data.phantom_split_pipe_index = phantom_pipe->next_odm_pipe->pipe_idx;
+ } else {
+ pipe_data->pipe_config.subvp_data.phantom_split_pipe_index = 0;
+ }
+ */
break;
}
}
@@ -724,7 +744,9 @@ void dc_dmub_setup_subvp_dmub_command(struct dc *dc,
if (!pipe->stream)
continue;
- if (pipe->plane_state && !pipe->top_pipe &&
+ /* For SubVP pipe count, only count the top most (ODM / MPC) pipe
+ */
+ if (pipe->plane_state && !pipe->top_pipe && !pipe->prev_odm_pipe &&
pipe->stream->mall_stream_config.type == SUBVP_MAIN)
subvp_pipes[subvp_count++] = pipe;
}
@@ -737,7 +759,12 @@ void dc_dmub_setup_subvp_dmub_command(struct dc *dc,
if (!pipe->stream)
continue;
+ /* When populating subvp cmd info, only pass in the top most (ODM / MPC) pipe.
+ * Any ODM or MPC splits being used in SubVP will be handled internally in
+ * populate_subvp_cmd_pipe_info
+ */
if (pipe->plane_state && pipe->stream->mall_stream_config.paired_stream &&
+ !pipe->top_pipe && !pipe->prev_odm_pipe &&
pipe->stream->mall_stream_config.type == SUBVP_MAIN) {
populate_subvp_cmd_pipe_info(dc, context, &cmd, pipe, cmd_pipe_index++);
} else if (pipe->plane_state && pipe->stream->mall_stream_config.type == SUBVP_NONE) {
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 86ab3a71c67b..ab56f14d6247 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -1906,10 +1906,13 @@ void dcn20_post_unlock_program_front_end(
* can underflow due to HUBP_VTG_SEL programming if done in the regular front end
* programming sequence).
*/
- if (pipe->stream && pipe->stream->mall_stream_config.type == SUBVP_PHANTOM) {
- if (dc->hwss.update_phantom_vp_position)
- dc->hwss.update_phantom_vp_position(dc, context, pipe);
- dcn20_program_pipe(dc, pipe, context);
+ while (pipe) {
+ if (pipe->stream && pipe->stream->mall_stream_config.type == SUBVP_PHANTOM) {
+ if (dc->hwss.update_phantom_vp_position)
+ dc->hwss.update_phantom_vp_position(dc, context, pipe);
+ dcn20_program_pipe(dc, pipe, context);
+ }
+ pipe = pipe->bottom_pipe;
}
}
}
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
index 2b3ffa300f25..7ff7cd8b5c93 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
@@ -1160,17 +1160,23 @@ static void dcn32_full_validate_bw_helper(struct dc *dc,
vba->VoltageLevel = *vlevel;
}
} else {
- // only call dcn20_validate_apply_pipe_split_flags if we found a supported config
- memset(split, 0, MAX_PIPES * sizeof(int));
- memset(merge, 0, MAX_PIPES * sizeof(bool));
- *vlevel = dcn20_validate_apply_pipe_split_flags(dc, context, *vlevel, split, merge);
- vba->VoltageLevel = *vlevel;
-
// Most populate phantom DLG params before programming hardware / timing for phantom pipe
DC_FP_START();
dcn32_helper_populate_phantom_dlg_params(dc, context, pipes, *pipe_cnt);
DC_FP_END();
+ /* Call validate_apply_pipe_split flags after calling DML getters for
+ * phantom dlg params, or some of the VBA params indicating pipe split
+ * can be overwritten by the getters.
+ *
+ * When setting up SubVP config, all pipes are merged before attempting to
+ * add phantom pipes. If pipe split (ODM / MPC) is required, both the main
+ * and phantom pipes will be split in the regular pipe splitting sequence.
+ */
+ memset(split, 0, MAX_PIPES * sizeof(int));
+ memset(merge, 0, MAX_PIPES * sizeof(bool));
+ *vlevel = dcn20_validate_apply_pipe_split_flags(dc, context, *vlevel, split, merge);
+ vba->VoltageLevel = *vlevel;
// Note: We can't apply the phantom pipes to hardware at this time. We have to wait
// until driver has acquired the DMCUB lock to do it safely.
}
--
2.37.3
next prev parent reply other threads:[~2022-09-14 5:14 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 5:09 [PATCH V3 00/47] DC Patches September 14, 2022 Wayne Lin
2022-09-14 5:10 ` [PATCH V3 01/47] drm/amd/display: Port DCN30 420 logic to DCN32 Wayne Lin
2022-09-14 5:10 ` [PATCH V3 02/47] drm/amd/display: Remove some unused definitions from DCN32/321 Wayne Lin
2022-09-14 5:10 ` [PATCH V3 03/47] drm/amd/display: Fix pipe split prediction Wayne Lin
2022-09-14 5:10 ` [PATCH V3 04/47] drm/amd/display: add debug option for dramclk_change_latency in apu Wayne Lin
2022-09-14 5:10 ` [PATCH V3 05/47] drm/amd/display: Various logs added Wayne Lin
2022-09-14 5:10 ` [PATCH V3 06/47] drm/amd/display: Only consider pixle rate div policy for DCN32+ Wayne Lin
2022-09-14 5:10 ` [PATCH V3 07/47] drm/amd/display: Fix double cursor on non-video RGB MPO Wayne Lin
2022-09-14 5:10 ` [PATCH V3 08/47] drm/amd/display: fix dcn315 memory channel count and width read Wayne Lin
2022-09-14 5:10 ` [PATCH V3 09/47] drm/amd/display: Assume an LTTPR is always present on fixed_vs links Wayne Lin
2022-09-14 5:10 ` [PATCH V3 10/47] drm/amd/display: rework recent update PHY state commit Wayne Lin
2022-09-14 5:10 ` [PATCH V3 11/47] drm/amd/display: support proper mst payload removal when link is not in mst mode in dc Wayne Lin
2022-09-14 5:10 ` [PATCH V3 12/47] drm/amd/display: For ODM seamless transition require AUTO mode Wayne Lin
2022-09-14 5:10 ` [PATCH V3 13/47] drm/amd/display: Add debug option for allocating extra way for cursor Wayne Lin
2022-09-14 5:10 ` Wayne Lin [this message]
2022-09-14 5:10 ` [PATCH V3 15/47] drm/amd/display: Disable SubVP on driver disable Wayne Lin
2022-09-14 5:10 ` [PATCH V3 16/47] drm/amd/display: Fix SubVP way calculation Wayne Lin
2022-09-14 5:10 ` [PATCH V3 17/47] drm/amd/display: [FW Promotion] Release 0.0.134.0 Wayne Lin
2022-09-14 5:10 ` [PATCH V3 18/47] drm/amd/display: 3.2.203 Wayne Lin
2022-09-14 5:10 ` [PATCH V3 19/47] drm/amd/display: Refactor edp panel power sequencer(PPS) codes Wayne Lin
2022-09-14 5:10 ` [PATCH V3 20/47] drm/amd/display: update gamut remap if plane has changed Wayne Lin
2022-09-14 5:10 ` [PATCH V3 21/47] drm/amd/display: skip audio setup when audio stream is enabled Wayne Lin
2022-09-14 5:10 ` [PATCH V3 22/47] drm/amd/display: Uncomment SubVP pipe split assignment in driver Wayne Lin
2022-09-14 5:10 ` [PATCH V3 23/47] drm/amd/display: Fix urgent latency override for DCN32/DCN321 Wayne Lin
2022-09-14 5:10 ` [PATCH V3 24/47] drm/amd/display: correct hostvm flag Wayne Lin
2022-09-14 5:10 ` [PATCH V3 25/47] drm/amd/display: Added new DCN301 Asic Id Wayne Lin
2022-09-14 5:10 ` [PATCH V3 26/47] drm/amd/display: Removing 2 phys Wayne Lin
2022-09-14 5:10 ` [PATCH V3 27/47] drm/amd/display: Expose few dchubbub functions Wayne Lin
2022-09-14 5:10 ` [PATCH V3 28/47] drm/amd/display: Update dummy P-state search to use DCN32 DML Wayne Lin
2022-09-14 5:10 ` [PATCH V3 29/47] drm/amd/display: Display distortion after hotplug 5K tiled display Wayne Lin
2022-09-14 5:10 ` [PATCH V3 30/47] drm/amd/display: Fix DP MST timeslot issue when fallback happened Wayne Lin
2022-09-14 5:10 ` [PATCH V3 31/47] drm/amd/display: Don't allocate DET for phantom pipes Wayne Lin
2022-09-14 5:10 ` [PATCH V3 32/47] drm/amd/display: Ignore k1/k2 values for virtual signal Wayne Lin
2022-09-14 5:10 ` [PATCH V3 33/47] drm/amd/display: increase dcn315 pstate change latency Wayne Lin
2022-09-14 5:10 ` [PATCH V3 34/47] drm/amd/display: do not compare integers of different widths Wayne Lin
2022-09-14 5:10 ` [PATCH V3 35/47] drm/amd/display: Assume connectors are on single slot Wayne Lin
2022-09-14 5:10 ` [PATCH V3 36/47] drm/amd/display: Enable committing subvp config Wayne Lin
2022-09-14 5:10 ` [PATCH V3 37/47] drm/amd/display: Add shift and mask for ICH_RESET_AT_END_OF_LINE Wayne Lin
2022-09-14 5:10 ` [PATCH V3 38/47] drm/amd/display: Disable OTG WA for the plane_state NULL case on DCN314 Wayne Lin
2022-09-14 5:10 ` [PATCH V3 39/47] drm/amd/display: Modify DML to adjust Vstartup Position Wayne Lin
2022-09-14 5:10 ` [PATCH V3 40/47] drm/amd/display: Revise Sink device string ID Wayne Lin
2022-09-14 5:10 ` [PATCH V3 41/47] drm/amd/display: log vertical interrupt 1 for debug Wayne Lin
2022-09-14 5:10 ` [PATCH V3 42/47] drm/amd/display: Do second pass through DML for DET calculation Wayne Lin
2022-09-14 5:10 ` [PATCH V3 43/47] drm/amd/display: update dccg based on HW delta Wayne Lin
2022-09-14 5:10 ` [PATCH V3 44/47] drm/amd/display: solve regression in update phy state refactor Wayne Lin
2022-09-14 5:10 ` [PATCH V3 45/47] drm/amd/display: correct num_dsc based on HW cap Wayne Lin
2022-09-14 5:10 ` [PATCH V3 46/47] drm/amd/display: Fix failures of disabling primary plans Wayne Lin
2022-09-14 13:31 ` Michel Dänzer
2022-09-14 13:40 ` Michel Dänzer
2022-09-14 16:30 ` Alex Hung
2022-09-14 16:55 ` Michel Dänzer
2022-09-14 16:55 ` Michel Dänzer
2022-09-14 20:08 ` Alex Hung
2022-09-14 20:08 ` Alex Hung
2022-09-15 8:55 ` Michel Dänzer
2022-09-15 8:55 ` Michel Dänzer
2022-09-15 20:44 ` Rodrigo Siqueira Jordao
2022-09-16 9:12 ` Michel Dänzer
2022-09-14 5:10 ` [PATCH V3 47/47] drm/amd/display: 3.2.204 Wayne Lin
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=20220914051046.1131186-15-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=Alvin.Lee2@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Jun.Lei@amd.com \
--cc=Nevenko.Stupar@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=agustin.gutierrez@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=pavle.kotarac@amd.com \
--cc=qingqing.zhuo@amd.com \
--cc=roman.li@amd.com \
--cc=solomon.chiu@amd.com \
--cc=stylon.wang@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.