From patchwork Tue Feb 6 02:55:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13546556 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2125.outbound.protection.outlook.com [40.107.114.125]) (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 524286EB68; Tue, 6 Feb 2024 02:55:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.125 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707188107; cv=fail; b=lVPt7AFXNjhUGpusijTXrWOUxv6h7HYaPgOdr8pwx21K9L8UJBqqFhSQijAitHH8b6Bq/9ynzV08woEAZYpqZRz13AhitsphLzLskrMvaRN5VlXrUPH2SaMDweM6Gg1ff6xPgHlxZDEuBDKj6IiaXFHS5GqzuK0/cHRM3G8yfr0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707188107; c=relaxed/simple; bh=iIk/LI0rzPAz0/32GdWmZT6fT2YAXq40Gv5l7SC27L0=; h=Message-ID:To:From:Subject:In-Reply-To:References:Content-Type: Date:MIME-Version; b=P21iRyp8X7Xs4TLyZScmOVqT/6SSuYbipBhLanfQnl+/gW94BJfbY6ongB+SiETdutqR6oPeXdnNDD/74eLXj+y+BHyCHw2T3PploM6w2ottd7SZdLCktMQ3WaRhumbSWKeIZZp6945+DJ6ZyLZBPTiBFo/kLDZWeoobAkhOzpo= 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=h2bRmjjO; arc=fail smtp.client-ip=40.107.114.125 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="h2bRmjjO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fNA5bWN2CzQzAJ0j3UvmO27lwpTFtVASzlV5cvbKabppLC6WcOHDPusnA/98cVepW8kvIo1Qg0YNBwOOkySC3l88lJeuG8HH8UUH+S1aMWRGzs0LoRh4o6jVIt1zSqu4/1z0y525cLgj7yWuCu5R4Qs6KPuJP/U4agCmoZT3KwYBk/agoue9xt6rl87T7AbR+RmDXpZFsFHnWujMDMnXAzbp3+TOcVK4R65ZE7N3Gy28PT8SjDSaeC3qkBENM1Y1/X2b7r0/2BC5uEncZvqk0qpYXT+JGSRnN9Slmieb1pU6WsBqZVWZG4/ZPPawZY9L83eMTDFdIj4I+A7bkMSulQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=iayePQaMqz6HiATSvdbrEEMINCdHsBYoIgHDVRwiAQI=; b=dQobejUTQSbZyWDAiVpPzgRRHIT8LxgqSPyizzoCJmT+vMFKbdl/qD3UsEp17A+WegsJLI7/6KKr5vuSS8oAabB0rcRQ7pUAQK3pNfT6/t6SA+Pj+pMNp/XZXXCWfPwIh7/9S4hQK1ylMiR0yqJ5eYPlvWbSIV9ZvvE3uNEMhHixFOoFU+TPSI5IsXDBmKE3WTvYouSCl0y0Isq09CROE4vm20DTYgUBrILz8/5Ta2a5W2wMVJ0wJEpbMEBVKlRljOu4q86rLh0G8goDNrDG8p95DTdlSDzPZ2ikJchyRywEfIQIeUJ1KV6FQHGaFo87UfCciO6cK0LhweSkDMdb+Q== 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=iayePQaMqz6HiATSvdbrEEMINCdHsBYoIgHDVRwiAQI=; b=h2bRmjjOK+tPChod8dwmkTXoFqhpucnavJmzx59h0Oj1rGQ32+kxHumOXHKCjaKbixmiMPBEsGqFjxf4phLommipj6/Fs755swOTHGtHgWdv5gAwZK1P9sLK5GAhPadOnk8H0pGgdREiWEvbLYaEUo0v39GZ3+EqssMHE9F5ybY= 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 TYCPR01MB9700.jpnprd01.prod.outlook.com (2603:1096:400:220::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Tue, 6 Feb 2024 02:55:02 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::4d0b:6738:dc2b:51c8%6]) with mapi id 15.20.7249.035; Tue, 6 Feb 2024 02:55:02 +0000 Message-ID: <87sf26nvy2.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , Biju Das , Broadcom internal kernel review list , Claudiu Beznea , Daniel Vetter , Dave Stevenson , David Airlie , Eugen Hristev , Florian Fainelli , Hans Verkuil , Helge Deller , Hugues Fruchet , Jacopo Mondi , Jessica Zhang , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Mauro Carvalho Chehab , Maxime Coquelin , Maxime Ripard , Neil Armstrong , Nicolas Ferre , Russell King , Sakari Ailus , Sam Ravnborg , Sylwester Nawrocki , Thomas Zimmermann , Tim Harvey , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com From: Kuninori Morimoto Subject: [PATCH 1/4] gpu: drm: replace of_graph_get_next_endpoint() In-Reply-To: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> References: <87ttmmnvzh.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 6 Feb 2024 02:55:01 +0000 X-ClientProxiedBy: TYCP286CA0229.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c7::8) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9700:EE_ X-MS-Office365-Filtering-Correlation-Id: c9a48314-7b86-4a7f-6b68-08dc26bf03bc X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +P1Cp0ZhdoF44ZMT5+6/wCc6fbUn0q0gKVq3R40cRq12TH9FP8ok0wLpmEkWZxEdP8wxzIlS7grwe0V23M4oexJEZweUxtyh2mQqAYk/WbzzVbZWCmfPMXZtgVtQJkpHj5f3twTtEynDcRYKYJvbKjNjjSburHLWgSvuZl1GMF090OkqCcMNmD3p4wOo4CbXcQtdv9OjSsL12fdmTNJ8vjcBwjzB1JkVENyuMgslD+SVkQxQeOpvFmwc/gNycbH/YsQB80Pu22q27K9eFacPPCtL/BPDCts5I3knGnoBv+F1jsLIPioVbaaouAbLAhKkPevDB4J6wVex46PuutghStspCRZJDc9zUKrtGBaV+zTXoK9Kal62x/r9jpsEP7RKZvNO4wp6YhRZDGxcTnikCTRSMGhbVz202gp5BRLW85XmnkQFc0nPvozm4p/+AcT4HSue+6Mm6qSRYqMJXHPhJzYmoMEhmrIP0ouFfLC/ulVY1xFnmre8zTry5jq156rz5Rw9isqf1gMaTxcuq0rtYHQLXMjpwhysyOIwnnWpnTVkajCOifBA10QBxXPdLmjM/tFkZa90yPLWXZlAR4+GrTyyX4JdDm05lK53+QDHZ5auxZX585/XQAWCumbaVxxz 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:(13230031)(376002)(136003)(39860400002)(346002)(396003)(366004)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(41300700001)(38100700002)(6486002)(110136005)(966005)(478600001)(36756003)(6512007)(6506007)(316002)(38350700005)(66946007)(66556008)(66476007)(52116002)(2616005)(26005)(86362001)(83380400001)(921011)(8936002)(8676002)(7406005)(7416002)(2906002)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y5JYXDZgyjOB0/l25KvEKnw2Ztyr45wlD1GWHJM9Re8fCAaT8peLiS8EfE/uhUMDu+zPETuyB7htWRvU8Maji/PevcO9NObyVbICNn//hIuPlWEdtWoFYVZ9tWEGrCb5RiFb6G1MmAqELKXQd32923QUYnGJ45na3rY5QaNzbOsDYvYgYVrWmOFzVrgyk8WSt9RPPK2vB6IV+KCBx4OiaGS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5akg+0tNjHsrNZdUZEVmpm9Z9nba7WXFichOHUJpt0Bppo/jqwBLUu0AZ/5of1Q7Kl8pOLPa4dlMaHOuMlWn5N1s0A3weh+cVVYZGXKza/dbogHEHgiSt/SbYeSwRmah8td1noe/QUtoCdsPpEf0Z9PEdy6RUMx1m7tJCSk3ggqll6GoQ8dCR8pJsH27RzjIu7l9LgNzU5qkjC6RnV7J9I87nXvJdIFegQRkEod6snhGLM6hH7AaykIsaiVau6lRKxgx79Kn6ELKMuICkrqguAmqPMKjkQyyzMBg/FQR4AkMfyXqoPz7rMgDyDkKX680VD4wZTWGapjHdPKyg1zjMSphzPmldQLDtg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9a48314-7b86-4a7f-6b68-08dc26bf03bc X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2024 02:55:02.4302 (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: SriNZuDemdvq/9XrEcHo3KBOoPGs6ac6wbhViHJ+q4I3WwrZMocnWqyBEYeN+ujBGy3BhSUxSXR80TGniGlFEcnDpjeSUv9zdFFuxZnz3QUZW8nsKctPt4ZTN3jheWpi X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9700 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); Link: https://lore.kernel.org/r/20240202174941.GA310089-robh@kernel.org Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/drm_of.c | 2 +- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- drivers/gpu/drm/tiny/arcpgu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 177b600895d3..c2eae9296012 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -516,7 +516,7 @@ struct mipi_dsi_host *drm_of_get_dsi_bus(struct device *dev) /* * Get first endpoint child from device. */ - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) return ERR_PTR(-ENODEV); diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 4618c892cdd6..e10e469aa7a6 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -400,7 +400,7 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c) rpi_touchscreen_i2c_write(ts, REG_POWERON, 0); /* Look up the DSI host. It needs to probe before we do. */ - endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); + endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); if (!endpoint) return -ENODEV; diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c index e5b10e41554a..04d0053b9315 100644 --- a/drivers/gpu/drm/tiny/arcpgu.c +++ b/drivers/gpu/drm/tiny/arcpgu.c @@ -288,7 +288,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu) * There is only one output port inside each device. It is linked with * encoder endpoint. */ - endpoint_node = of_graph_get_next_endpoint(pdev->dev.of_node, NULL); + endpoint_node = of_graph_get_endpoint_by_regs(pdev->dev.of_node, 0, -1); if (endpoint_node) { encoder_node = of_graph_get_remote_port_parent(endpoint_node); of_node_put(endpoint_node);