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 9BA38606A31A for ; Tue, 1 Dec 2026 20:26:55 +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=GFZKMWej Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1230910FCDB; Tue, 1 Dec 2026 20:26:50 +0000 (UTC) Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azon11012047.outbound.protection.outlook.com [52.101.48.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72E4A10FCCF for ; Tue, 1 Dec 2026 20:26:43 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=r/VZAWotH9IvIjQK4syZwxxSnrWX/RPUzOlgUfN9tDVS5Hr7/8QgiIGPKSojw9W3sEglJtFIhJ2cFSBKiA9gVddSqMQY//NzXI3Xmw+MTFFDd3zlPJiWWtDdWNeQWS+Abv0eIGiRmZVONYtwa+++Mu/ciH72zV1N7966M++i2N6zcSv/i4GhC9lS8yOlQHqgjzU4VnbydLOjWnHJG/5JVfFn0CSFmToOiWRh2e3d2HYtaXXqxY2o7zhVsR8t+P8TIKogQw/cKXN/q0ElWvFjo26bnv/HBh/h4a+3KHkKYuAzKv2RzCXUfPwiDQasUSepU5NmuTp8dmBa8/BLeAhtyQ== 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=P7wMiFEpWs0XMUfPbSdfmLIPUfsA5RyAfVMlPvu48sU=; b=W40ottexw10ShXPdEJunzUymFVOOmTnt8oBV2aaK+sQIOXNKmx3TqoPGLK9r4AliuGNRMZ9JX2vJbBp/21HfzZbUogNDrrChZCiU4UXbE+zrbssWvFHl9casvR+U2hNvWQ0yX0XKHJQuLn6v9X3qb93R6paw/3mMiww5si5PdHgek2/RlRCEjBonZ5VpiL8QQQZ6duTOoHN4RN7CBwdl/xbh5p/f5A/eaop7R4zASlhJrGCL3x16dQJmtTlDLCV1x40LdEzSCAKZpbmzNOA26by4w0cDznlVVL33m52Z51BmfzELupv6aukGyh1KyK+wf4MGTstS3om+TkRL1RF+yA== 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=P7wMiFEpWs0XMUfPbSdfmLIPUfsA5RyAfVMlPvu48sU=; b=GFZKMWejvzaquj2kn7KtPxU25hv2Vbnk+HIScJthvSs2LFBV8INb+Ab2PQxVjr8cCoAl2c6i66FH7fazK5irTxdC48Wag3fHNqv09awqeK2YNKcwvN64ZluG9nIYG8CejgmoKwi2AwP4iGbkcRXlMAmAXVcZDeVtNmiWj3T9RWM= Received: from DS1PR06CA0016.namprd06.prod.outlook.com (2603:10b6:8:23e::17) by AT6PR12MB529233.namprd12.prod.outlook.com (2603:10b6:170:115::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Tue, 1 Dec 2026 20:26:39 +0000 Received: from CH7PEPF0000001C.namprd21.prod.outlook.com (2603:10b6:8:23e:cafe::34) by DS1PR06CA0016.outlook.office365.com (2603:10b6:8:23e::17) 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:39 +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 CH7PEPF0000001C.mail.protection.outlook.com (10.167.244.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.0 via Frontend Transport; Tue, 1 Dec 2026 20:26:39 +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:28 -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 , Ilya Bakoulin , Chris Park , George Zhang Subject: [PATCH v2 12/30] drm/amd/display: Fix HDMI FRL no_timeout behavior Date: Tue, 1 Dec 2026 15:22:46 -0500 Message-ID: <20261201202451.463794-14-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: CH7PEPF0000001C:EE_|AT6PR12MB529233:EE_ X-MS-Office365-Filtering-Correlation-Id: b52c58f3-f292-4a4f-1e2a-08df4fe967b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700016|1800799024|23010399003|11063799006|6133799003|261009223027099003|261009221227099003|261009220027099003|261009223327099003|261009221727099003|3023799007|10067099003|56012099006|261028144727099003|261021123027099003|261021121427099003|261026140227099003|261022075727099003|261102123227099003|261022105027099003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: u4Q5tDVfHI+orBQ8DXJXAGrPxGlA8F7gRW3H+28LBxgHPGHRVdu6WArZkfVf0UuJkTnFCcp/bOMw79USRdli+thZPX101UMAU+fZaxz/vUp2UTlLZ1T3r5uB1wBA5RkBnKpy3wZFRTtrPjt0DIEUyH2qxGner/jYsb/RtWNLisYSmYmgPzdqKoNaP8t0fI8S22fNzJKe3KHzkriTrqcoJhxLInlifQe/83rnPRfLiVc6zGkkM1LKlxWGOBCLzsJyFZO6IsCeRBIkpMKIvh4QSIvDrGBaPEzfzmEYJMG9MDd25JNt4VG2mmVBLGdUZDbDF0ZdL/7A4f+2PNO43Q9pvLKoPjcH40Rz3OFusUFGE3g69esWpaXTc5Sovo3u4JRKjK4cjTsfvCS4geQ+yMK7f43/U6C67FEKj9HXC5FybbhgwcWoSNTi1bfi8VJxJxbegqkaMa1aQKZXdAKcdO+k7+7pv7pN98d9eWEZWfD9H9zf/JV9R39Ilc8kHKf5BlMaqaXU8o78dqTUKE6YHLiNoOfzk6RuoTbMoYfJ4WuD4588aZEayOuiGOXju9vnTw+JfZyjLvPZqoAddIGSOhLsArdv+XrZ5N7nQTTPlPGT6/bQULR2he2TaePx+2GHxGaJKDMYBE7O/t9HvgIatTl+5U6Ej+642Za2etahMG5f914= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(82310400026)(36860700016)(1800799024)(23010399003)(11063799006)(6133799003)(261009223027099003)(261009221227099003)(261009220027099003)(261009223327099003)(261009221727099003)(3023799007)(10067099003)(56012099006)(261028144727099003)(261021123027099003)(261021121427099003)(261026140227099003)(261022075727099003)(261102123227099003)(261022105027099003)(22082099003)(18002099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GnCeTf29jp7ZshJKjX7ysWAh6VPoRQchgWHGAwmTcPb79L6mzkf3JevkR+xRWWIGG9pfJ3jkoBXV6Z6vY84rzp7gLJwyYkOmqfbUU7xyuPFHzhjVzlbgocr81VzhxQu2mdB0S2mH5EzEb+EhZp8A9ijr28i2f4VZHs/fIF/STHf1P8nn8O9yBIHjkFxX7JsP23Te8/lmzTNqm76+9faBR8kCYJLhSVtMPiWXUh2GdvAjb4nSbqI3m045blV8n8z6/Zpxk1lNH8KdY4G9aX61wG+TLdeC3EkHq8ojozdcTV1K+ops5aZ8p4wdVA1oPiHPe+v+1vqen2xwCzRQH60LVJolBAeUGVK9JA20WmgYSK2/3pFjltP95bdmH4WXplP1nrD1mTlszh8n2AVKBfzhM7ibWrVmZjbD2JEH4miEksqnKQR15uZd2OuZB9q5vEFW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 20:26:39.4908 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b52c58f3-f292-4a4f-1e2a-08df4fe967b0 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: CH7PEPF0000001C.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT6PR12MB529233 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: Ilya Bakoulin [Why/How] Addresses a couple issues encountered while running compliance tests that assert the no_timeout flag: - Handle a couple of additional cases where link rate is not updated properly during a no_timeout test sequence due to the link not being cycled on/off - Increase polling rate while no_timeout is asserted to ensure we respond to updates in a reasonable amount of time (<10ms) Cc: Chris Park Signed-off-by: Ilya Bakoulin Signed-off-by: George Zhang --- .../drm/amd/display/dc/link/link_dpms_v1.c | 1 + .../display/dc/link/protocols/link_hdmi_frl.c | 25 +++++++++++++------ .../display/dc/link/protocols/link_hdmi_frl.h | 1 + 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms_v1.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms_v1.c index 4677ad4a2cd0..09162d56b350 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_dpms_v1.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms_v1.c @@ -2068,6 +2068,7 @@ static enum dc_status enable_link_hdmi_frl(struct pipe_ctx *pipe_ctx) frl_phy_clock_source_id = hdmi_frl_find_matching_phypll(stream->link); FRL_INFO("FRL LINK TRAINING: LTS:P Start\n"); + hdmi_frl_cycle_link_on_no_timeout_rate_change(stream->link); /* Setup FRL PHY, enable HDMI character clock and HPO link encoder */ core_dc->hwss.setup_hdmi_frl_link(stream->link, (pipe_ctx->stream_res.hpo_frl_stream_enc->id - ENGINE_ID_HPO_0), diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c index cb201c9ee3c6..235588174940 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c @@ -781,6 +781,20 @@ static enum link_result hdmi_frl_perform_link_training(struct ddc_service *ddc_s return result; } +/* disable_link_output is a no-op while in FLT_no_timeout mode, so if the FRL + * rate changed since the no_timeout training, cycle the link off here so that + * the subsequent PHY setup properly applies the new link rate. + */ +void hdmi_frl_cycle_link_on_no_timeout_rate_change(struct dc_link *link) +{ + if (!link->frl_flags.no_timeout || + link->frl_flags.no_timeout_frl_link_rate == link->frl_link_settings.frl_link_rate) + return; + + link->hpo_frl_link_enc->funcs->disable_link_encoder(link->hpo_frl_link_enc); + link->link_enc->funcs->disable_output(link->link_enc, SIGNAL_TYPE_HDMI_FRL); +} + enum link_result hdmi_frl_perform_link_training_with_retries( struct dc_link *link) { @@ -836,14 +850,7 @@ enum link_result hdmi_frl_perform_link_training_with_fallback( msleep(200); - /* If we're in a NO_TIMEOUT state and link rate changes, cycle the link on/off - * so that the new link rate is properly applied */ - if (link->frl_flags.no_timeout) { - if (link->frl_flags.no_timeout_frl_link_rate != link->frl_link_settings.frl_link_rate) { - link->hpo_frl_link_enc->funcs->disable_link_encoder(link->hpo_frl_link_enc); - link->link_enc->funcs->disable_output(link->link_enc, SIGNAL_TYPE_HDMI_FRL); - } - } + hdmi_frl_cycle_link_on_no_timeout_rate_change(link); link->ctx->dc->hwss.setup_hdmi_frl_link(link, 0, frl_phy_clock_source_id); @@ -1108,6 +1115,8 @@ void hdmi_frl_set_preferred_link_settings(struct dc *dc, /* Find proper clock source in HDMI FRL mode for phy used for DCCG */ frl_phy_clock_source_id = hdmi_frl_find_matching_phypll(link); + hdmi_frl_cycle_link_on_no_timeout_rate_change(link); + dc->hwss.setup_hdmi_frl_link(link, (pipe->stream_res.hpo_frl_stream_enc->id - ENGINE_ID_HPO_0), frl_phy_clock_source_id); diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.h b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.h index abeec56c6528..fd6d401e090e 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.h +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.h @@ -31,6 +31,7 @@ void hdmi_frl_LTS_clear_Update_flag(struct ddc_service *ddc_service); void hdmi_frl_poll_start(struct ddc_service *ddc_service); void hdmi_frl_LTS_clear_Link_Setting(struct ddc_service *ddc_service); void hdmi_frl_retrieve_link_cap(struct dc_link *link, struct dc_sink *sink); +void hdmi_frl_cycle_link_on_no_timeout_rate_change(struct dc_link *link); enum link_result hdmi_frl_perform_link_training_with_retries( struct dc_link *link); enum link_result hdmi_frl_perform_link_training_with_fallback( -- 2.56.1