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 59D50606A322 for ; Tue, 1 Dec 2026 19:03:52 +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=cWduBZXJ Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E0A0F10FC25; Tue, 1 Dec 2026 19:03:46 +0000 (UTC) Received: from BL0PR03CU003.outbound.protection.outlook.com (mail-eastusazon11012047.outbound.protection.outlook.com [52.101.53.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA9DD10FC03 for ; Tue, 1 Dec 2026 19:03:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oaRNSfAtBu8gGarIQ8E4aLBOaDKqpBwtdlCdTB4ujXxgvW9yePhwnv72Kwina3hiuztkXCEgFrb9pJfA+lFTh7SRfFLpjbFxLCWG6KywOzm0TQb+V5zCJg9SsjuUmWWThWWuvwMAk5+28CK7wlvGL3mhAOvP8DBkPfOGKT/9K6kPkPaReeGFkP/3T//WKmbfdqpCmvLTjCZ2CjEvs5LKVWXw1l6cMV3o3imnQDO5R4/yQdOo1jDaS+KAp4ORjssnihEfZ0g6V9iVWlNc5orsv+VWc9P+Aef/q4T/CCZALcaXRGYJ3IHVbf4qLrJKn5qHQISvqTNI1pr3B/x4nyT73Q== 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=VECkth56AtZ1hBw1KzyuY1ylnuw609hlQrh1mDZevjleLnXGkcX2z9hgfwBhSgPBBX9hodgavutOI3NJ6gczuVN5Tkx3K/0qULcZUPqUKEu34F5fGoQjIy7Ax/V5ta37Cy6YyBAAR3hr4RKT2yquqcjkOoizyZLQZq/HNKtslevqgW4GGLWFjD7yhb6hczgmmp7PspDcz5o1LUGPYjD/uxf9ES55sJO4s92GHk8Opz9eh0djGSmwdChP0XLFkPhet5yGjmiBVuCgrh8aovnEgggoX2/G/D93/O0sBSB/oYaZMj0G8y/v+kgq3F0ecdRhdzpoQK/EjFo7l/We9F8h/g== 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=cWduBZXJS0w90nLsH+Z9tQLO9Wnf9UFpHI8LnefgwDNNNk218i8p3VrbcNBpuFHRT/K9R8i3IYwNF3MX1/YioeBtEvNuupYFfVyqh79mydib9Lg9zVjVBDUeTeACxIG3EQRwQFU0AgRYSUVOsVTjgyMskQYdiOyb7PZsOZwCEaE= Received: from DM6PR02CA0125.namprd02.prod.outlook.com (2603:10b6:5:1b4::27) by SA1PR12MB7127.namprd12.prod.outlook.com (2603:10b6:806:29e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.7; Tue, 1 Dec 2026 19:03:37 +0000 Received: from DM3PEPF000265AD.namprd02.prod.outlook.com (2603:10b6:5:1b4:cafe::ab) by DM6PR02CA0125.outlook.office365.com (2603:10b6:5:1b4::27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.662.13 via Frontend Transport; Tue, 1 Dec 2026 19:03:36 +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 DM3PEPF000265AD.mail.protection.outlook.com (10.167.23.36) 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 19:03:35 +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 13:03:21 -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 18/30] drm/amd/display: block pr in mst right Date: Tue, 1 Dec 2026 13:57:54 -0500 Message-ID: <20261201190245.360906-19-george.zhang@amd.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261201190245.360906-1-george.zhang@amd.com> References: <20261201190245.360906-1-george.zhang@amd.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM3PEPF000265AD:EE_|SA1PR12MB7127:EE_ X-MS-Office365-Filtering-Correlation-Id: bb42cae4-5332-4622-5337-08df4fddccbc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700016|1800799024|23010399003|82310400026|261022105027099003|56012099006|11063799006|10067099003|261021121427099003|261026140227099003|261021123027099003|261026121527099003|261028144727099003|261102123227099003|261009223027099003|18002099003|22082099003|3023799007; X-Microsoft-Antispam-Message-Info: KLLC74VI2DJqsj4j4MKkORrPFf5JKSzYA9GEoXG4REildIGq1he4bNAVw/1lSPIHHi8pxvBWsw6y8cODbVIsDBoFWifXubEme42SMGXyR4kBHM4n3YChvX+rDPujfPXXLJN5vvMH7qWXSNBrFBnV7HYfagOaxr7LO8z8xNujgP1LFWp2ekDSms4RDrV2ldRQN1kX9qWS9DwH6CO/BzJoZoT+n0r3/5W5iHZsgcpF5/I6LH/l+KhooQW7X1Rlfq/Yd0illUI41RGJ5mkRiTwO0XFaQ+wSw2X5ZildsL2CKhnIIPe5+qpwr0l9Vc+xvTTwfqzfpiKw+GH7Ymzl0ScqJEIOVWIn1P/vc7Mbsrwpp/fmfLe1fg0xGi2qbkPwwTJKlTEPG9Q/sqCtHN/qVxiMyzx4F+BYWPxfaKlwwflypssnXA/2GBFZH2sdMXg7EA0N/gO053s0AABXqm4mE+kt9+HNPDUd9uwV0rFm3IdINndCsdT44VHh3XeOW2L0aMAjrpyfFED5ke6pGHs+aRaIKmB4OeT291QljzbEEuStFK9a5fbrCFcmOtfC6UmLwk4QJVFiylFzKZJWxRG/s8WCkfEet3jJz/O1Sn+YsCUKYTZb7l6Kwt588TsG5ajfxgKYWOldgkPp16jQH0oE+A3Dl7X6W41rtfAVbMN/z/Bop9zF7cIqgwmP/dmKhjeAcx8B0A2PWC3sRK7T2X7+6sYnZw== 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)(1800799024)(23010399003)(82310400026)(261022105027099003)(56012099006)(11063799006)(10067099003)(261021121427099003)(261026140227099003)(261021123027099003)(261026121527099003)(261028144727099003)(261102123227099003)(261009223027099003)(18002099003)(22082099003)(3023799007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ITT95NrQKRGLeH45CZSSH7kS85vNYc5IsI08U2kdGpD6mPNqV8eYOwkh3lB5/1v1bm4jZxNiTeo/oZiPu6W+GvP4qVVVaMSx4B5hqGGAdbxq0vxmZpDdz8Cs+iizbS9g81SCzDq9grY42Cy3v1fHoWOCd6z7K+qdlHRyHrCUH6ivOASZ/22TKDRK0yaan6InqtrPEo0kNEtONcRhM6cPSAy6EVM6LH1O6c04dY21ou+3ETjG6dqk6NWR9ER1HUwd9Tbl+XcCbOpSo5JgJkPbQrOH0KMTDsZvzTiFQcBBiABS8H6Qg4+OV1z5wO3dt+W1o+ljiHSnBoBeOVsiYwCeY/ELw4qNvfDvqQ468vN31CS6PYVb4K85UJNE2PTusBRSKw0OWDsKj1yWmJZvcsYUXFtXkQU90+bOZ3Oi2HxvFd0d747X+ePGI4uw6qvLevlG X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 19:03:35.0548 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb42cae4-5332-4622-5337-08df4fddccbc 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: DM3PEPF000265AD.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7127 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