Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C9B3CD5BB4 for ; Tue, 26 May 2026 07:19:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B3FEB10E50B; Tue, 26 May 2026 07:19:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="TqVxOV1L"; dkim-atps=neutral Received: from PH0PR06CU001.outbound.protection.outlook.com (mail-westus3azon11011039.outbound.protection.outlook.com [40.107.208.39]) by gabe.freedesktop.org (Postfix) with ESMTPS id 88F7710E50B for ; Tue, 26 May 2026 07:19:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TPvcdqtPUbVy7/icvPpspnE/0D8MVwfPkGOOhbi9GGDG+ylAlgKU+XfVINUeFhjUEZxuLZfzaL6UzyOqoSoxdKVNDgE8V9dffJ//8YwndMiY4Sy6t/i0Mn8jQst+tR4aqlXDE7L5aH6OcuAj6cOY1spW5zvfM5Aj4pIvH0I4qnQrOa/gN5rvkMppfx9H/h1se61pBrmRwFenULe63mi2KEKYt8T/j7AotGAPS4+xzP0KgsKsId6Q0534/aBOzXtiTHeMlh9KEL7Rsdszn90VuCE5fdaJBnQwQJe8HTp1C+8rCgQWsuyoiiF6zxUbGDhbXx3tui7vQ7TRljsBCg490Q== 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=1A3OY/CKbZiCMiMKC4rm1w18rO+uv1zuoK6MS9AZtto=; b=Gv1BKpNV503SQwcGleonmw+obPjdoA/4zCM86ALFqmfp585i6JYHYHgfRCRMDSqM/tWSKGT8zLb1umteHVQ8LI0NgzySlWJNGjAsBp/w+xoUY1mgTLNr9hGLnz9O+HRtoVK156cP8lK21n6z8Q+2exD8ghYDhuli7kISBwCSBksQvVHeQLKRCAZrpMeOEFl3mqxRjjlPQxz4sebOhM1fXknjcUVHpqllL27VAN+ojJv6NLuxJrv+U7tGPT02hG2peoTLROnI7Az9TgjIBqL523wZaKWNCtQyKVTOQc9t/tmCWG9Pb3hRQoBnATm6x8hH3NapmhnqY40t9cUOU0sRfg== 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=1A3OY/CKbZiCMiMKC4rm1w18rO+uv1zuoK6MS9AZtto=; b=TqVxOV1LgvMenw7NmRgzLnvFLEvVVCFU16yYi6zdpfMjP+YkbTyLYkqwuv0dRUClB9t7xOPER5+3ePR8oCiKBfxBrsghCecZbXhHgN93GjiWupxGEGxb5w/KifFx6lkCDpKm4XptM5YTNUmfLrijXegOIt7yEC4PMCpJ9eiWYmE= Received: from CYZPR17CA0010.namprd17.prod.outlook.com (2603:10b6:930:8c::12) by BY5PR12MB4164.namprd12.prod.outlook.com (2603:10b6:a03:207::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.48.20; Tue, 26 May 2026 07:19:02 +0000 Received: from CY4PEPF0000FCBF.namprd03.prod.outlook.com (2603:10b6:930:8c:cafe::2f) by CYZPR17CA0010.outlook.office365.com (2603:10b6:930:8c::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.71.11 via Frontend Transport; Tue, 26 May 2026 07:19:02 +0000 X-MS-Exchange-Authentication-Results: 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=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by CY4PEPF0000FCBF.mail.protection.outlook.com (10.167.242.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.71.7 via Frontend Transport; Tue, 26 May 2026 07:19:01 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Tue, 26 May 2026 02:19:00 -0500 Received: from satlexmb08.amd.com (10.181.42.217) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Tue, 26 May 2026 02:19:00 -0500 Received: from ray-Ubuntu.amd.com (10.180.168.240) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Tue, 26 May 2026 02:18:51 -0500 From: Ray Wu 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 , Gabe Teeger , Matthew Stewart , Ray Wu Subject: [PATCH 32/41] drm/amd/display: Handle aux_inst for connectors without DDC pin Date: Tue, 26 May 2026 15:01:55 +0800 Message-ID: <20260526071413.2181251-33-ray.wu@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260526071413.2181251-1-ray.wu@amd.com> References: <20260526071413.2181251-1-ray.wu@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCBF:EE_|BY5PR12MB4164:EE_ X-MS-Office365-Filtering-Correlation-Id: c4ec470d-fe2b-44c1-9316-08debaf70ff2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700016|376014|18002099003|22082099003|56012099003|11063799006; X-Microsoft-Antispam-Message-Info: mGUQW4EgwetiHnUozFBUonFrBQmxO4VypSglz1AGYEJ8h1vSCzGbMwujraILAVi7x3XpJAnIYD0bHPTibRnu8kqvUFi1J/hRUKpTWiFRi6hot+6r8SvGsPFfTTtVy3JdKgryxLJX0hWBIpiMaXHEH5TecSdFyBeBnWdvaGip68beBFHP7PnUjnJ5g4pXgG6WsVO8f6ZE9n1R7+gMDc3E/0NCrUlIV0CG6m4PKJpTeJOkMmwWe1zuMafZw53kALVOlJqLuaY3Jp7Vzet+WguEvMN+slXHr+x/38+GgDYJ3ZkxnY7NK7zuaw9m+5ZH4fOx5PCJtYTaUlTV97e5a+CQKBog7dwLXbLHIvqoU6llTBAMYUYSmQ2g+ZrxEaqbuG7YEBjDChRY9KpSe+PRCO5qRWNHnJOh95A+Lpbtie9fEZoqeU/Sf0qzWeR+ViI6ZJNPN+p3lSzLFJPPqYXw1humYZ77CHzXW26ZQTo6TOSiyqVab37s3LCz+KOFxTuVSelB4v06qfsWOXjUUxHOWxX/xB9NnzbjWFU/3fcTdXTwOgpm0ryCxRkhCWAv09ozne8xJ5IfE8iyT6hLDmNJANx8nEEPQVKs6WujQylf8zINYTRzcEIrKNq5uTcZV+ZEHKkF51hN5Bs9BVlFB1L4zqQro0hlFdQUpC4n1sbLAjzBPS0fBemjeq4sjYWvrcSr9tGY5NW1ikcz7yFbPZi2z6krPJFuh1rSZ+EBSRGG5WALgts= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb08.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(36860700016)(376014)(18002099003)(22082099003)(56012099003)(11063799006); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 07+DykPfwBTdOjWOOJL7TFwfeKpXP7NAXQwHDooVB9OpOwS8v2z9yrWKk/stmjmeq3Kgdh+OIc93AdXzT8Ii6EQsCr+qy4DGI/X0cDdEN9XX9wbhbS5jVj5tzykypNFjms6t2O2yXn85fNYjmM0uW8Dv2qxmLSG5aQ/qZ8t19QxhOnH9lRKfij4RHyg2X4e1aHDe+3lUjNBvaf7HeIxgSZfwhoxiCj+nIHIMFtMCMQmskReXA6jLgDrBWd1FAcuS1TsDc8mChwoRZjIhpIfVgKUYo439ATwImLruslI6sKYprc80Wr1q+AsAbdp569MRXqye7CHahIQfI+uCyhN5PwfZqXf1sLGj5NBcib4jChIZk0bDQrv3vh7MzEy6oShVYCE+zYXtN5I72z0MnEg+kIFiSDMwwVnXqzZXOAqsNALmiUBNzcE91lbJ1529wXtm X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2026 07:19:01.9559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c4ec470d-fe2b-44c1-9316-08debaf70ff2 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=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCBF.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4164 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Gabe Teeger [Why & How] Must use an alternative codepath to access AUX channel when link->no_ddc_pin is set. Reviewed-by: Harry Wentland Signed-off-by: Gabe Teeger Signed-off-by: Matthew Stewart Signed-off-by: Ray Wu --- .../gpu/drm/amd/display/modules/power/power.c | 9 +++++++-- .../drm/amd/display/modules/power/power_abm.c | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/power/power.c b/drivers/gpu/drm/amd/display/modules/power/power.c index 1dd65bdf8cc9..5659a38b3366 100644 --- a/drivers/gpu/drm/amd/display/modules/power/power.c +++ b/drivers/gpu/drm/amd/display/modules/power/power.c @@ -464,6 +464,7 @@ bool mod_power_notify_mode_change(struct mod_power *mod_power, struct dc_link *link = NULL; struct dc *dc = NULL; unsigned int panel_inst = 0; + uint8_t aux_inst = 0; if ((mod_power == NULL) || (stream == NULL)) return false; @@ -482,8 +483,12 @@ bool mod_power_notify_mode_change(struct mod_power *mod_power, link = dc_stream_get_link(stream); if (link != NULL && dc_get_edp_link_panel_inst(dc, link, &panel_inst)) { - ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF); - uint8_t aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel; + if (link->ctx->dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) { + aux_inst = (uint8_t)link->aux_hw_inst; + } else { + ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF); + aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel; + } mod_power_update_backlight_on_mode_change(core_power, link, panel_inst, aux_inst, is_hdr); diff --git a/drivers/gpu/drm/amd/display/modules/power/power_abm.c b/drivers/gpu/drm/amd/display/modules/power/power_abm.c index b94dbb9e64a7..a1a0563598b5 100644 --- a/drivers/gpu/drm/amd/display/modules/power/power_abm.c +++ b/drivers/gpu/drm/amd/display/modules/power/power_abm.c @@ -849,8 +849,12 @@ bool mod_power_set_backlight_nits(struct mod_power *mod_power, core_power = MOD_POWER_TO_CORE(mod_power); link = dc_stream_get_link(stream); - ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF); - aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel; + if (link->ctx->dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) { + aux_inst = (uint8_t)link->aux_hw_inst; + } else { + ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF); + aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel; + } if (!dc_get_edp_link_panel_inst(core_power->dc, stream->link, &panel_inst)) return false; @@ -937,8 +941,12 @@ bool mod_power_set_backlight_percent(struct mod_power *mod_power, core_power = MOD_POWER_TO_CORE(mod_power); link = dc_stream_get_link(stream); - ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF); - aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel; + if (link->ctx->dc->config.dp_connector_no_native_i2c && link->no_ddc_pin) { + aux_inst = (uint8_t)link->aux_hw_inst; + } else { + ASSERT(link->ddc->ddc_pin->hw_info.ddc_channel <= 0xFF); + aux_inst = (uint8_t)link->ddc->ddc_pin->hw_info.ddc_channel; + } if (!dc_get_edp_link_panel_inst(core_power->dc, stream->link, &panel_inst)) return false; -- 2.43.0