From patchwork Mon Jan 13 09:10:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Lin, Wayne" X-Patchwork-Id: 13936972 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 D2A2FE7719F for ; Mon, 13 Jan 2025 09:11:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5562610E1D3; Mon, 13 Jan 2025 09:11:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="VplS0GS4"; dkim-atps=neutral Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2060f.outbound.protection.outlook.com [IPv6:2a01:111:f403:2409::60f]) by gabe.freedesktop.org (Postfix) with ESMTPS id F006810E1D3 for ; Mon, 13 Jan 2025 09:11:10 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SZj/iF5wQk50YYcQ/VN1Kqn/fmVHXqk4RIEBJioupRAbXPk+ULMcnCigg6MYVWb8oxUzDASQldb1/Gh2p9XqPCqHE4u54t0GtIQ0khTWFYjGjccSfzf/y4KQikRSlzbC/RRGhSfe0BBERQlLB3/XMANgcaB8WFpCCBWKyNB79isvgx0/MRN26EjS4hoUZ0I2AQCi2Av8JhHNnP2/ti+F8k9myIuxUD2vYg8HQKILLXXeI+APBjBsbFfIH75/MotlLd2vDcaUgnc1V0P3o0iBh0trCxHw/02l/i/GEkeDfg6cTdAy1LvTK/kcnd+HqtVRXf/u/joomtbfazzbQzLd1g== 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=L4GoBr1urZkxtf2ZSdy6RHaRxbGv42GlvQIT4DaDO78=; b=uPrI8tu3sKtNA4vUfz99EzI6sJeBST67CS739WocXdeJSdM7AUoYiLBMEjJ50f9ojMulldTrY6g72aWLhjzPyX4PasQJXnsv8AmhBMcEI9x7LwvDEBPUemdRqrDlpO/B1MooDaQDCON5daIuLioWOIWN00e5JGz66Uu8PVZiu8pxyUUMsqZ7Vs7AXMh0nPN7Sj5/45m3vRU/mkgZuejlTmQWSw1NVSlRcP9UHX0TsksfL2qu+M2aHXzcd+PKPhm09gU1QDPPHOuCKxkzIOUAC5S1135TyVrn5/8ceXpEjetOkUzOmKKn2epX4+pHjShDjdQP5pdrgK2jshiPqOATTQ== 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=L4GoBr1urZkxtf2ZSdy6RHaRxbGv42GlvQIT4DaDO78=; b=VplS0GS4aq/rt7PVWnwxJ4l89YSfKLZndV7sGRXGv82TlxUW+4SlJb7lFSM51MTZ0JPR4nzoybzSiakto/eNKiK8JtK4CEi8qST0kK/roImsora7bxQfOgwULmSrPTHD0HF1djiIeq1iPCPX+eJVqNHTWSE1XEmab6M1UXjfCjQ= Received: from CH2PR07CA0049.namprd07.prod.outlook.com (2603:10b6:610:5b::23) by PH7PR12MB9102.namprd12.prod.outlook.com (2603:10b6:510:2f8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Mon, 13 Jan 2025 09:11:06 +0000 Received: from DS3PEPF000099DD.namprd04.prod.outlook.com (2603:10b6:610:5b:cafe::2b) by CH2PR07CA0049.outlook.office365.com (2603:10b6:610:5b::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.17 via Frontend Transport; Mon, 13 Jan 2025 09:11:06 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS3PEPF000099DD.mail.protection.outlook.com (10.167.17.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8356.11 via Frontend Transport; Mon, 13 Jan 2025 09:11:06 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 13 Jan 2025 03:11:05 -0600 Received: from localhost.localdomain (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 13 Jan 2025 03:11:02 -0600 From: Wayne Lin To: CC: , , , , Wayne Lin Subject: [PATCH v4 0/2] Fix drm RAD print Date: Mon, 13 Jan 2025 17:10:58 +0800 Message-ID: <20250113091100.3314533-1-Wayne.Lin@amd.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: Wayne.Lin@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DD:EE_|PH7PR12MB9102:EE_ X-MS-Office365-Filtering-Correlation-Id: 70cbb81d-cfaa-473a-6dfc-08dd33b2361f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?A5va8rKGD8HjlOQgCjK3fut289i6C+1?= =?utf-8?q?YTEOvMNtxYFfU/bfEPjRkdi9GDDz9pRzvCujpfDIKJKdP41fR1O5Kc/WGqkZQlLn0?= =?utf-8?q?qhBOkUwz7C970tbR3uTJguCdjdTROH4TVBZnDjiTKneI2H7I89YSi8ZRO1XCmTLvT?= =?utf-8?q?1kRWOasIvYQBC71JTNdLmh2MH6v4/8wjDFORTWF4ML6ta460aKS/+BDU6Robj9YvM?= =?utf-8?q?j+Pw5FWThNJeCcl4iv6pGVa4l8X0q3UeSJfrT64GpY28Rm9lX+vIOLhMAOqy84TUh?= =?utf-8?q?vwKpQyUbCN3tEXDBmBLEPuRXtF9XmUrmoKt5H3mN2puNWJDamErzxuePCHmtmSpC/?= =?utf-8?q?vvigLDlcvf0sRW0CrPxFb8hvXj/ceRQ7ziMzeAToLEiZvIZZA12oikJiCe555uXyc?= =?utf-8?q?vSFhTEW8UnhTBhZycQ5mKniucSIyC7vxl2cySbSw+loR1vttpWJ5LKPziSBcgPxta?= =?utf-8?q?HHpiFMNlmeyQJFX2q0QKHIQQO/H9iAYdb5J5jClQBpOJcV/uAlKXT2p+GXZ8hFCz0?= =?utf-8?q?6Ham1rPAIOl4VB3Gf8BByDT1UWwLzNF8Z7EXfTmr341AycNpxmiOjusm/3y9ataf5?= =?utf-8?q?tSJvD2PZiaa1zAYgrNmbOBgV4loYbRu8OUAauf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FS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2025 09:11:06.0765 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70cbb81d-cfaa-473a-6dfc-08dd33b2361f 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DD.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9102 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is v4 of [1], with the following changes: - Fix warning caught by kernel test robot: drivers/gpu/drm/display/drm_dp_mst_topology.c: In function 'drm_dp_mst_rad_to_str': >> drivers/gpu/drm/display/drm_dp_mst_topology.c:201:81: warning: passing argument 2 of 'drm_dp_mst_get_ufp_num_at_lct_from_rad' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 201 | unpacked_rad[i] = drm_dp_mst_get_ufp_num_at_lct_from_rad(i + 1, rad); | ^~~ drivers/gpu/drm/display/drm_dp_mst_topology.c:179:52: note: expected 'u8 *' {aka 'unsigned char *'} but argument is of type 'const u8 *' {aka 'const unsigned char *'} 179 | drm_dp_mst_get_ufp_num_at_lct_from_rad(u8 lct, u8 *rad) | ~~~~^~~ vim +201 drivers/gpu/drm/display/drm_dp_mst_topology.c 193 194 static int 195 drm_dp_mst_rad_to_str(const u8 rad[8], u8 lct, char *out, size_t len) 196 { 197 int i; 198 u8 unpacked_rad[16] = {}; 199 200 for (i = 0; i < lct; i++) > 201 unpacked_rad[i] = drm_dp_mst_get_ufp_num_at_lct_from_rad(i + 1, rad); 202 203 /* TODO: Eventually add something to printk so we can format the rad 204 * like this: 1.2.3 205 */ 206 return snprintf(out, len, "%*phC", lct, unpacked_rad); 207 } 208 Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Lyude Paul [1] https://patchwork.freedesktop.org/series/141832/ Wayne Lin (2): drm/dp_mst: Fix drm RAD print drm/dp_mst: Add helper to get port number at specific LCT from RAD drivers/gpu/drm/display/drm_dp_mst_topology.c | 31 +++++++++++++------ include/drm/display/drm_dp_mst_helper.h | 7 +++++ 2 files changed, 28 insertions(+), 10 deletions(-)