From patchwork Wed Feb 7 04:39:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13548108 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2078.outbound.protection.outlook.com [40.107.113.78]) (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 521A010A20; Wed, 7 Feb 2024 04:39:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707280763; cv=fail; b=jOsGhkOqp4DYKGjmisB6r3lBi4wP/3Z3h8fUDkZ0UGN2+K7dZ7KTq3m1VeUwDF9a5Sw0a3FYMzybqYYV6K4Xe2rLullLLXFp9QKrVGY9FHyl09qLonFpq1U2KtAlLyzw6JrBkpFHFNmTcpsP/XzmvdQn4nbCrhEkSnC7w6JEh00= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707280763; c=relaxed/simple; bh=9D0tmht+UC/To/BNPPRfPIWvJEuU7lMpnpfq5DQo1rc=; h=Message-ID:To:From:Subject:In-Reply-To:References:Content-Type: Date:MIME-Version; b=AWLrfMQZ+doXiyrVqm2F3C9DbZvKta8pP06mmyEV0zCaUgf6hSaHAM+4YFuMMDIXr2O3CkWspEipDyJxquU27IykvZNj3SfBaXp4dA+R9PcLPZgt5clm3lrVeOR5fAN0q63fCU8cxAY1ZSwx1AF6DinJixPsfS37++KiHTly8HA= 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=X6pDPDH7; arc=fail smtp.client-ip=40.107.113.78 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="X6pDPDH7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=atGuOd8eOP7QIt98pUbowHjfWjbJs6DGhRZgFuQeiDYq9OGTOHSJ8ZLPqipOFC2PorbtCfg0oQDM4aMBv33LrKnnQxckQIYa19DCxa+Q/mJPzvxtd2gsxAoSW2uN8ReSyASfq27bjzXZwYDMqtcalJIHlQ0bjC6Gknn3X1RONDM/eJOD74rMBtKnah/Zcl+J9ajeAPaStkOsNMoDR2j6qhtIACIJab0J1gjWD037UTugb0slrLt0wWm5XMHP3C0A9QlW52WrfWrWtqwXCE/gUdrZC3rtbzvKjh22VLP9qTwyI3w4i1UkHy36J0ZkR0w/gyrgVz97Z7OQorEzIUKYsQ== 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=N2NohMG3QTZiRe+pOMd4McDZ7t8SyyE0URzxf3tYs9W4uT7RtOcnvbbD2pZOMox4HkeuYs7G2NCNdoLtSM3OfdYE2/TygM0XZYwdrKa4xLtKWjVy20w0QKRk7BBnF/SDIQy1OlakgtXafKUNsCOeY7/0NELrD+ytKQakwz9227XRLygHMg+aGc5aPIdJQqnfZcmXPyjUZLbxhsaaFtzFx81dY3odvmVvgXlhZz5k0xwfFIrN+8MSmBcKwHqxHG3/8WNdkU4XWqf3HgjgZ12BtUhYaoloRHH6+gkexMLx6f0e9qEgvypLi06ZPn6+DIm8zYhPwSfaSMrrsWHm8yvTPQ== 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=X6pDPDH7BmzEl7c98SJRFmCYn+o6RQQyV2AAKIaI4YsABNaFyspxfuveUHpY4ongSrNxC9nnBGOe08/qXVgswgJy5QZl/RY3jCNizm8qky04XyPmeZYQ5R5kK03fgFk5HWPrpDLySPIr5s/hckUTVNoq9Ql3bG4OhmIedbZdUVE= 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 TYWPR01MB11031.jpnprd01.prod.outlook.com (2603:1096:400:398::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36; Wed, 7 Feb 2024 04:39:18 +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; Wed, 7 Feb 2024 04:39:18 +0000 Message-ID: <87le7wsxai.wl-kuninori.morimoto.gx@renesas.com> To: "Lad, Prabhakar" , =?iso-8859-1?q?=22Uwe_Kl?= =?iso-8859-1?q?eine-K=F6nig=22?= , Alain Volmat , Alexandre Belloni , Alexandre Torgue , Alexey Brodkin , Alim Akhtar , Andrzej Hajda , 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 , 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 v2 4/4] video: fbdev: replace of_graph_get_next_endpoint() In-Reply-To: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> References: <87r0hosxc3.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 7 Feb 2024 04:39:17 +0000 X-ClientProxiedBy: TYCP286CA0305.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38b::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYWPR01MB11031:EE_ X-MS-Office365-Filtering-Correlation-Id: b7bbf108-d290-4126-18b2-08dc2796bee3 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: bHasXoaLSyRZ0+tbjrPUZlzlDCAhap6HluvvV7vtAGC5dQGVmg+f8yGl7rsxr4K1V9djMWGwccLKKr/WE0wf91idrO4znZux36ivIY4zhXnGY2SDizUpXr297H0I5ulwlIilRTT8xVurB7Z6LorJHz0qzwpRHr/hGPUKApTANDrHBVnBPo5VfqokreYLnxmRkJBHTfB1rYWHnZbOC9R6wwvXl+U8i1EHl8GdE/s92k55NTwRoTbguzWWRfUVUoJvn1Ll6c12gFe8Yq+Pe9wDxAK1nn5Gi7O6aIfEF9bkSq4nRi63soottsYBvsBlUgUtk9wgR0D5loxvvxjB2cwasC1UeQPVygiw0gnQffzbLipDM0ArLjDztoKiPsFxdc317AlJ2zVH+3BVN+QY6pBuL+R7M948BMMiEtS6z+hjrqFmm0NPLhi1R67f/tCJV/UwzKW5ky2gwC91zYdQsk2kp2//VtDI+BoA+cGnuew99Zjj6O0op7DcSyVrfyyWk/eHV3yGB3rP1pzNsukDGNhity21hjlSCa0MKBtaOtpcrcgLXrRcH+9EPX8skuP28Ve/i5RgikQ3dXoCCQgvn4Fc8C0ENY9IQBLvxq339FqiMH5tQbns2W0w29iaXIkBMtGq 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)(136003)(396003)(376002)(39860400002)(366004)(346002)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(41300700001)(38100700002)(66556008)(6486002)(66946007)(52116002)(36756003)(66476007)(6512007)(6506007)(966005)(478600001)(8936002)(110136005)(8676002)(38350700005)(316002)(26005)(86362001)(2616005)(83380400001)(7416002)(7406005)(921011)(5660300002)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3FCNt6ZZ7I/Pr/4nlQu6MJxi0u0/fUtTBnsZGdC6hHbWDKArJNX/urFMAZRujXqfvqmnhSj7pymLVmTgCn6L6xEVuAYG+LESmSkL+ZxZJQh3R+oZrl+GnG+qNcJyY6M8z9Kx+hXX2JxZENWddFTIjhjuNAZjK+NvZiwMCWoAqVcwAKAb2d8otfhDrEptgTUoWM1unJVs2Ffd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lZ8DK2v5e5dTnRCZd/IPK0hGkl+qaEnQ8O6wIhHcsb7YlEAzauZVcSIsCa+X69uqe0EcriX5pu+KzrzcWjFKHUf5dutsFzbUq0F+DsLDkIk/n+9Dj00m+P4S4ISXaNs+pWvmT54aRsDA4eKu89U0xSxcacN4mi0amI4GIJv2RyOLmnvXBuJ1hqZjt27dNehMo4NBc+gKBeuEIo9UnDmdigI853VOfT0UqK5SeLrUrSogubKggbo1LvqqdcpB7mT04IiCLrLImTY5n0q2xOOo1UgwXZTuSjSCF2XMJhRgkbK8Fpel70WLvP6h2voiQ7dwZM6z5uJUmO05wIE8Ec3paxtv3DlKs/ulOb2Q= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7bbf108-d290-4126-18b2-08dc2796bee3 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 04:39:18.1674 (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: kAGADB1N3w59RbhRwKjgxftugaJi7nRbpr9cV7P4lk3of76nL6u5jbPXfKlogXTSzJKDreGgYg+8y1XsgjNDZZhEIqiMqLRRTVV6CmigAMVZIumN12nUva2Jfmh4zbex X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB11031 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