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 19DA7606A320 for ; Tue, 1 Dec 2026 20:54:57 +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=V0alp8gr Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AADB110FD0C; Tue, 1 Dec 2026 20:54:51 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 579D310FD0C for ; Tue, 1 Dec 2026 20:54:45 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 8274E60CF2; Tue, 1 Dec 2026 20:54:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B7681F000C1; Tue, 1 Dec 2026 20:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796158484; bh=n6bsZtKr3SXN5EgeO7XI7Y7Y3ad4onDfKHJ5TxHviD8=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=V0alp8grRGXE6J73W6kIlatN47iQUBdD08LYCdVU6S4ERK+2Yw+nKrHet1UDq5X7S k5zeqJYQdg0iMxHgIpozqsa6pNqR7go7shtqYrjjj6RsSs1atC152vYhdqdrFgHq3k xJOZqPnTrWKh45+u8XDLEoo7PHDSUessk775ILLi2bqxY9ABeG9B4tYZ0u1PK2P1C3 HBOwveuXW5FywhNQzn4JM0HmhgrDm/7uZVrnSYoimJLsZfu2tCqeOh6UI+pG2+IZ3P H5v+HxG7aR/olVxUVe0FtpOWrke+MUhIzO6W8ZKHqzFpxLuCta0Wtfk/hnVXDSlxst Ok2nqEc0/tZKQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 11/30] drm/amd/display: Add pipe init to core2 To: "George Zhang" , amd-gfx@lists.freedesktop.org In-Reply-To: <20261201202451.463794-13-george.zhang@amd.com> References: <20261201202451.463794-2-george.zhang@amd.com> <20261201202451.463794-13-george.zhang@amd.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 20:54:43 +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 3 potential issues to consider: - [Medium] drm/amd/display: dcn401_private_funcs re-enables commit HPO toggle - [Medium] drm/amd/display: incomplete NULL dmub_srv handling in core2 wrapped init - [Low] drm/amd/display: unimplemented FPGA_SET_* block sequence opcodes -- commit 1b7331c47125a1ce9d6e5eaf45bf45e4636568b5 Author: Tomasz Siemek drm/amd/display: Add pipe init to core2 This commit adds pipe state initialization and a stage-based build-and-run loop to core2 hardware initialization, adds HUBBUB and MPC init block sequence steps, and renames init_hpo_hw_control to setup_hpo_hw_control. [ ... ] > diff --git a/drivers/gpu/drm/amd/display/dc/core2/dc_core2_init.c b/drive= rs/gpu/drm/amd/display/dc/core2/dc_core2_init.c > index 6d5dd6f00b9fe..0e8e2d299bd31 100644 > --- a/drivers/gpu/drm/amd/display/dc/core2/dc_core2_init.c > +++ b/drivers/gpu/drm/amd/display/dc/core2/dc_core2_init.c > @@ -45,7 +46,8 @@ static void core2_resolve_dmub_abi(struct dc *dc, > =20 > dc2->dmub_abi =3D initialization->dmub_abi; > dc2->dmub_abi_resolved =3D true; > - dc->ctx->dmub_srv->dmub->feature_caps =3D initialization->dmub_abi.feat= ure_caps; > + if (dc->ctx->dmub_srv && dc->ctx->dmub_srv->dmub) > + dc->ctx->dmub_srv->dmub->feature_caps =3D initialization->dmub_abi.fea= ture_caps; > dc->caps.dmub_caps.psr =3D initialization->dmub_abi.feature_caps.psr; > dc->caps.dmub_caps.mclk_sw =3D initialization->dmub_abi.feature_caps.fw= _assisted_mclk_switch_ver > 0; > dc->caps.dmub_caps.fams_ver =3D initialization->dmub_abi.feature_caps.f= w_assisted_mclk_switch_ver; [Severity: Medium] Can core2_run_wrapped_hardware_init() reach core2_resolve_dmub_abi() or core2_init_pipe_state() when dc->ctx->dmub_srv or dc->ctx->dmub_srv->dmub is NULL? Earlier in core2_run_wrapped_hardware_init(), dcn401_build_stage1() unconditionally emits DMUB_SEND_DMCUB_CMD2 steps that dc2_bls_step_supported() rejects when ctx->dmub_srv or ctx->dmub_srv->dmub is NULL, causing core2_run_sequence() to fail and abort initialization on stage 1. In addition, stage 2 postprocessing in dcn401_fill_initialization_output() unconditionally dereferences params->dc->ctx->dmub_srv->dmub->fw_version before core2_resolve_dmub_abi() is called. [ ... ] > diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c b/d= rivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c > index 53d6fab1f4005..7da504fc05b0d 100644 > --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c > +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c > @@ -151,7 +151,7 @@ static const struct hwseq_private_funcs dcn401_privat= e_funcs =3D { > .plane_atomic_power_down =3D dcn401_plane_atomic_power_down, > .plane_atomic_power_down_sequence =3D dcn401_plane_atomic_power_down_se= quence, > .enable_power_gating_plane =3D dcn32_enable_power_gating_plane, > - .init_hpo_hw_control =3D dcn401_setup_hpo_hw_control, > + .setup_hpo_hw_control =3D dcn401_setup_hpo_hw_control, > .init_odm_mem_power =3D dcn401_init_odm_mem_power, > .power_down_vga_mem =3D dcn401_power_down_vga_mem, > .dcfclk_gating_control =3D dcn401_dcfclk_gating_control, [Severity: Medium] Does wiring dcn401_setup_hpo_hw_control into setup_hpo_hw_control instead of the init-only init_hpo_hw_control hook cause dce110_apply_ctx_to_hw() to disable HPO_IO_EN on DCN 4.01 commits? On DCN 4.01, apply_ctx_to_hw uses dce110_apply_ctx_to_hw(), which calls dc->hwseq->funcs.setup_hpo_hw_control(dc->hwseq, is_hpo_acquired) whenever a commit transitions between HPO and non-HPO streams: drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c:dce110_apply_ctx_= to_hw() { ... if (dc->hwseq->funcs.setup_hpo_hw_control && was_hpo_acquired !=3D is_hpo_= acquired) { dc->hwseq->funcs.setup_hpo_hw_control(dc->hwseq, is_hpo_acquired); } ... } Commit a4758aa3d1d9 ("drm/amd/display: Always enable HPO for DCN4 dGPU") removed setup_hpo_hw_control from dcn401_private_funcs because disabling HPO on DCN4 dGPUs breaks DP EDID CTS tests. Once HPO_IO_EN is cleared by a DC1 commit, neither dp_retrain_link_dp_test() (which checks dc->hwss.setup_hpo_hw_control, left NULL in dcn401_funcs) nor DC2 commits via dcn401_non_seamless_builder re-enable it. > diff --git a/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h b/drivers= /gpu/drm/amd/display/dc/hwss/hw_sequencer.h > index 3bf9a15be3dc2..68f7bb01bdd32 100644 > --- a/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h > +++ b/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h [ ... ] > @@ -1973,6 +1996,12 @@ enum block_sequence_func { > TG_DELAY_CURSOR_UNTIL_VUPDATE, > MPC_CURSOR_LOCK, > DMUB_HW_LOCK_MGR_CMD, > + HUBBUB_INIT, > + HUBBUB_GLOBAL_TIMER_ENABLE, > + MPC_INIT, > + FPGA_SET_DTBCLK, > + FPGA_SET_DPREFCLK, > + FPGA_SET_REFCLK, > /* This must be the last value in this enum, add new ones above */ > HWSS_BLOCK_SEQUENCE_FUNC_COUNT > }; [Severity: Low] Are FPGA_SET_DTBCLK, FPGA_SET_DPREFCLK, FPGA_SET_REFCLK, struct fpga_set_clk_params, and the dm_helpers.h include in bls_executor.c left over from another change? None of these opcodes are handled in dc2_bls_step_supported() or dc2_bls_execute(), and adding them to enum block_sequence_func increases MAX_HWSS_BLOCK_SEQUENCE_SIZE. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201202451.4637= 94-2-george.zhang@amd.com?part=3D11