From patchwork Mon Mar 25 02:57:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13601371 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11011008.outbound.protection.outlook.com [52.101.228.8]) (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 E2C9620DB86; Mon, 25 Mar 2024 02:57:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.8 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711335454; cv=fail; b=EtdJtY8vKv5UZfmA1SZcWtA6gL7ycmoRIq4lOq7uJI09AHlSGVIqx03F4ujsBef855nvgGFDEVKbEMm1zu10vo34vLmqRV/IVhkz7EoZxUG1UcnlvSdlPJdU+E8faIoWhOKDzPAaUoWZpI7qNZLP2KJ6cmmGDwzj0V4iEmrtTCE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711335454; c=relaxed/simple; bh=9D0tmht+UC/To/BNPPRfPIWvJEuU7lMpnpfq5DQo1rc=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=atynRtyQb+04bnXQjord7TmjzinYxie9NOG2s1y5E37TOxip/7gFSe9bpbm/7DzzMBR12G39FPzlKWF/ItnxNfn4lPq50jc81GQFOJl2rCDO0dMLA50+7GTVdrwX0DUZlJhbA2LszrbgrtMi2bfL0t9W8Zy4Lqw6RpB9hcmkndQ= 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=GawgjypN; arc=fail smtp.client-ip=52.101.228.8 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="GawgjypN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H9ifmTAGubjJt2gdrQqc0nmzjHUxpKH9EmX9Y+suhYB5z9rlpmHFbPH1QEnbxglkmhLDvnkPymeT/PKFb/4wUlLH0MOCX8P13ogqb6zO9WcluqnBoAW8FBdfht68paeYcfjE2HkAZwJ9L3gi6gUw32eiH7PgUJg0gj/Y1BI5L6/8PK5hJ9NJDfqQnqpU009ox6ptEDd+Hv1ag0dsCT0eMWJmVvPjt7dhJPok5Q2SbVmnTjngrH16gZyEqkiUOy4F+qF3Eg3feuIFpJC54AD4+vNgPdXftNODmGhxdb5X67NW2vKsOELHq6kovnk+KkRSdghpIyZhDsp/+Mq7uO3wHQ== 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=iPWy+PYtnAvN+6i0I6jsdtewufqRlqn7Qxjn1KjTnik=; b=YCBS7HrIQwwgyjRx0VFm9JKooJmcU3m4uujY1HpGRQ+JlKGbAjFO3lySJIMY/v8nIstnu7ie84fn7FpEzPzrOdP10uLbra8UHGMMWlh/edxoY+qGxmmednZd3t04JDcvj7DKO4Dfo+fWtj0XWLNcETb3uwVc/ce2cr4q7gPh1xge5LPViUKVx2Nj6LIJNQixn0FLAcTEWF7mQHw/9bA1P77HuZpat5IGS2z4J2uHYnRkbbLdlt5GtZ3H6+Mv/htFj8IJz/WXIrlNCp9wy8bKa4I2glt2DHecVksIkOEtHBxEEsAUW4C7q4OOTpG1lceqfd8A+7Ve+OcsruDUiROmqg== 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=iPWy+PYtnAvN+6i0I6jsdtewufqRlqn7Qxjn1KjTnik=; b=GawgjypNh/y93otajLRDRbBzl5ZyIct+KRQUJ0f53qGPn1r9zjK/BjLH4HneRM2mkpf3DhBGI5bPXjlVGRTGZeikOALUErvgcPc/MDlsnZgtmYTJtl0v1vrKB+fOvR7j47nVjsIwP75fvmCVLf3TMi0B0v9vWJShaY2QdoFk+Bw= 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 OSZPR01MB6831.jpnprd01.prod.outlook.com (2603:1096:604:13d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 02:57:29 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b%7]) with mapi id 15.20.7386.025; Mon, 25 Mar 2024 02:57:29 +0000 Message-ID: <874jcv6msn.wl-kuninori.morimoto.gx@renesas.com> To: =?iso-8859-1?q?=22Uwe_Kleine-K=F6nig=22?= , Alexey Brodkin , Daniel Vetter , David Airlie , Florian Fainelli , Helge Deller , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Rob Herring , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-rpi-kernel@lists.infradead.org In-Reply-To: <877chr6mu5.wl-kuninori.morimoto.gx@renesas.com> References: <877chr6mu5.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/2] video: fbdev: replace of_graph_get_next_endpoint() Date: Mon, 25 Mar 2024 02:57:29 +0000 X-ClientProxiedBy: TYAPR01CA0234.jpnprd01.prod.outlook.com (2603:1096:404:11e::30) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OSZPR01MB6831:EE_ X-MS-Office365-Filtering-Correlation-Id: d02b6376-0a4c-408f-04d6-08dc4c774f6d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3mAxNal8cSc7+E+xx7VB9kOa+G7NafQa+zwt1rwfbq0JdtNn1mEFagYAkj4YMld8Sm8SsthdP/9kNb7WxjGOj8PnBSnd+oCwJrpGbBM017ArG3EN+Ksm5T0bhaVyiHZ4deO7icoXRIyrFPW09+6VB/rxxSPduvo4qbziV3vpF6ZGfb1ZZ4ee6vdHyVbqpf9Mm6U9OSSrNyEyPkIHD5t+MwFpvP5jFZR8TJsbmZjPWADA4/ifsdx1nI+z/nXP7pEPn9BdwuWjB4bk+BHAQ2V4F/0XIoWINCAe/lGb3ab3jCO8JA5DQYiaegxt8LP3mxDKOiauSomIJxzfL6Bg8C1TWlwK+tnSfo2uiOtg5hdb78I5/fwHmyfiXDsfNvbGPKvDp+RwzbfCslepaWuEqths/G69QUX7/jfvQ/e5INNOSpx7lgtGHJ4uNZKA9fdr7CXPtyRDmL5FZQ8pf+hvYBtxj+oG0c0KdTrxkigyNHcmTzmP1x7GqvBH8ECYYx4HVwbf8k8WGEd1Xv8w+7NA3cBRRequZdhbH3AkYh8IxishNZlJyb+3WQdCAdIHviEgidJP28dBtuUgZ75oUqG58d81h99vgmDC0sI+SjE52WesK8gD9YqoNYeCQ/X/P3mz5A4dl0nFa17KqTdZ43p6imt1L4PlFL/BSzUlQOQHaOlvH7I2k7+RluGrgSwNe9HwxEv2 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)(1800799015)(7416005)(52116005)(376005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 96LSZ6JGTAZndhkCoekZVMOctVBYOwD+Ic2u6++Tzo9Bkt1CgFGkC8JBS9m/DAeaeIe+eSDCKB8BKk9sLvWvc3kYT89oKsvT0nBm/nbaV6+OT+rljQIy+qwvWs2VP4EHZ7oxMVA8WqswoOHpqZCP1ivK5ebRgEZB4aNIWccHK30tfYK2oT8bdbznK+2OLm+y6HwFdhL0vU4iOXAmKiR6k8aGivG/gpYsn++swxJRqHRgYRLGhAU+L/agQKYeobDrpCYm6+572TPVF7O11oXfYnHTg+inzMl6f57/riG2l5ebsT1J+xVzBac97LkOxD1WfUJOdmMJpyMlVfN81s6Ga/9JkZjEv+plg/nPjNdTt72KVkIYwNep58Gc/msdtcNlyFKqoCev2dvmBFTybgpTZoEIy1V/mwb0ZLqvCQ4Clk2eXdZtqPmvhUzxHoIrW8QWH9vYoNFJ0vvGuWaISPy2thLYIHC+aI3CBgp+IJ3uWHo4JA/dKo+eA78wEy4vXu1+WwhdwbK7wPCxd+Xa60gRGhW+ZMw6KnRX0m/m46nYPB8/sVLPBvFaxdMnkoEzxZpjxQBHmXeVRZk0ZPjC6z7MPPqNlvYkxTEBKVmIQqH1+3EEHvxVg1uj+jGyKJ6hNx6CcR25V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change-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 02:57:29.7813 (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: qY78S5f4+JLcLSQlhqJs+qoEzXz3kPb0JZHmiFtqGJ6q7dwlGfIDr9bRmyaVmbookWs02lj9LvTVobXy3vyyXjf0q0sMmmzaGpwoVc/1NJeE/Ad8iwFsiP+OdXuuCXyq X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB6831 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/video/fbdev/omap2/omapfb/dss/dsi.c | 3 ++- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 20 +------------------ drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 3 ++- drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c | 3 ++- drivers/video/fbdev/omap2/omapfb/dss/venc.c | 3 ++- drivers/video/fbdev/pxafb.c | 2 +- include/video/omapfb_dss.h | 3 --- 7 files changed, 10 insertions(+), 27 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c index b7eb17a16ec4..1f13bcf73da5 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dsi.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dsi.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -5079,7 +5080,7 @@ static int dsi_probe_of(struct platform_device *pdev) struct device_node *ep; struct omap_dsi_pin_config pin_cfg; - ep = omapdss_of_get_first_endpoint(node); + ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!ep) return 0; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c index 0282d4eef139..14965a3fd05b 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c @@ -130,24 +130,6 @@ static struct device_node *omapdss_of_get_remote_port(const struct device_node * return np; } -struct device_node * -omapdss_of_get_first_endpoint(const struct device_node *parent) -{ - struct device_node *port, *ep; - - port = omapdss_of_get_next_port(parent, NULL); - - if (!port) - return NULL; - - ep = omapdss_of_get_next_endpoint(port, NULL); - - of_node_put(port); - - return ep; -} -EXPORT_SYMBOL_GPL(omapdss_of_get_first_endpoint); - struct omap_dss_device * omapdss_of_find_source_for_first_ep(struct device_node *node) { @@ -155,7 +137,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node) struct device_node *src_port; struct omap_dss_device *src; - ep = omapdss_of_get_first_endpoint(node); + ep = of_graph_get_endpoint_by_regs(node, 0, -1); if (!ep) return ERR_PTR(-EINVAL); diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c index f05b4e35a842..8f407ec134dc 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include