From: sashiko-bot@kernel.org
To: "George Zhang" <george.zhang@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 22/30] drm/amd/display: Flip every DPP pipe of the stream in DC2
Date: Tue, 01 Dec 2026 21:00:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-244263@kernel.org> (raw)
In-Reply-To: <20261201202451.463794-24-george.zhang@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/amd/display: missing OTG GSL lock on MPO immediate flips
in dcn401_check_flip()
--
commit ab01c877e59048c17db59a44352ba247bd2d538f
Author: Tony Cheng <tony.cheng@amd.com>
drm/amd/display: Flip every DPP pipe of the stream in DC2
This commit widens dcn401_check_flip() to accept address-only flips on
streams with multiple planes or ODM slices by checking every DPP pipe of
the stream instead of requiring a single plane on a single OPP head and
DPP pipe.
> diff --git a/drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_seamless_builder.c b/drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_seamless_builder.c
> index 38b40fe8b02b9..69d6c55e78e80 100644
> --- a/drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_seamless_builder.c
> +++ b/drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_seamless_builder.c
> @@ -1055,32 +1055,37 @@ static bool check_no_stream_update_flags(const struct dc *dc,
> }
>
> /*
> - * Any other plane update bit adds a step to the flip. DC1 hands an
> - * offloaded flip to HWFQ. With triple-buffer flips, the pipe lock is not
> - * a TG_LOCK leaf.
> + * Any other plane update bit adds a step to the flip. A plane without an
> + * address update would still get HUBP_UPDATE_PLANE_ADDR, which DC1 skips,
> + * so every plane of the stream flips. DC1 hands an offloaded flip to HWFQ.
> + * With triple-buffer flips, the pipe lock is not a TG_LOCK leaf.
> */
> -static bool check_one_address_only_plane(const struct dc *dc,
> +static bool check_address_only_planes(const struct dc *dc,
> const struct dc_state *current_state,
> const struct dc_state *new_state, unsigned int i)
> {
> struct pipe_ctx *dpp_pipes[MAX_PIPES];
> const struct dc_plane_state *plane;
> + int j, n;
>
> (void)dc;
> (void)current_state;
> - if (new_state->stream_status[i].plane_count != 1 ||
> - resource_get_opp_heads_for_stream(new_state->streams[i],
> - (struct resource_context *)&new_state->res_ctx,
> - dpp_pipes) != 1 ||
> - resource_get_dpp_pipes_for_stream(new_state->streams[i],
> + if (!new_state->stream_status[i].plane_count)
> + return false;
> + n = resource_get_dpp_pipes_for_stream(new_state->streams[i],
> (struct resource_context *)&new_state->res_ctx,
> - dpp_pipes) != 1 ||
> - !dpp_pipes[0]->plane_state ||
> - !dpp_pipes[0]->plane_res.hubp)
> + dpp_pipes);
> + if (n <= 0)
> return false;
> - plane = dpp_pipes[0]->plane_state;
> - return dc_check_address_only_update(plane->update_bits) &&
> - !plane->triplebuffer_flips;
> + for (j = 0; j < n; j++) {
> + plane = dpp_pipes[j]->plane_state;
> + if (!plane || !dpp_pipes[j]->plane_res.hubp)
> + return false;
> + if (!dc_check_address_only_update(plane->update_bits) ||
> + plane->triplebuffer_flips)
> + return false;
> + }
> + return true;
> }
>
> static bool dcn401_pipe_on_either(const struct dc_state *current_state,
> @@ -1156,8 +1161,8 @@ static enum bls_builder_result dcn401_check_flip(const struct dc *dc,
> CHECK_UPDATE(no_subvp, "subvp is set");
> CHECK_UPDATE(no_dmub_work, "psr, replay, abm or hwfq needs dmub");
> CHECK_UPDATE(no_stream_update_flags, "stream update flags are set");
> - CHECK_UPDATE(one_address_only_plane,
> - "stream has odm, or not one plane with an address-only update");
> + CHECK_UPDATE(address_only_planes,
> + "a plane of the stream has no address-only update");
> CHECK_CONDITION(triple_buffer, "triple buffer is disabled");
> CHECK_UPDATE(no_immediate_dcc_flip, "immediate flip of a dcc surface");
> CHECK_UPDATE(no_mcm_luts, "an mcm lut is enabled");
[Severity: Medium]
Does dcn401_check_flip() allow immediate flips on multi-plane (MPO)
streams without programming the OTG GSL lock?
When an OTG master has pipe->bottom_pipe != NULL and flip_immediate is
true, DC1 sets up a GSL group as a lock and waits for pending flips
before TG_LOCK:
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c:dcn20_build_pipe_control_lock_sequence() {
if (flip_immediate && lock) {
temp_pipe = pipe;
while (temp_pipe) {
if (temp_pipe->plane_state && temp_pipe->plane_state->flip_immediate)
params->hubps_to_wait_for_flip[hubp_count++] = temp_pipe->plane_res.hubp;
temp_pipe = temp_pipe->bottom_pipe;
}
}
...
if (lock && (pipe->bottom_pipe != NULL || !flip_immediate))
if ((flip_immediate && pipe->stream_res.gsl_group == 0) ||
(!flip_immediate && pipe->stream_res.gsl_group > 0)) {
params->gsl_lock = true;
dcn20_build_gsl_group_as_lock(dc, pipe, flip_immediate,
¶ms->gsl, ¶ms->gsl_source_select);
}
}
In DC2, program_flip still emits HUBP_SET_FLIP_CONTROL_GSL with
flip_immediate = true on each HUBP, while the lock table only emits
TG_LOCK and omits HUBP_WAIT_FLIP_PENDING, TG_SET_GSL, and
TG_SET_GSL_SOURCE_SELECT, leaving immediate flips across MPO pipes
without OTG GSL synchronization.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201202451.463794-2-george.zhang@amd.com?part=22
next prev parent reply other threads:[~2026-12-01 21:00 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 20:22 [PATCH v2 00/30] DC Patches for Nov 30 2026 George Zhang
2026-12-01 20:22 ` [PATCH v2 01/30] drm/amd/display: cast clamped rate conversion George Zhang
2026-12-01 20:22 ` [PATCH v2 02/30] drm/amd/display: Split HWSS_CURSOR_LOCK into flat BLS operations George Zhang
2026-12-01 20:22 ` [PATCH v2 03/30] drm/amd/display: clamp AUX reply length as unsigned George Zhang
2026-12-01 20:22 ` [PATCH v2 04/30] drm/amd/display: keep the DPCD read result signed in the MST ISR George Zhang
2026-12-01 20:22 ` [PATCH v2 05/30] drm/amd/display: copy only the status byte on a DMUB AUX write status retry George Zhang
2026-12-01 20:22 ` [PATCH v2 06/30] drm/amd/display: test the DMUB AUX write status reply copy George Zhang
2026-12-01 20:22 ` [PATCH v2 07/30] drm/amd/display: Account for downspread and DFS in clock validation George Zhang
2026-12-01 20:49 ` sashiko-bot
2026-12-01 20:22 ` [PATCH v2 08/30] drm/amd/display: Read max LSDMA BW from DMU George Zhang
2026-12-01 20:22 ` [PATCH v2 09/30] drm/amd/display: Precompute EASF lookup thresholds George Zhang
2026-12-01 20:22 ` [PATCH v2 10/30] drm/amd/display: Make DPP_SET_INPUT_TRANSFER_FUNC BLS compliant George Zhang
2026-12-01 20:22 ` [PATCH v2 11/30] drm/amd/display: Add pipe init to core2 George Zhang
2026-12-01 20:54 ` sashiko-bot
2026-12-01 20:22 ` [PATCH v2 12/30] drm/amd/display: Fix HDMI FRL no_timeout behavior George Zhang
2026-12-01 20:42 ` sashiko-bot
2026-12-01 20:22 ` [PATCH v2 13/30] drm/amd/display: Re-enable HUBP/DPP Driver PG on DCN42 George Zhang
2026-12-01 20:22 ` [PATCH v2 14/30] drm/amd/display: Program DSC on one stream in DC2 George Zhang
2026-12-01 20:55 ` sashiko-bot
2026-12-01 20:22 ` [PATCH v2 15/30] drm/amd/display: enable dcn42b hubp/dpp pg control from driver side George Zhang
2026-12-01 20:22 ` [PATCH v2 16/30] drm/amd/display: cover gamma 2.4 and 2.6 on the wide curve George Zhang
2026-12-01 20:22 ` [PATCH v2 17/30] drm/amd/display: Revoke alternate channel P-State before pipe teardown George Zhang
2026-12-01 21:09 ` sashiko-bot
2026-12-01 20:22 ` [PATCH v2 18/30] drm/amd/display: block pr in mst right George Zhang
2026-12-01 20:46 ` sashiko-bot
2026-12-01 20:22 ` [PATCH v2 19/30] drm/amd/display: Add a per-ASIC default for the DC2 selection George Zhang
2026-12-01 20:22 ` [PATCH v2 20/30] drm/amd/display: Refactor Max VStartup calculations for DCN6 George Zhang
2026-12-01 20:22 ` [PATCH v2 21/30] drm/amd/display: Improve P-state admissability logic George Zhang
2026-12-01 20:50 ` sashiko-bot
2026-12-01 20:22 ` [PATCH v2 22/30] drm/amd/display: Flip every DPP pipe of the stream in DC2 George Zhang
2026-12-01 21:00 ` sashiko-bot [this message]
2026-12-01 20:22 ` [PATCH v2 23/30] drm/amd/display: Report a DC2 BLS step overflow behind a debug option George Zhang
2026-12-01 20:22 ` [PATCH v2 24/30] drm/amd/display: VRR Support on Direct MST Sinks George Zhang
2026-12-01 20:22 ` [PATCH v2 25/30] drm/amd/display: Program YCbCr output in DC2 George Zhang
2026-12-01 20:23 ` [PATCH v2 26/30] drm/amd/display: Skip a stream with no OTG master " George Zhang
2026-12-01 20:23 ` [PATCH v2 27/30] drm/amd/display: Sync OTG timing in the DC2 non-seamless commit George Zhang
2026-12-01 20:57 ` sashiko-bot
2026-12-01 20:23 ` [PATCH v2 28/30] drm/amd/display: Move shared dcn401 builder code to its own file George Zhang
2026-12-01 20:23 ` [PATCH v2 29/30] drm/amd/display: Allow disabling CRC capture when the stream is gone George Zhang
2026-12-01 20:52 ` sashiko-bot
2026-12-01 20:23 ` [PATCH v2 30/30] drm/amd/display: Promote DC to 3.2.410 George Zhang
2026-12-01 20:45 ` sashiko-bot
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=sashiko-outbox-244263@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=george.zhang@amd.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox