Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 744A9606A322 for ; Tue, 1 Dec 2026 21:00:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=H5XoKe+Z Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12F5010FD34; Tue, 1 Dec 2026 21:00:08 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id C7C7810FD1D for ; Tue, 1 Dec 2026 21:00:01 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 8A48E4150A; Tue, 1 Dec 2026 21:00:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C2561F000C1; Tue, 1 Dec 2026 21:00:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796158801; bh=KHqDzVq+BgNy9LNqLbkmIZ8bQUrL4+/yZtOA/0X75xk=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=H5XoKe+ZYukWMd8oCy2lL907Mfx0IoiyKSBo6jmZbl5T13wMqvzhEMNlm2F0uAIzR e5PxK5Hs8MbKlQwNeZHwbola0kLOEMGkyPLZx+YGrWR3SZK4v3yeLmmmjdbxy1pczN GjNrgjg48C+Rmd4N7LfvdwGUPH9+4suoap1wikoHpZQhfGQnbmHvnCDcvAQkRH1oOu o1y1zJfpnqcfBtHVEeCEuSLw1xg28uugXX0eY+0NTtDcotLzJv1ZBejX7zeI/B8+ng X8NrHR3TnS57rOSonlO0Wav0bnw/fC3jUgkJ50KMA2sPUwsN6m+Y6j8gXZ4j9sLv4I c6YBNAq4GRISQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 22/30] drm/amd/display: Flip every DPP pipe of the stream in DC2 To: "George Zhang" , amd-gfx@lists.freedesktop.org In-Reply-To: <20261201202451.463794-24-george.zhang@amd.com> References: <20261201202451.463794-2-george.zhang@amd.com> <20261201202451.463794-24-george.zhang@amd.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 21:00:00 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "amd-gfx" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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 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_b= uilder.c b/drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_seamless_build= er.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 st= ruct dc *dc, > } > =20 > /* > - * 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 skip= s, > + * so every plane of the stream flips. DC1 hands an offloaded flip to HW= FQ. > + * 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; > =20 > (void)dc; > (void)current_state; > - if (new_state->stream_status[i].plane_count !=3D 1 || > - resource_get_opp_heads_for_stream(new_state->streams[i], > - (struct resource_context *)&new_state->res_ctx, > - dpp_pipes) !=3D 1 || > - resource_get_dpp_pipes_for_stream(new_state->streams[i], > + if (!new_state->stream_status[i].plane_count) > + return false; > + n =3D resource_get_dpp_pipes_for_stream(new_state->streams[i], > (struct resource_context *)&new_state->res_ctx, > - dpp_pipes) !=3D 1 || > - !dpp_pipes[0]->plane_state || > - !dpp_pipes[0]->plane_res.hubp) > + dpp_pipes); > + if (n <=3D 0) > return false; > - plane =3D dpp_pipes[0]->plane_state; > - return dc_check_address_only_update(plane->update_bits) && > - !plane->triplebuffer_flips; > + for (j =3D 0; j < n; j++) { > + plane =3D 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; > } > =20 > static bool dcn401_pipe_on_either(const struct dc_state *current_state, > @@ -1156,8 +1161,8 @@ static enum bls_builder_result dcn401_check_flip(co= nst 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 !=3D 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_co= ntrol_lock_sequence() { if (flip_immediate && lock) { temp_pipe =3D pipe; while (temp_pipe) { if (temp_pipe->plane_state && temp_pipe->plane_state->flip_immediate) params->hubps_to_wait_for_flip[hubp_count++] =3D temp_pipe->plane_res.h= ubp; temp_pipe =3D temp_pipe->bottom_pipe; } } ... if (lock && (pipe->bottom_pipe !=3D NULL || !flip_immediate)) if ((flip_immediate && pipe->stream_res.gsl_group =3D=3D 0) || (!flip_immediate && pipe->stream_res.gsl_group > 0)) { params->gsl_lock =3D 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 =3D 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. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201202451.4637= 94-2-george.zhang@amd.com?part=3D22