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 59C0A606A320 for ; Tue, 1 Dec 2026 20:27:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=KVwJPJDd Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA01B10FCE7; Tue, 1 Dec 2026 20:27:01 +0000 (UTC) Received: from SJ2PR03CU001.outbound.protection.outlook.com (mail-westusazon11012045.outbound.protection.outlook.com [52.101.43.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id B850310FCCF for ; Tue, 1 Dec 2026 20:26:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fap7mWEF1BWkQN55FDGDD2b+gOPGIYdTivKVg4Edu/2DFGg8LvKBLZil1MLVJAOMKzVgNnWuZn5E7/XQ+wdztUJXCPKBBCXuOPvkv3SUaFnwh7cgY6jePtzouP1HH5sgtcEtzkAAM9JI+5dzdczOTYyNUBdvnsTfe8yJTdYkyMDc1TFqaxtOrlQe1NwbG7EFa7+ku009VJsxvSdHh0m7UYVakhvh0tzn04X0nUbR+YUpreN0YojMXXKtxzMklPO5AiZesmrFufziezD8cgMbvWBo0O+HIrJOkJ6bIl87rBljN2naCDxJpz/QVx6GdxIvRveFp59FWqCoCjcSg7PdGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EEUdYzIbYWR22kVZJ87uKeXZGqk66IhpaDtXpqN3QY4=; b=GeYYENRGZqf2jJnDoTgRtC9wm0Mo6qa7dhMTl1ixG3HkYeL+ZIcGJLMTSYtUSej6npL5mbB3AUpCq04+3CaUNcuWhUKNSidboid5fCGzoRov8uY+QBpjK4kSogBkKN7BA/DwW76u/VxU41p++wDcWpySIQFpmab6bscRfEEMtEus7pYUg9LCE8rUDTXAR11kvVw3gmwjFtfQOr/XIJq5U6kO9fJMVhYsQLq6a23GV4KEE8ORueOXIMM+QHksLSk4ibd2xgEB2ve2xJGYB/dJ/gWwX6sgf4nBtHBAYqEZ+hl6N3l2w5nTkjABgkv6FPPt1V6v4d6r+LmmBaADoqacug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EEUdYzIbYWR22kVZJ87uKeXZGqk66IhpaDtXpqN3QY4=; b=KVwJPJDd5qKpaMasHfWfpAsFUIBspXIF/mJBqsSFUjeERXf1Aqig9qyQOwUnueefJXCbEEWCDNg94KbeI/7GHeMOiyyQiMBnB8ZDCMgryzNrm9hFZD2PgCoO8MtXWLlxsEKdR7DzXImKiUZbCpJLpg6fgpe4w7kwOS7UVs2jo8o= Received: from CH0PR04CA0017.namprd04.prod.outlook.com (2603:10b6:610:76::22) by BY1PR12MB8447.namprd12.prod.outlook.com (2603:10b6:a03:525::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.11; Tue, 1 Dec 2026 20:26:51 +0000 Received: from DSM2EPF0000000C.namprd02.prod.outlook.com (2603:10b6:610:76:cafe::37) by CH0PR04CA0017.outlook.office365.com (2603:10b6:610:76::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.10 via Frontend Transport; Tue, 1 Dec 2026 20:26:49 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by DSM2EPF0000000C.mail.protection.outlook.com (10.167.23.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Tue, 1 Dec 2026 20:26:49 +0000 Received: from georzhanmkm.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Tue, 1 Dec 2026 14:26:33 -0600 From: George Zhang To: CC: Harry Wentland , Leo Li , Aurabindo Pillai , Roman Li , Wayne Lin , Tom Chung , "Fangzhi Zuo" , Dan Wheeler , Ray Wu , Ivan Lipski , Alex Hung , James Lin , Chenyu Chen , Peichen Huang , Robin Chen , George Zhang Subject: [PATCH v2 18/30] drm/amd/display: block pr in mst right Date: Tue, 1 Dec 2026 15:22:52 -0500 Message-ID: <20261201202451.463794-20-george.zhang@amd.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261201202451.463794-2-george.zhang@amd.com> References: <20261201202451.463794-2-george.zhang@amd.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DSM2EPF0000000C:EE_|BY1PR12MB8447:EE_ X-MS-Office365-Filtering-Correlation-Id: 3578eb9c-b2d6-486c-dd2e-08df4fe96db1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700016|23010399003|1800799024|82310400026|56012099006|10067099003|11063799006|261021123027099003|261026121527099003|261009223027099003|261022105027099003|261021121427099003|261028144727099003|261102123227099003|261026140227099003|18002099003|22082099003|3023799007; X-Microsoft-Antispam-Message-Info: EncKlnrb5yjAmMvLCXpxZcIQasjJXx8vTcNTmmFMhnxshtMXKo5HT/BDAaru9G6/qhYp/emZHq9T7KoYO0gUkq3cBS1+mlM6UCc9qBJt1Jq50Rup7ME5zLnDB5IZN5EYivwxg9Fiind4PaxocBMXRs5w0YshGsXHhPOEma8nhrQKoaX6pjhLbWSlV/hMBZHt4lMhYVo9du8VdDyvWnxQ7lDPZxZ2iFC2WghIwuf1byG7kgz36sSLf1QGkZOspmHmd7TdeB/neqJzSIk/lSxt/VW/bpSTZ5wG+VJh4Ah+aON/98jxMa5w0S/mmE4tmkXz8UegGBj8ClZKhKxSfLBOq1RCtOzFXHVJ/DExY3ocz2ZfDsLfOfB2YdIAoLYnY5z6E7ctNERGwk20w3bhZBRmgA4Jz3mzQNjjP2sTx9+9a5DfYzwfkLu4m5jofS8yFJwRGNtgrD28W0Sh3Gobvnu+nAd/G0AQHz2p+2j43m31eTW9KiajXuX8Vd7ZQgFp4pJTHDM6jgP1G6/UZUik300C8WysgdLBaSHklvgTxdOZrQgt/sCX5QIRsFdJ15uzWMDnjRFqJ2KDlZXVBPZbkWnaXn332BcX2oUBWIaXvgAu8jOZ4kCf/wGx+Bx1AhQB8ZrqapuTTeEAS7mIpcQkc3LjiqbjbS5EV2mWsllGXqScRWz5z/qxUxkP+Zqo8u34MylEoJlYNRdpe3epUSpI9B7pZg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(36860700016)(23010399003)(1800799024)(82310400026)(56012099006)(10067099003)(11063799006)(261021123027099003)(261026121527099003)(261009223027099003)(261022105027099003)(261021121427099003)(261028144727099003)(261102123227099003)(261026140227099003)(18002099003)(22082099003)(3023799007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EXTkPFHu5pIF5NhgdG1soC1UcRbw5flhwCRO6HD7gvtxmPokhCmWaXfF1ICULxZKDB97bScKP967LUy5mBBY6fYuwG7emRHRcQV1utK8lGk12oN9Il+9sAKxLaDeEfWRgU3K597hsqcoGfRzodj8irENPzY6bR7DwF4J/saTKdT526FF5fEHirMwVGkZAORcluHT1/VtwK+yMaWrs610LH7B+de6lJD04eRNvDrICSS3HwmjztZ+9uinMkrrOdt6vHpvgRQQJ1lIrUCxGdzIO/BJ1NcWE+anjNbl1C0v8tysmEYoTQdd7L61pCuiNHC7wf3NVG3hzIeuWBYDSY+OaD6wghlL8joOYo9EUpW5plgWVTyLGDmN6ZPnRan0mIP8OYcu/7+EaLQtGBy2rv7clT3okw0rNWMVLPdcj0kYmXHTL9ei/ir7EgqZVgCazvLG X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 20:26:49.5492 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3578eb9c-b2d6-486c-dd2e-08df4fe96db1 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DSM2EPF0000000C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR12MB8447 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: , Sender: "amd-gfx" X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 From: Peichen Huang [Why] Should check mst link in stream signal not connector signal [How] Use stream signal to check if it is a dp sst link. Also guard against a NULL link_enc when filling dpphy_inst in dp_pr_copy_settings(). Cc: Robin Chen Signed-off-by: Peichen Huang Signed-off-by: George Zhang --- .../dc/link/protocols/link_dp_panel_replay.c | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c index 65a791ccf6b2..24cc882eb168 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c @@ -53,13 +53,11 @@ static void dp_pr_set_static_screen_param(struct dc_link *link) { struct dc_static_screen_params params = {0}; struct dc *dc = link->ctx->dc; - // only support DP sst for now - if (!dc_is_dp_sst_signal(link->connector_signal)) - return; for (int i = 0; i < MAX_PIPES; i++) { if (dc->current_state->res_ctx.pipe_ctx[i].stream && - dc->current_state->res_ctx.pipe_ctx[i].stream->link == link) { + dc->current_state->res_ctx.pipe_ctx[i].stream->link == link && + dc_is_dp_sst_signal(dc->current_state->res_ctx.pipe_ctx[i].stream->signal)) { struct dc_stream_state *stream = dc->current_state->res_ctx.pipe_ctx[i].stream; unsigned int vsync_rate_hz = (unsigned int)div64_u64(div64_u64( (stream->timing.pix_clk_100hz * (u64)100), @@ -109,6 +107,9 @@ static bool dp_setup_panel_replay(struct dc_link *link, const struct dc_stream_s if (!(link->replay_settings.config.replay_supported)) return false; + if (!stream || !dc_is_dp_sst_signal(stream->signal)) + return false; + dc = link->ctx->dc; //not sure should keep or not @@ -212,12 +213,10 @@ bool dp_pr_get_pr_panel_inst(const struct dc *dc, if (dc->config.frame_update_cmd_version2 == false) return dc_get_edp_link_panel_inst(dc, link, inst_out); - if (!dc_is_dp_sst_signal(link->connector_signal)) /* only supoprt DP sst (eDP included) for now */ - return false; - for (unsigned int i = 0; i < MAX_PIPES; i++) { if (dc->current_state->res_ctx.pipe_ctx[i].stream && - dc->current_state->res_ctx.pipe_ctx[i].stream->link == link) { + dc->current_state->res_ctx.pipe_ctx[i].stream->link == link && + dc_is_dp_sst_signal(dc->current_state->res_ctx.pipe_ctx[i].stream->signal)) { /* *inst_out is equal to otg number */ if (dc->current_state->res_ctx.pipe_ctx[i].stream_res.tg) *inst_out = dc->current_state->res_ctx.pipe_ctx[i].stream_res.tg->inst; @@ -287,9 +286,8 @@ bool dp_pr_copy_settings(struct dc_link *link, struct replay_context *replay_con if (dc->current_state->res_ctx.pipe_ctx[i].stream && dc->current_state->res_ctx.pipe_ctx[i].stream->link && dc->current_state->res_ctx.pipe_ctx[i].stream->link == link && - dc_is_dp_sst_signal(dc->current_state->res_ctx.pipe_ctx[i].stream->link->connector_signal)) { + dc_is_dp_sst_signal(dc->current_state->res_ctx.pipe_ctx[i].stream->signal)) { pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i]; - /* todo: need update for MST */ break; } } @@ -315,7 +313,7 @@ bool dp_pr_copy_settings(struct dc_link *link, struct replay_context *replay_con else cmd.pr_copy_settings.data.otg_inst = 0; - cmd.pr_copy_settings.data.dpphy_inst = link->link_enc->transmitter; + cmd.pr_copy_settings.data.dpphy_inst = link->link_enc ? (uint8_t)link->link_enc->transmitter : 0; cmd.pr_copy_settings.data.line_time_in_ns = replay_context->line_time_in_ns; cmd.pr_copy_settings.data.flags.bitfields.fec_enable_status = (link->fec_state == dc_link_fec_enabled); -- 2.56.1