From nobody Wed Nov 27 02:38:08 2024 Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011067.outbound.protection.outlook.com [52.101.125.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23F1A12CDA5 for ; Tue, 26 Nov 2024 05:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732599846; cv=fail; b=Vhmbjwju3i/RsbOzGYDF10FpZE81XUq5Y0fy/h3AGh5OwkaZhT4dG33ngBbKM9YnHMafMiFjsQmgVKTWBQLfJyqLnxr0rXlNnbldsQJPLGLKQkIBp0J4gDan4TnwLh1PJClvylOnyVv+zv81djftfwKvilHWgare58y2TzYb1gg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732599846; c=relaxed/simple; bh=WFJvUcIHF9o4JekYp6EjUvGz4ncd5dqSYkLZAnOLvOo=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=l2cxqJFojdJjfKGjluGRDpc+0xQ165vkkZdnMKZnZxRrpp1LKzYXNYp/OMyzuPZZz42fYMIpCG8AzIetzvCJq4rMbpIyTWbPYx/1rYCG5VPyuTfXpLG0U1lpuxVklb0hph46EYZXEi0QdQd3VVUzfi2ht2BAYSeEtpeWfAunlVc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=aMAJoMTq; arc=fail smtp.client-ip=52.101.125.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="aMAJoMTq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k8z9oyibkB/b49rVLpcFht22lOxAhfXUSFOyWIKLPdRYOdSTgXUAuDeEUk/Ul8I4Wep3QM4b8v7rqrsLtZoQ4jvwgnQze10u3FuvGCsI2G348r7PGBUwKa+Tzs+JidFHozQdh7v5hgRrZM0HoWOTtpsCZ5ogVpRPpXuTyM8h/8+wQ1j4G5IXaO8jfkhXcEW6CgNKQIqypikJopZF8YbUbFVxFTWdDpgGkiJQkDn4vq3Mk7noTG9ebwgo2T5uiy62kW8Ql5eBGrau2P6X4m2J0xGsWQnDuIWrzZDxnCgU+20j0M552dxsnBvwNh0O6Cu+fJrOOKHgsrYUV4O2QKCnwg== 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=CZdFGTdJN3ehcbxazPVepBkaAaWOXkTkIwh11C2cDNc=; b=vlNBpyA8eJ95eqE/+GoqGCt/ArVX0sLT11zhtyjTCNebqZHkvy8KR4snt09L004x/scS9X3G96V1M5AU4ALRL1++3WOKy8xuc6xNm0TmdtpFPV5hwrr8pKBOkaRHK2FVbrD9Bo21BRqUHF/oYrcPcUylFDIjkfIrX/TKcuYTnu4xOho1W9z8hxHLadQ96U8UTZqeWu9KaXe+jidnyxEFcObLsAyaL46drJXj+tZCmf4ylKqzjnnopKpQUKiww1yNttyNnKm56Vn113iH1ZQG3IFkzKiTsc517NlIYve9lrzQI1nOfdlOzROdHZJuLo2+HC5U0oTPH2WzgEM5qLKAfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CZdFGTdJN3ehcbxazPVepBkaAaWOXkTkIwh11C2cDNc=; b=aMAJoMTqZ++76zdhCxdJ5EZayPt5ql9UK9HqDvWkEkAT/8bCtvdgNTojJsbKnE87Yi1tj7xDuK/aiSorapFzqZFMEGnKid/Ul/DTgeXuNOW5OpIVFNDyV0j/8oAmEm5IP6M4X7vLAq15Zewh+vdRCnHAkhRftZ/hm7uWiz9oaHI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OS3PR01MB5926.jpnprd01.prod.outlook.com (2603:1096:604:b5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Tue, 26 Nov 2024 05:44:01 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.8182.019; Tue, 26 Nov 2024 05:44:01 +0000 Message-ID: <87mshmsg66.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v7 1/3] gpu: drm: drm_of: replace of_graph_get_next_endpoint() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Rob Herring , Laurent Pinchart , Thierry Reding , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Neil Armstrong , Jessica Zhang , Florian Fainelli , Alexey Brodkin Cc: dri-devel@lists.freedesktop.org, Broadcom internal kernel review list , linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org In-Reply-To: <87o722sg6y.wl-kuninori.morimoto.gx@renesas.com> References: <87o722sg6y.wl-kuninori.morimoto.gx@renesas.com> Content-Transfer-Encoding: quoted-printable Date: Tue, 26 Nov 2024 05:44:01 +0000 X-ClientProxiedBy: TYCP286CA0133.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB5926:EE_ X-MS-Office365-Filtering-Correlation-Id: e94eb804-44f6-4c70-cf06-08dd0ddd54c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?mMiBT6h8nwT3aQnbCoM/a0+N9vnBmMHpgLlxoRHKG7aWx0vjZaAn4fpGxjE9?= =?us-ascii?Q?iMstxoq3ybeZ0DyOfwaZf5XP7EvHRsR3epAgBp7Gg4tiGGe9g0nZU5gRbxVd?= =?us-ascii?Q?1zHCzNac89AQj/VutwK0ddkh+TeXt+tCteelwlNZwqQqOzzNT05aa+2OvLwq?= =?us-ascii?Q?cerrI7lEs//YEDTpCwiB2XIMjk+Mh1zl6icylQha7957IWlnl8sxUFS8dT+f?= =?us-ascii?Q?rr+WiS750T26xUIlQOJWVIPxLjOLUfrSWsycuLLb4R93FXc6P15bHM0KXWGE?= =?us-ascii?Q?TbeHwuG6XJZWoQ3YpT0bcCRcHLucVjG7o/6W2Hy4Dk+S3rhIHPJwosz0AAO5?= =?us-ascii?Q?Udk1+2ZWF5JhXckzykNUxDsY5cGyYXbXIFbMD8kuEzBbvpeBN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Q46pX3zE823nuv/j9afq/wloYllT4OOEnl?= =?us-ascii?Q?PW9J/z6C3b41Z8AZm1XvVlwiA1Oms9zHDjj6teilQakvc5H9oH7j8L5qXKXt?= =?us-ascii?Q?YShD6/tdWZnDM/yeLrgF82oQOUy+xtx2oPO0N1Vs00o0pxOmwvOU/ZaF7VZt?= =?us-ascii?Q?RwDZTPRStFc=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(52116014)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?TGsRtvZpyEsQe/X56BaGS9pYet6aHgeWyBjEav1O4DRcP0vOXS23OSPK5NM5?= =?us-ascii?Q?i859VpqHYOCXFxdY7heqCZ8tfJVsKVSM37ff37eA+WydVpIwXXzQsTpLGxxG?= =?us-ascii?Q?hpYgfM3WCo/fznoxwGB2Ynnik3YpXKKvUcHX172OAnd8hUkahxrZYDhmaFEo?= =?us-ascii?Q?vgA80qmBHk0nYJ527a1TEERJUahpWWph+wOd3V6UosUS41b++47G33/yVRNa?= =?us-ascii?Q?81x1yde4YTGkesTziJVERTBraOKGzrjQvALZAj7lO0yRs3BJoMcnFl+n7mAr?= =?us-ascii?Q?wEbsx9+/eHe0MJFvVJrMv/E3SXP1w6+rcDJKPuD0NkguvWlA11NDjVTfgVER?= =?us-ascii?Q?dUUEeMp5fvNRW3kvxWRAoUxvewp+v+/e54ms2zHJyjj4Z8bfKLlHN0gvLZ13?= =?us-ascii?Q?RNRIks3JklcLMNt7Zq4yQoZ3j7oLt4vx9tSM3stWermoA/JpdfGg/NUk+V8f?= =?us-ascii?Q?5TW3+g9o1pEb2qCbCZIw0A7UeKQ1NwP1pVa/mmzOxAF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LZUtVD1Kf63VKSbDNRIcKdRnLq8L4nk?= =?us-ascii?Q?kcpTGvyKiRqtoU4uodPeYXUJ/A8X51Nu+0FbagWXUemL1RB/fhHVwNLYTbQA?= =?us-ascii?Q?qO9cbd7KbcSK3GHfOarFp1G0f+w3BeAaf81b/rCsenAGK7ejAr6oNr+aLV2h?= =?us-ascii?Q?+v0H4kSnaazBXq5TBQ754H1Uaa/1EJ1uBOTdQDKaHr5aPUpFRINt7mx9B3IC?= =?us-ascii?Q?rWud6ZP67oZ3u6fg0aFk3wE=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e94eb804-44f6-4c70-cf06-08dd0ddd54c7 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 05:44:01.8591 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iYBv2JwcyXhzzZelwEsskEmGuU9INJnldkPM2CsX6kjHPs5ODvK/ujON8XUw1wccHRBSh7fy0Un0dTbZb6DwTo841+Bj7eujvCU9AY4z5AL7lIoeCmEgRh+bcdkMQyF5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB5926 Content-Type: text/plain; charset="utf-8" From DT point of view, in general, drivers should be asking for a specific port number because their function is fixed in the binding. of_graph_get_next_endpoint() doesn't match to this concept. Simply replace - of_graph_get_next_endpoint(xxx, NULL); + of_graph_get_endpoint_by_regs(xxx, 0, -1); Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_of.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 5c2abc9eca9c2..5530919e0ba05 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -564,6 +564,8 @@ EXPORT_SYMBOL_GPL(drm_of_get_data_lanes_count_ep); * Gets parent DSI bus for a DSI device controlled through a bus other * than MIPI-DCS (SPI, I2C, etc.) using the Device Tree. * + * This function assumes that the device's port@0 is the DSI input. + * * Returns pointer to mipi_dsi_host if successful, -EINVAL if the * request is unsupported, -EPROBE_DEFER if the DSI host is found but * not available, or -ENODEV otherwise. @@ -576,7 +578,7 @@ struct mipi_dsi_host *drm_of_get_dsi_bus(struct device = *dev) /* * Get first endpoint child from device. */ - endpoint =3D of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint =3D of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) return ERR_PTR(-ENODEV); =20 --=20 2.43.0