From patchwork Wed Nov 30 14:02:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13059879 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BC7D7C46467 for ; Wed, 30 Nov 2022 14:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+hEdb9tpZ0gVnFfO8Ph6qjiGJgETPX8gFDRJMymI8kk=; b=h779/jruMk7Js3 RIJEX793W3oRUTIzTKFKsIgd34iqYeRrd7b6v5SDl3p0A2rEEd4wfZK0Uz/ff+XB9j079+f2mQNE0 9MPDvRSjDmSwaPAQ7FOTe5M18swah4VLFrwAD+ExCLMNo89jyvGww3B5+oWvHymnlGsMa/7jk3nez LWysIgq2GU2CdeSXmhOe/5ZhElDV/bodOLNoifoa8NAwIQY3jzapnFACKueTOAByOoXDVXKRoSo0L F4J8Ctm2XJ/Nq6DwStlXiVLXfSubPYwwyBe0/dIlcu+LbHlXQ6kxA16En/T4LrX4oP9C+fuYO/yzT HidCjABQ5lFIhulpprdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0Ng0-00GgBw-N0; Wed, 30 Nov 2022 14:03:04 +0000 Received: from mail-vi1eur04on061c.outbound.protection.outlook.com ([2a01:111:f400:fe0e::61c] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0Nfo-00Gg2K-S1; Wed, 30 Nov 2022 14:02:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jS8jg+zLXxobDQWaHlmmT8rEh10h98sZlYGGXV1iwbRE3QmGyl/xXiexSx/xmXRG80NCHCajIjmqasi3mruhG4zNi7bJWYgegryGbzH1ZFZwK1Nl+IN16uwvG0aF5kXoTuYQpRWH4tJSjsz6T6igvADDUYQJ708HD8swNWkGExcXl4wKhM4z9Hp9oubyliboVlaBnkZValWxfCabcoWQzRDST+8SwrhiOzXSwywqKkhnG1pscuzByN9+4mqe7gvOKnr/sbkXztte68vsJ0z64CVtPyqi4GcJWiKcNzhuuxVLEnxlCOxXSYuwg4q6+53INihj6lUwimoqCu7u2QK9Qg== 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=VvAX1QJVSflQgcZ/wCQoBsMk5roSxs2Q7ZiVEVqQIXQ=; b=M4NB5doR/CzcMVuMKJ7dtrS6gODcIcRJjeaLPQ7MAUYgsrfxs2phasUiKQk/JWqnrzbcHsqWkTzBoJO4N/UTIlFwPaR6fsbZtWaPtwZogficV3PNl1ja37vK4iJLbolG5Ss31PSlY2JkyolmzFRvWAENPy/t/7+Cdyy+cCsDPnUdUbuXk+djws9QYPZv/7ZZs/WXo0S2L+k01aw0Ic30RG8zZ/opOTt6ctpXcEJjDPN4kp9Av/MR87j1jSUKk2OdRVOdQEG4pcxmym+ZetD7mIhRcMFyUXlIuK4zDHWpf1HG+CU1kuAxzZm3P5KDnVYx2Ssn5HPf8FpcvUHz0X7NGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VvAX1QJVSflQgcZ/wCQoBsMk5roSxs2Q7ZiVEVqQIXQ=; b=gfbv4OWmmzPxUbQzzSYP7ILSUXFIAqLl5Z16P+BJpJesscvvUgnFzgc+23K5iRUYnLdIkGbx5MCufDLVgw/3h4ishjCFjTP3Kh352NyG2lj28r09dejn2Zci0+lKtgASK+6PnPUEaRsXIIre11MWnfHZjEzg330kk0i7blDCaaw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by AS2PR08MB8695.eurprd08.prod.outlook.com (2603:10a6:20b:55e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8; Wed, 30 Nov 2022 14:02:48 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637%2]) with mapi id 15.20.5880.008; Wed, 30 Nov 2022 14:02:48 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH 1/5] drm/rockchip: rgb: embed drm_encoder into rockchip_encoder Date: Wed, 30 Nov 2022 15:02:13 +0100 Message-Id: <20221130140217.3196414-2-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221130140217.3196414-1-michael.riesch@wolfvision.net> References: <20221130140217.3196414-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0182.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::15) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|AS2PR08MB8695:EE_ X-MS-Office365-Filtering-Correlation-Id: a12d57df-ae31-4496-80f9-08dad2db9038 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dTYQLkoGNWsuXYVKvjC4U3rXrXQNtEgheccXAFCD2Ahcz0uuEeHKLIqazaWRMVJPqg93OuOfyy9NpE3zoRtjX61dlWfvXInkZK9oezh5xo+iyLqzcZ93r32imP7C1VO2gt9Ov7Eco08GBjMQqJ3ml6i52JTzJduYjZjyMI1yl1oXsys7RRI4oKzuC6gCThqpQbSg84qnDiXV9eCVLnQBGBkQhy8x6F+kW5UNadFhSqKX2MO66DvJ+MeHFFIQoZsj9iqEV6g4xZQdZY9p/1MYk7EmqE4I/FmqSTmAom7qFepaJ1b+v9UtqP0NPg5cAVw05277x2fYdMt0u8wUHluvy2IN1+UjB7ch7WdlgLfhP7urTaPOWztqp1wMM/4J+qaninr/5mX+DYzU5gvBzxMqycHDrSmqimFejVxJ9F6SwJ0LWWD//vDWQWWt7bUKvwAfPwauW+RElNNMZzFcxxND3fM/gGarGZC2m7+2RgYnCLgFZxGY5+BNhG87UiiCMsKHnUSV7thaqO9vMvDrGEk1Z85zzJUSiawSStwT8+RmzpDGcouBvufQUDlkM3bFg3YdoT97DPQuRNCO1obxb1EmOoi60s8ChVzMTb+gynNeduk5dEuoMOxHQC163Tm40GSetMgUhBRIqPUxn7H2NlCHLQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(396003)(376002)(39850400004)(451199015)(38100700002)(6486002)(54906003)(478600001)(316002)(8936002)(2906002)(41300700001)(83380400001)(1076003)(2616005)(86362001)(6512007)(107886003)(6666004)(36756003)(52116002)(6506007)(66556008)(7416002)(186003)(8676002)(66476007)(44832011)(5660300002)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: okgjNGzrFci6tTsfkdq+BxsFxoFFJ8pecUPjrWdr8DIDEyiulzd/cgLPxa3Gws8s9mBwz8N6V8uazV/dXafoWgNIki5tFXa771nl5Bs+7rqiwp+kpQlTZvxHI9JY4venNQlfC5caiv5Ev60WdkE3MYTcuVu3Lvop6f2ks349Uo8+Jg0NulC230TyZO4vwDOl/pySjCRH+ZAJ2dPOF38/rnnzxpGlnq34jKXhl05WdGgaqRpqd9ZZtVyvpIKeJ3E8eaU7OezJVhrEDGTZcaAhvqyzbmcifu4L0l0Tg5Og1f/7ml2o/KIz9asYVYdkB6yRL6A7gSHHtpD34efVTt5qZ3r4OAsYMo5XNDqgVAg0HOUe4AVizEoH4y1F9su25qPIt4+uulpOgVWLlpGUiZ9FBZBrUBxoDwlKE1foAfOmu8MS6x+ZRawVp+tQdQZAyQRFZ6raKgKmwzC437e+Bh3bg7sz2cc+gi9He8PP6thEdC/xxnKpHFebZHhb9mYNcSGPtmV8vc3yKSpkonkUagAPajGcOUtXqGsTexU8yMDcQRNccoJ3mlEMu+tV6H2GuAQdz0NSiykYDgh7O7YwwbDOeL9cYWjvbkiQkM5EaY8l/glKFIrR1xJ0O3kEc7NH4Mme3yCnJ/w85wrRVH+8+XdqcUuuESoHmbQH0CGjUUZnfC990ZIrOKIMV+uCbjpux0cWmItIb7tOIgvJnhwgGc++u4HW5/CkeS9y9/ntgWY9JxzSjcGST1FcIe0hhvEosyb59jwKcvBauluJ3MP4LHZnrxUrfkoppIrw5wb83TS+KaO86q4tyjXBfdnEKJ/ktotQdHe9XOh9r6zfyR2hCY31rbiCpUwt8IbtuqrIHSYsU92hmuBtGruxOe6sI99TvXqP/d1iiL6qR921rqON0czUprMbDT/AP/uhfCUPDHnpEyvDUX2aEfK1u61/8JcCULFhEUvwlxFh/IU+IK/8uVvGz0YuFRwP5EpyxbGaiEnmhj5tNCovNi0g+UHPeUsmjlCRJUCWQDYiDmIHM6HjdPOEbPNrw1tMnPVY5YdOZR85IYAyb3IC+OCXLROJoT75Gr6MZvpeuICrVdQAcg9fqoIBWOF7i6+7+fpEkLAcn5tcqAaRNTvMFCGc02ZJx9FrJT/rq7ozdwIeX6Az5hCrSu2DwZ6MhOJ6x6WXxi5kMgP8b1MGXkQ3o6dxLeh8KURQQsFg1/xFgtyKB0q9F0x8eYRKP/CbGm5LjActcRtjeLZVv/QmK6jwoToCa+KVNmQXKJrO6Rg/U4RA5LRBK9BJff0fBIfXC9TmQYATP+r/TWiW/DJKtrIMkmlqa9FrZVFLBZ2awIiedoSiy0prI4YbxtrmQt6tifRKKJLrigyRboCo7Q+rMy4mQM0sYpvNGOlcPSxFr9Yvoz1ajpbsCgurVgcyv1PMOAD4NMoridF/KH/Wn5+mtM/RDaGe0hvf3Ibl20F4/Ns2wpQLR2l32DVNHnX6Pi0Hm7shW4KT43q0dtCQBtlYzcr4T5FMjCZKQxbQKLm1u5s+0bqI9yGqiOd36hLz+dWBAkZLpUJcMUbptzY6jzJZVaAfWcVQpEm/ijFSxdt3Gm7sFsVkVRpUiWYI7nTUfJgsrfscFr6fAmV3YWRPQp0k3VLqfPAtqvL5u5BzbFlkL5ShlnwqumP0aCHfXj5XAw== X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: a12d57df-ae31-4496-80f9-08dad2db9038 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 14:02:48.6420 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2MBENIbxzS3BmUz1SNf0XzDzbFpZpQg/6v6i1LSfEkgZvL1aybliDfzLCtfrzildvsou0P+UvHvibU6tNKyVFsF14doZ42RGrMsrl/hY8Gw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8695 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221130_060252_928462_50F34FC5 X-CRM114-Status: GOOD ( 13.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Commit 540b8f271e53 ("drm/rockchip: Embed drm_encoder into rockchip_decoder") provides the means to pass the endpoint ID to the VOP2 driver, which sets the interface MUX accordingly. However, this step has not yet been carried out for the RGB output block. Embed the drm_encoder structure into the rockchip_encoder structure and set the endpoint ID correctly. Signed-off-by: Michael Riesch --- drivers/gpu/drm/rockchip/rockchip_rgb.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_rgb.c b/drivers/gpu/drm/rockchip/rockchip_rgb.c index 75eb7cca3d82..16201a5cf1e8 100644 --- a/drivers/gpu/drm/rockchip/rockchip_rgb.c +++ b/drivers/gpu/drm/rockchip/rockchip_rgb.c @@ -18,17 +18,17 @@ #include #include +#include + #include "rockchip_drm_drv.h" #include "rockchip_drm_vop.h" #include "rockchip_rgb.h" -#define encoder_to_rgb(c) container_of(c, struct rockchip_rgb, encoder) - struct rockchip_rgb { struct device *dev; struct drm_device *drm_dev; struct drm_bridge *bridge; - struct drm_encoder encoder; + struct rockchip_encoder encoder; struct drm_connector connector; int output_mode; }; @@ -125,7 +125,7 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev, return ERR_PTR(ret); } - encoder = &rgb->encoder; + encoder = &rgb->encoder.encoder; encoder->possible_crtcs = drm_crtc_mask(crtc); ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_NONE); @@ -161,6 +161,8 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev, goto err_free_encoder; } + rgb->encoder.crtc_endpoint_id = ROCKCHIP_VOP2_EP_RGB0; + ret = drm_connector_attach_encoder(connector, encoder); if (ret < 0) { DRM_DEV_ERROR(drm_dev->dev, @@ -182,6 +184,6 @@ void rockchip_rgb_fini(struct rockchip_rgb *rgb) { drm_panel_bridge_remove(rgb->bridge); drm_connector_cleanup(&rgb->connector); - drm_encoder_cleanup(&rgb->encoder); + drm_encoder_cleanup(&rgb->encoder.encoder); } EXPORT_SYMBOL_GPL(rockchip_rgb_fini); From patchwork Wed Nov 30 14:02:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13059881 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5EBAFC4332F for ; Wed, 30 Nov 2022 14:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yXpw5XL50hgcgk022HHDvW0Fks6vDcV9g4vnY+MRxX0=; b=D5OSJ+90rwLGaL 2IOaCTuX5QfiLGIG+bzDfjdPV1J3aosGQiuNCt9ryx8ktMeXVnx55CregZwrsr1Po4pkLfKjyDekl V/fCk2XbehVBk/9Nzi64VV6CO8IdvAAL/pZ+jBEijChdC1qSxXkMugkBMiI+ib8hjp1H4rD7BtCHb Z9AH3mNnmaajs76MTPPEghBIonURSEhdx9MgZ3eVHZFSpZseeAacEULMEeCzhTwXOYlf3kvDuNFh2 RNU1nCi82lTpWJtMXfLQEJxOrNpsKGTNSK5vu7GnGxqyFdcSOVWtbl4Y5cf/VSz2DKh+DiEEJKd5R HlUUek7otfhclvFqY6GA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0NgC-00GgIt-9y; Wed, 30 Nov 2022 14:03:16 +0000 Received: from mail-vi1eur04on061c.outbound.protection.outlook.com ([2a01:111:f400:fe0e::61c] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0Nfs-00Gg2K-Jy; Wed, 30 Nov 2022 14:02:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YmwGQ2k6oJMS97IBgw6nMFb8NzPImZw2uHPcHoW1Z1cxK03vpB0g6HYeldN0az/aZz7R5QTB34+jsO3QtQwAM8pJOpn99yubIt5BKUvR90z3z5/NO63Sr6w8E2TvxpqXy85YvZl4IQQQO3JoPn4umIbhmPmk6BndWPyjRPGy2OKHlHmkPAeha7PUQb6aKHJSjoTXVUNj8Ta419k6u4n9J9+4LYZYzzgUMFy8YlhMC8LahWKre4tjH/fI4Q6p0uLuqc2+iMKQgpg8U5HPtEzkTmj7YURD6spm+d3A1pveQI/7SRDqt3A9xrpZc2lQSPpK9B7JXsZfuoP3DB6MRDcpbQ== 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=6QnMkoj/qIu2VnXnxmUTbYZrKmW6PqlhIrdh+PAaceU=; b=PEYX81wbAeUVy2k71K+gge9VVCqVq1a+viDUJ2m/Oq2xX9vW9viLdY5h1NYF2Bo+53/jjhvoYx8wa1hUgd+/sTYfIQGltrFXVcSRXw8iP59XhJpOvfbiubnhwMG6M4Xfgcz1I1PwBGGGzQFhQ0OQcHn7EKAlu51I9atwafuleT7HmADJ1ZZESUM52pk1pO2rjJWFm0PJck3jbX7pd7wdknEA1X9ncGxbOfNp1o05phXWfyjn12kDSplozFxO5/rVkSl0/gRRP2BGBoBFjamTdKjNcGq+2KmrjyAZgA4pcHXEYqfbPbuFvXCy83LiAh0wwseZnVij5XT+wMRK9Q/Pcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6QnMkoj/qIu2VnXnxmUTbYZrKmW6PqlhIrdh+PAaceU=; b=lQvFdH767oqVxqulN+Yse2JszfNGNJzl3ntI9tMirwTX//v+2T2vM41urIw+jw2doKzT87ArqFfiHpFNxjhJN6Iegy9CY1SLtoO+78TJV8xeu2ugRNk3Cj1bKV0DqXQhpFj06U/a7EylQo89w8jMEpVwjLQSRpsfAxKq+WC311w= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by AS2PR08MB8695.eurprd08.prod.outlook.com (2603:10a6:20b:55e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8; Wed, 30 Nov 2022 14:02:50 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637%2]) with mapi id 15.20.5880.008; Wed, 30 Nov 2022 14:02:50 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH 2/5] drm/rockchip: rgb: add video_port parameter to init function Date: Wed, 30 Nov 2022 15:02:14 +0100 Message-Id: <20221130140217.3196414-3-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221130140217.3196414-1-michael.riesch@wolfvision.net> References: <20221130140217.3196414-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0182.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::15) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|AS2PR08MB8695:EE_ X-MS-Office365-Filtering-Correlation-Id: 492e764c-5c54-4ba9-ba85-08dad2db911f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l0OT7zrdmhpkUf8YeMbupjJxM9LWBc0jG8+95gtWMuBBs/DEJgHeac4p8oEua896fSshZkPqOaxnM0FUMXLiaSMIYqJznxXWF5ebEgv+SIbw3HO3NRq3kpX+kQqb+LmDFgailNizTtWVHH5+OtqdfB135d4zAVAnqPWdQnpr0yiYA+wohovumtsvQY0RTiDzzq416dQqStKLF7D3db8JxzBiaqF0AKijma/Rz6ZC02EdRzvj1tav7BeK3ybWpCY+EpHWIQ0PHW6T91Khvu3xW3faz1fyMIyW7YxuNbt5Yz5W69ThVzT2kAh5HN2IWe/gB58C2n14MhYdCcgnR/Xl1ftteTdQ0rOzH3gtf5TLQssfsHplsLriRCNBOXusnWClK9CGgyqo+OCwkk2Yv9oxXJa0rR23SI4m6Oom/3Hx53a4NIm4EzPLefZANZZYaTEN3DIO08b0PeOOj9QaJF/eJV/SRYh+wxe52Xt4zhvLXB9oE9NP3riCqC8/aZJfe72lzarwC1TUqJKakDwvufU9hKUF56uRtco9hHCFOQWfWV1tqz0AlABKL8O3S5+TuHdEw1mGh/uO3jBzgGXiGq2WP+ABLEHmU01/i+08sm+pRppLbvm0dy6rWPiBb+7NTmA7VUtsQOaY6xMeRLOCxjym+w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(396003)(376002)(39850400004)(451199015)(38100700002)(6486002)(54906003)(478600001)(316002)(8936002)(2906002)(41300700001)(83380400001)(1076003)(2616005)(86362001)(6512007)(107886003)(6666004)(36756003)(52116002)(6506007)(66556008)(7416002)(186003)(8676002)(66476007)(44832011)(5660300002)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4tXNZjmbHP9igB7KKZukdjBuat2924PM9+7dH1zXXYHiBTzcFZ41xN2I9G4kTUvBxPPCnDEP67U8Z9JLMVh9u1xzDfrxqnxatdmqmM8zltUUiGDh1b/UgGS9zc1dneshZ8JhE5OcGc3iup1Qp5OlgRInsshjpHpe+1knCUeoW42T5Y46dCwykJvASSHbGCH9UWGgqdJbEtSIOC9ooUO+o0YB9Q/CholWeQQZpm8UnDibRONnqzvFF17M8J0tDNvesX0FWqyquSsLKDmaBBhMA3PZN1NOWYODf7k8Pr9xTCrwGBYaNJ7azCrjnlW1J79XuG7lJ5Eg+odkvv8DBXMNb+1UylfZeZ2BuqQzn9wtI+9jfD8oKhj5YO6Hv8+KxknA6TXcXNPQUmm1y1NbTG/Cwvahyiu5O99P6Of++mIYQvCdTV9ZQmmRk02WH01ujA6VKLhZOniJVUVZOosXGoTyn0bKGRB10FVTfzUdoLRzReXHc82w7hMHMO1kn7VI5affO8Mgakx1Vqwhb8ChsdH99kfZDloJ4UfuB2Idk5Orsmog+eu1txGyOqsmiOUK4vcBNxp0BTlahQt0tesR8FHoY1nVEL8SPJbuAsWmufsCTwkYBweibDM++id1mmxoukMW+WcOjbZ02wq/upd3sl3dgk5HWNH//FMs0PY7PzSN7UhxUmqQqeHY1uYCIOLBqEV2IapXyzJN8ewrKChy7+xkK+mJCF2WqO61phqERjl/3o3O6mVHf9T2Ew7jLeqfq4zaaX7hKSfnAOH4wC7RdDVhWhQUvwF4D/2Jorg3KKN4seEP2iCSDOlzOledLlAFjUjFCpFCSWaMECniAqnYvZe1tagbCTU55nSGDeWL2FJSWG9n5k+xa32vtgalwW9Hfdx82mAncZt9vowS8i7d4HyIs+TZwdStamzEf94dFmWUk7I5IY6AcQxiSiwHoESGbsNpHesH2ZPN5GrwmecTfypTwjNXjP9O7v0yE9XkHNiRaueaBjBQPzT/nqyGyLFZT1qvXWUDvm/4PRgEN6yarm/PPGnOV+YN/isHjAxYlXw+hUJcdE4ke/nbIlCMZWv2Llq+zmRfamLpicMdIHwqDmOCQ5OCsiq/C1B+IPbaTdIXzC6KbOn8RavoI31JDlSn7ofsNICzLnYW14MJCglSOiJUFTqoSuF1rKYvZz1oHdAH1kKtAE7EeX7Pzgveu8njpjZbSET4M35yUCf1+T/DfvBg8ZrcE4YyVvYpsEXzWu8qKgQOQJSeq9J1M1YF7LxHrgHxIfs2KLnycryDzbpoWkB744QyJ3TSNv85rJ73T3i15TOYfozYkXL4IyeGUeVd1TYiX9ZIFRCHvf3aYmJOtgRpiAc/tC09R+zTY814cUVnRK0VBhyGIjjq/jcoOC+tIg4UDcFQ6AuLo23A8AWp+yDzVpyHb9072S13G2gRtzjbLW8uuOFbDForIvTYI8u6h6uM5lanSuHbV0fOEiFZBZKtpT9kfU5NJEnnDEi1MqnWORvm6uyPLYcAo12ojhEqqjeXHf2yF5DQeKw8B4pnG0AGebyXdsIb9QP+yFskSQ9yS7+ZTGU/d81u2v3QwQfgDNjWW4gmTOlDpQEBgfd+ExFI5dCiHcI8pX3sjl9ukC+rphzSvrUnlbKoPPBFAj3/TVaVXDjlulosp0IugVs/Pnj4hA== X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 492e764c-5c54-4ba9-ba85-08dad2db911f X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 14:02:50.1417 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9N8R8MhXGv9atloN/xSEorCxaou5H/6KuvmnfUM0mSE1NX6U84/YQTIiE9oUgI/zwjv0B9ICj/8/lljv4niqRN89/137jw6YtI0rBBnBBhI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8695 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221130_060256_683047_A7ED8992 X-CRM114-Status: GOOD ( 12.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The VOP2 driver has more than one video port, hence the hard-coded port id will not work anymore. Add an extra parameter for the video port id to the rockchip_rgb_init function. Signed-off-by: Michael Riesch --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/rockchip/rockchip_rgb.c | 9 +++++---- drivers/gpu/drm/rockchip/rockchip_rgb.h | 6 ++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index c356de5dd220..f7335f9cac73 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -2221,7 +2221,7 @@ static int vop_bind(struct device *dev, struct device *master, void *data) goto err_disable_pm_runtime; if (vop->data->feature & VOP_FEATURE_INTERNAL_RGB) { - vop->rgb = rockchip_rgb_init(dev, &vop->crtc, vop->drm_dev); + vop->rgb = rockchip_rgb_init(dev, &vop->crtc, vop->drm_dev, 0); if (IS_ERR(vop->rgb)) { ret = PTR_ERR(vop->rgb); goto err_disable_pm_runtime; diff --git a/drivers/gpu/drm/rockchip/rockchip_rgb.c b/drivers/gpu/drm/rockchip/rockchip_rgb.c index 16201a5cf1e8..ed6ccd1db465 100644 --- a/drivers/gpu/drm/rockchip/rockchip_rgb.c +++ b/drivers/gpu/drm/rockchip/rockchip_rgb.c @@ -74,7 +74,8 @@ struct drm_encoder_helper_funcs rockchip_rgb_encoder_helper_funcs = { struct rockchip_rgb *rockchip_rgb_init(struct device *dev, struct drm_crtc *crtc, - struct drm_device *drm_dev) + struct drm_device *drm_dev, + int video_port) { struct rockchip_rgb *rgb; struct drm_encoder *encoder; @@ -92,7 +93,7 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev, rgb->dev = dev; rgb->drm_dev = drm_dev; - port = of_graph_get_port_by_id(dev->of_node, 0); + port = of_graph_get_port_by_id(dev->of_node, video_port); if (!port) return ERR_PTR(-EINVAL); @@ -105,8 +106,8 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev, continue; child_count++; - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, endpoint_id, - &panel, &bridge); + ret = drm_of_find_panel_or_bridge(dev->of_node, video_port, + endpoint_id, &panel, &bridge); if (!ret) { of_node_put(endpoint); break; diff --git a/drivers/gpu/drm/rockchip/rockchip_rgb.h b/drivers/gpu/drm/rockchip/rockchip_rgb.h index 27b9635124bc..1bd4e20e91eb 100644 --- a/drivers/gpu/drm/rockchip/rockchip_rgb.h +++ b/drivers/gpu/drm/rockchip/rockchip_rgb.h @@ -8,12 +8,14 @@ #ifdef CONFIG_ROCKCHIP_RGB struct rockchip_rgb *rockchip_rgb_init(struct device *dev, struct drm_crtc *crtc, - struct drm_device *drm_dev); + struct drm_device *drm_dev, + int video_port); void rockchip_rgb_fini(struct rockchip_rgb *rgb); #else static inline struct rockchip_rgb *rockchip_rgb_init(struct device *dev, struct drm_crtc *crtc, - struct drm_device *drm_dev) + struct drm_device *drm_dev, + int video_port) { return NULL; } From patchwork Wed Nov 30 14:02:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13059882 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 09F56C4332F for ; Wed, 30 Nov 2022 14:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wBDKoypdHRQl3TkIDWreCSqgS6xXJtoq/QOSDNCPS/E=; b=Bx6IesYK3Sq55e Xs8hpCq6cTNKtKPdt8o0pZIhcrSWpviHzA9kH5ARBPdFLXFE4VKMmzdyGbs2h/GyArnY6V/XoymRO RDBDGxiFdXkgLVXLLPGrGfv8iRTHMgaCn4MeukDLv52Od938Cmu3FfiSJrSZroRAC8WBNDnrIyuv8 5P00tgNy43HytMi+A/lNwdHmQlvhBgB1tkdAPJjTT09W5lq3ROT2a8uXo49hQ+IMVQNfE+fVegiWO OmK1vT0I+bc3F+AvZjmwO7GtdDz5MlVXlpzZuVz86ftYLww0fafvwPYhbY5kZaGLZfDIA8rTn4pnG +JFsSC7x5/CJVONNovxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0NgS-00GgQn-2v; Wed, 30 Nov 2022 14:03:32 +0000 Received: from mail-vi1eur04on061c.outbound.protection.outlook.com ([2a01:111:f400:fe0e::61c] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0Nfv-00Gg2K-KS; Wed, 30 Nov 2022 14:03:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WLCRmmtgIuNi8/oD/RbO7p53Nuyl4NhgSugPgmJlaOd+/qfToRFO64M1C1OkQzWjKb9y+CYBZN9ti0TauYaCTxk9iVEN1x1NmPyzL4OYRepks+sxWrQMCkj9FuPWI8eWFcMjxsD0F7vSvDhOXcuyonahzj1UlDIvMrLZKBaC5KcDM6b02yuc/a9GyBF81I8Au/AVrxKuiZTWb8vq7AJkAnpjMIo/HO4jnRTxK/EPwoXP+BKAV1W9+e+0ZgUrGnKM4FNqncMopk2c8UyvD4XiwW3uqRFrVyWkU0bCzlMfg1sOWIErpveAAUq5mRPeMlrwX2uKT6XfzPMzYUMZURwnYw== 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=NjpRKMepunFhsKnEHlMmrI3T8Oy+HxsC0vITn12Pscw=; b=HwqzCz19+UwTAikdcV9sQkD5ZA0KolejGH+BaI9OXWCHYcZvLNWS2UUjM3wDZ4vXJvJVBVpXkFpZC0J9wFRq12TVqz8fLqQIDqEuuQ/BFNLa+DU+BM+9XMq7sKpG4KYqVUlZfou95Jza46g8oLpWfiQslxIetS4QYELyJtOVtMPjFd3EAmyHNNIXk40Hdq6TDY7R8s88ZIF6gTUdwbxKimwolGs4Zg4ZUJg7e22OCGrxhMFgwzjKCfwvCtlUqbf+fLs9bez9EXjYYr/sKNfgelW0b97e+SRZpXrenGf46oi5rVL6EzUHChGfy3ZFbTzDpXG/L1jBeQki9SeUUkALXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NjpRKMepunFhsKnEHlMmrI3T8Oy+HxsC0vITn12Pscw=; b=2omJr/RtHafj49vlB0L5kIubL8UBhahu1BTdyHaRLyaLmpHWyFsJr61WWYmV6kc2i47lLIdSabDYxFu4or5sXBQWFde5MeIM8eMoRUvgIqtgv8jnsbUd1g46RMqjXotZxyqw+SGrDgM6Z72e/z8AflMWHWRmuAMdW/i1WwabhMs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by AS2PR08MB8695.eurprd08.prod.outlook.com (2603:10a6:20b:55e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8; Wed, 30 Nov 2022 14:02:52 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637%2]) with mapi id 15.20.5880.008; Wed, 30 Nov 2022 14:02:52 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH 3/5] drm/rockchip: vop2: use symmetric function pair vop2_{create,destroy}_crtcs Date: Wed, 30 Nov 2022 15:02:15 +0100 Message-Id: <20221130140217.3196414-4-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221130140217.3196414-1-michael.riesch@wolfvision.net> References: <20221130140217.3196414-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0182.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::15) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|AS2PR08MB8695:EE_ X-MS-Office365-Filtering-Correlation-Id: 54c026ac-92c5-4319-1e63-08dad2db9245 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hPVIVnWqgpCM+4XaMP1ndKVN0GlPwxKy4oSJyfmvCh/dXjrEdZUlXrpcPRrAOxheifggTGbbiDt7m+6kuclq9cc1XSjPxAtUb7qClKCwNCqvILqxLZRpx9E/fA8W+xTHnQEVDAlma6PpoMWeWpbTnjBePP+q8rL1ny7HPu6QhF8CT1ImMJoz1Dqm+9W7kKBN9yLYsHu+CamBQCzezVOccZ34WyCZHLipNM2OoTo+Psf5/5pj6vg4q5aKC+r20EzqU99TyqeNvM+zHiRodoTKYcuhIi1XgA8KVzh1xB+vHRf+mM/p3HmVYOy9s7vrT0LQWJnFC4gtQEvuZB5ecY/rZzmJuzedbRpue4MNS9e6Bm7Ahcc0C2QxCPG7o4vbYfmX4S2F6DiSpaoiHJw77OLj1f6+E7OJYFA9bGxy4gRC7H2YZowVn7alMuq+EOQeDdBUHhV1PBmKIySQaQu9DDvPMOep7iNjJ6Bsq30mgfOVE5iPYrdGrK5Z0yeGifn2NTlhA/QkxSyezwZtudsZnY2GFCjRJ9Jcyoc/mxnbKmzH+BVdKkp5HORCs7tpH69xgajtn/mVSOQmEd0h0fjUHIG0PvLnWOBb/n8Sl5O27xzPq9T/mbYWLolAk0DYmO5/85ASENEoO7mafLkQhc5fTTJONA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(396003)(376002)(39850400004)(451199015)(38100700002)(6486002)(54906003)(478600001)(316002)(8936002)(2906002)(41300700001)(83380400001)(1076003)(2616005)(86362001)(6512007)(107886003)(6666004)(36756003)(52116002)(6506007)(66556008)(7416002)(186003)(8676002)(66476007)(44832011)(5660300002)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nV1626GhlNG1HlEiQG7GkvXP2+1rbteLOo8mE8YoN7eAWEs5J2bN6Cwpaprtu+YTeiw//TcfRGHTfIF4ZadIAyhFwGgxKNQuke88aYoU4WGBNUKd5bJxy5VsHgzoU6CBu2KV7SkKmENwAGcLTTNDRL1/VjvOdCcuOJIXB7FoNKjKUOq/bMZbzNwV8BCktd98mN2TUtYo3UBF8yVLdNrffYB1E14+R2x6QCjQUqpESG22iHjSyr6Aw20IgiETyF/uqAm5Ui6EQQ3c9+aqALQsX2ZBAXkqmIp5rZHhNxnY0343YJ69e5IaKiY3KhuY6hDX0qt3hCjKkzd1UZanZ97DuPYCtUV71UyhWqFcPwU8QSz+1xs3aMdJH3uLO/qCcWXFHMfAI52wtGuzJlw/FppZBYflSdo3/L9PAKV5poiq2uapVaSdNQ49n/hSPAo9qulPPFHhrbvs9lsa3KM3xlGiuUPTzcjpeeJP914hEbBSBfqofvJCgy/n972QbS2Ve2yfZpZAv6t0nu7yyW9G325cTcffNIvDMEBC5Pq7QoP+wg3agzBl1kgiVuOPYl5legga1JLhC1MvGDkj2q2B8vt871Zyv8t9a06WHeUrYYmqKQH9yehGoUPN90NoOJgx0wTrS3NGpM1OqBefV/l2QHbsYATCMxmO5wimb5+Zg8SueXBUmUOY6lPNt4y9/NBOkU4rbwQh1rNQ+fstlHpte3lsiRcj4mff+m7M0zYRW4H3ZvxBhpFl/Zsw0QIANYCB5SY+bRlD+fbB+UyQPGH5HSGS7y+9fvHCmVMsIxpom9Fqvjmo/EQoU/BJNEXFndzin+9Ba9KRQTl+H5cRvZtGd153aqr1zXWcjJyJdhwkpfrrxLOV82gYd9LMMNN6SBA5aTqKO5T7OHckIny9/F2VZ3Io3NIFZ1mkn8e102cw063n1HugzU9TP1BlN/WceUSe21qcLsQF+bPprUGudqj/AivEQHmj15sOOi7IikrQ1IXJQZV4++suWA2hHFkXXPLy+eyaNNNjcZ1Kcpxinjs1L4uDolVzvi6CPBFSLpYaY+0xM5+gvu1VQmmzqBYcAp+i44Kzn1bRIdeVuJb/RPxxakK2SDRhi12/9ynoOzvL7kfoluydywmZznzwAvraXdGOIF1XGQ/f/2C/AdvAzecRIupgA2+yJoBQfyoaFW0Sby+67cH0Ueaf8ZYdEN4CdohyqWOlMO0DjBbOUxJT+lAMA3DdFhNEGNRqF/3jCBasHWya0sM64LUIKxRpKE2xtdsyXAol1WSOmGVp+r6CJj0YX6xaTBD+w0QTOwSj8OiGCbXZMam0tbg/fG3wc4t/gJZJXGay7AbvBk7ha4BK9ZoFoKAQ+hnw9w/N7ieTlVjjEAf5mPyGgFiXaUoZ1LKOH8PXruz8c5CtNRI5Z57Fi3yLiLANy3l06C520H0BtU67QJPcqnA2ktLon65dd5UxCnFuJfSeTqntEfK2Oqlf/G28PLTdFq2RLBhXGcFDC/p0izLCN+Hf8O5dXBzOM99APsLYbi3bqse1FFLSPl4KhXqniApkAkrKQPyNHCv9wAj/9tL/mkanQ7SX4cwP2KrCEpqjpkBs/OOBzv25yZJt642OtOASM/bzAJNQAD6NLzRzgvX8+sfHTFIoD33NLdVsKjIE4rWhAbOxO+EN/iYr5T2hy+rrxg== X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 54c026ac-92c5-4319-1e63-08dad2db9245 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 14:02:52.0801 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RY+Qr2Cw3+O5Lc5GRNOb+4pR4JN4tC4YHntdidSw21JTHK165xdIxVSAlDIWubH4gZ4o45k+mEJ5AEgD0NB/X0qjgm/ViOd7kH3l2GCsAcs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8695 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221130_060259_708859_44CD0D89 X-CRM114-Status: GOOD ( 14.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Let the function name vop2_create_crtcs reflect that the function creates multiple CRTCS. Also, use a symmetric function pair to create and destroy the CRTCs and the corresponding planes. Signed-off-by: Michael Riesch --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 31 ++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 105a548d0abe..94fddbf70ff6 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -2246,7 +2246,7 @@ static struct vop2_video_port *find_vp_without_primary(struct vop2 *vop2) #define NR_LAYERS 6 -static int vop2_create_crtc(struct vop2 *vop2) +static int vop2_create_crtcs(struct vop2 *vop2) { const struct vop2_data *vop2_data = vop2->data; struct drm_device *drm = vop2->drm; @@ -2371,15 +2371,25 @@ static int vop2_create_crtc(struct vop2 *vop2) return 0; } -static void vop2_destroy_crtc(struct drm_crtc *crtc) +static void vop2_destroy_crtcs(struct vop2 *vop2) { - of_node_put(crtc->port); + struct drm_device *drm = vop2->drm; + struct list_head *crtc_list = &drm->mode_config.crtc_list; + struct list_head *plane_list = &drm->mode_config.plane_list; + struct drm_crtc *crtc, *tmpc; + struct drm_plane *plane, *tmpp; + + list_for_each_entry_safe(plane, tmpp, plane_list, head) + drm_plane_cleanup(plane); /* * Destroy CRTC after vop2_plane_destroy() since vop2_disable_plane() * references the CRTC. */ - drm_crtc_cleanup(crtc); + list_for_each_entry_safe(crtc, tmpc, crtc_list, head) { + of_node_put(crtc->port); + drm_crtc_cleanup(crtc); + } } static struct reg_field vop2_cluster_regs[VOP2_WIN_MAX_REG] = { @@ -2683,7 +2693,7 @@ static int vop2_bind(struct device *dev, struct device *master, void *data) if (ret) return ret; - ret = vop2_create_crtc(vop2); + ret = vop2_create_crtcs(vop2); if (ret) return ret; @@ -2697,19 +2707,10 @@ static int vop2_bind(struct device *dev, struct device *master, void *data) static void vop2_unbind(struct device *dev, struct device *master, void *data) { struct vop2 *vop2 = dev_get_drvdata(dev); - struct drm_device *drm = vop2->drm; - struct list_head *plane_list = &drm->mode_config.plane_list; - struct list_head *crtc_list = &drm->mode_config.crtc_list; - struct drm_crtc *crtc, *tmpc; - struct drm_plane *plane, *tmpp; pm_runtime_disable(dev); - list_for_each_entry_safe(plane, tmpp, plane_list, head) - drm_plane_cleanup(plane); - - list_for_each_entry_safe(crtc, tmpc, crtc_list, head) - vop2_destroy_crtc(crtc); + vop2_destroy_crtcs(vop2); } const struct component_ops vop2_component_ops = { From patchwork Wed Nov 30 14:02:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13059883 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 97FAEC352A1 for ; Wed, 30 Nov 2022 14:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PVnFtWw2TUUOjzBO74DwNWOs0arA1pHpRjG2p2mbu/w=; b=jgnIp9c48q32Nd Fhf+knLrYOz0zzoiS6bsc7rq0MEyGdy5ahxKMQm3ABrFMvawU3C2740AYTKEC2YAdyqHJuRZjLiIQ lSYDZRIzcjLTwGKdnugZ8y4dD7Jjg3TDOvM3fHKKs5qWsOyPUfgCIiQ5z0H6N4/heYuTjC4PK7Lot +iNRUsv/lLRtowQ6srwIdjWNwVLzlL2/isBUMIB4Po+ym0OYd/s51J1O1FCgCLIVtbsEDuIBpcFmv E5ZwVdLqJyDmt2IW5w7k1A+Z7AmrKy2sL82dcGGEqCmUkhuW2jMWZvvqSPUYYK40q7A4SQDV0j8+Y uHrBTwwU0xKq5pwuhjmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0Ngz-00Ggiu-6R; Wed, 30 Nov 2022 14:04:05 +0000 Received: from mail-vi1eur04on061c.outbound.protection.outlook.com ([2a01:111:f400:fe0e::61c] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0Nfx-00Gg2K-F5; Wed, 30 Nov 2022 14:03:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E1+4tiiGkBI4RPpaWUUmEgGwOEOr+zTYEmkZmVO79xEM5cIXwG9Z3W+xh8MH83T5g3pm4xbCnK65ydFbDNBPjGVGiBxPcWFq8o8OSO1oAXZ3KXPl2vERjLapjydwBs7/AAoY7ar1r93frWGSxmDRE1/KJA5VmWInToGZLRoi4lpE1wBGKuf4PsS4l7O7kHVUgNIFF3C1RRlZ+Fumxz1wkRhgrC/g0zZ4V54wZD7+CfuunL3P3C2AWXu4NBIFGcVohCZH7aCeOCVuaXtcE5M15gKCcOVJX3dkTmSWCC3xxN2UpQY1P6b1K9YbF5qDNyUuKfiVln852iQKZYK7ySKTvw== 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=6cDyi0OTsNQOIgW/SJKknwhnPQ0UTKsEknXjOztyylU=; b=h0lMtUfe8OQDO5ahYN0kk0Bhq58hggC7Hf7AdKLQtbNbdlAuN0rQdD8DZcT1Vhc7kFonVteRuNp38Ouf1MFV97pAU0Zx5F4N7fMVRQgFTTM4pQhw2ZrdeY1xnbXSL3Exv4/LHHHwFRIlC6SYkGrgKxDLlxk9N9cv7DkFu1zBtr1tl3AhF0KXUJJ3TFVL7aEzl5a6Dg86g6442GE7SO+7MAaxZ0txwClzBhTNJ7pB6WKzYQOy8xTbUPNk3QqWa6Ghpq4qsWufgQGGr30vXb01nR+/BxkxS6Nmcl/jMZu5tGk/U/gjPHW/x0BNd0CDK5T3WEoP75gBdcLN5fmf65M4qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6cDyi0OTsNQOIgW/SJKknwhnPQ0UTKsEknXjOztyylU=; b=QE3ZFpMyCWSiIApjr2D198mPOYpAb9j0xeQCG+g4HldUUyMInso1Rsr9HRdOsa/q51BVRaB4TvP3G1iYxqsEnrUWa4hgAOzEiR5eVdQGFZXBFhcHYVYtxUT5feEBX5iRKjJMC8GB28NR3GIwzMVFZk457LKGgvTHDzw4B3Nv9b4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by AS2PR08MB8695.eurprd08.prod.outlook.com (2603:10a6:20b:55e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8; Wed, 30 Nov 2022 14:02:54 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637%2]) with mapi id 15.20.5880.008; Wed, 30 Nov 2022 14:02:54 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH 4/5] drm/rockchip: vop2: add support for the rgb output block Date: Wed, 30 Nov 2022 15:02:16 +0100 Message-Id: <20221130140217.3196414-5-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221130140217.3196414-1-michael.riesch@wolfvision.net> References: <20221130140217.3196414-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0182.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::15) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|AS2PR08MB8695:EE_ X-MS-Office365-Filtering-Correlation-Id: 717d083a-cace-4fab-15ba-08dad2db9317 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6SC+QDAgmDW+xl0jl0dF9L18C1Y41kwANkHMd7Fdd/i8FvkztEEmTRp8ATZiDy+yOBSmdLq4Qyu6vmqFXWBtBs1WAdxtQzOGSCQx/K2Zd3CWlTZd7OP2zOVBnyDujKx06qMw00rIOMDvanf9zeGKKm7XHREEtnRDS1XORak0wYpsBiYqup1EqqL/rjZu/Hu0VlPxpJLsq6tM0Ud/2rG6/Mmsc3Zf54i+tpaUeg4SyzdE47K2GUKkw5aSezpo8vrT7t2gEckZwa1570prZR6HI4ha5rQOPijM7yQcLS4v8EjBDBMAmlRj5YlxuBso0LSKypupvLLNJ+b3/sleq1n1riWvh1mHjQUJrqOPLR2GeoIoMbvnk/SnyIkqWjNhFqKp6xL7vOnMqkfeUFz8Tu0yThcsgaeYpK3n0nyg/J/+KMzrWe05uS2qQMiRREfeOSbgwrf2QIStASJGAuNbsqg+UBOP+8dC55lkWxJroQtE1xY2W5TUynuMBFejU+t3yMYmrKBsU4fUbVwB4ZwE9Qo+1Svu6cYb3epG8NmhpPmTHtNbY9RAuOf5lpaUhP64qoyzZ2ekQX06TwYDEaIKJb6sYfjQL+QNwFb/5CRyZ79jYSLgQ4HEJV2KUTQ1VZj+bVbn X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(396003)(376002)(39850400004)(451199015)(38100700002)(6486002)(54906003)(478600001)(316002)(8936002)(2906002)(41300700001)(83380400001)(1076003)(2616005)(86362001)(6512007)(107886003)(6666004)(36756003)(52116002)(6506007)(66556008)(7416002)(186003)(8676002)(66476007)(44832011)(5660300002)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3uf6Qzhbk6TPykBonLg4JnUHp88CwgX4jFbaZjn5pRFSZB+BU4y3aCaTfqSx2YC6BtG6Jm2U7ZWMMzp8InEc0/pNxv19Df4jF1J7jHwpmJ6Ze1k9vbAZRBmYSF6RBt5smDHxayRp5/kFoz9bQEHUv6kQU2G1ojiAKMpzJOO4AyqhToEquk7TGzMOUPwr4tvpOEDkWYcTC3plOulBnA62e5ymhWOAMZ1S7FbTRDrRyQ6hGiozhM4wQDC+rCCqdN6RpZOfxZaxun//pWgmWoY52hYBMytIvXCewkpYSDrxs6rVlFC3jbu2yLcLBouyR3ZErhAjPqSd43CU51J77NC1KYgWLBzFL9MLjYcjhiRNGEJfkxuPdkeaR+Ty7Jk8Yt30mYuHwRDdfyhl7Sr62LKCOE+/tMkfYd2OtO/RLqG1zu8UPduhLkEA819c/5YuOBA1f0ga2DdijQLfj300g7/tnUOU9bihwE1/R+jaHJf1il3iEjSa0doSS712ma/tXDDe6OdxKnLepOfcNkhYPYzgOrtZxFhQc0E+MjbmIFLXm7tB1sszBFCMU9lJy/xHUIydxbe8abRXC1CJbfpZQIm8rpsZ/aI8tdYbknSE1tmSXxqnpAaPCkTrCQ+vcZFqJqWME1BHwu/oH49kPGO7ez1J8wxYfPALpkvqDcyeDh3JWMNJQurpQc6/D4AuGalZMY8ZwvhNKCDdSyPTP1zirX35YiHLbyrAEPFhq2NmSW5SoVu6PCfwXkScCXiuke0IuSTfZCwzafq4Cf/74ir6+HZqzUYhSIvOKBuXYcp8RYl73z6nq3aCBfjfvNyqT6JsaSf1AJAw1WqnaktiCkUYwedsomzwaBoXIlzuAkxVEmV6IX0oz0DZTKdqoK0MwxRuu+pskbyYN1g1wXnZNu2wD0ypc0DlYf7aYxY4+34ac0VdRY5xULpSDG9Ci1xH2IbEg290XQtjdvcD19GQG7lozlK7jrunLfg7WBNAZRj1jurPN0sdoRgolZz2cCsokE73THjtLrDuwAtC6tRgvP5C7z4JTUDwSYZY0mBctngrczCmNhJFVsMecTv/tVZSB6iu9wglyBkUGa0YuH2qz8e/T2MUlira6O5TRYvE6pLCPjw+Zkukvt9YMg4HnkPpI4/eS1kKFii/nqL23gaxOXuCacpIqexE5TWcWV9kpwSOYwM0wXbZlxFe/9/9m32KHgnCpn7WjyIMSTHjUuq2DTQlu0VSoPhAL9QLg3Id34LPvkuYllufODqsHZ+zfV7bgHEX/m0d2Q75wMFwpIygJ20YADl4hoHxPa42nqopxTg0QpLmajsHA73s9u1mQg+k+NtS67tDqplqyWq6zHqOT9tuZu4Z2UlLh8dN4bPtsXLLjNRrdvvUQwFVYZGheHBRYOylN2flicg6yKGAR+pp8BmmZu56EJFirgmG0KWwOZ3X7XHPxX1sB7H7EkdQHr4CisS+5gvLRAYtXTu0E/NKX26A8pNLcqfBASkV3VuKI/JcxGQJr4MP+XsIhmSRU17DTzv08+wNErPenNuHewk7wO51qQWbBWDGRjUevxZPo7fz01N5HJmVu1IgEeZlMIADHiBJ4R529W454SEexs6sGbswpLUyheMP52XU9K6wu98/SpeF7vvuf0UL2GRNcvsyFfAEFl4FI1Mtd7FKI2Yrq2PCfsg/aw== X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 717d083a-cace-4fab-15ba-08dad2db9317 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 14:02:53.4717 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4dJhy4tidPGgn77tE9SAlfrzdooUayq/J+JR8BE/TkGY4rFoR9BH4WjHLGk2Yj2u/4YT86+6DRSCA6+sCNGFOxZ27soK54Unwd3baxUAMG0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8695 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221130_060301_533235_F534AE29 X-CRM114-Status: GOOD ( 16.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Rockchip VOP2 features an internal RGB output block, which can be attached to the video port 2 of the VOP2. Add support for this output block. Signed-off-by: Michael Riesch --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 94fddbf70ff6..16041c79d228 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -39,6 +39,7 @@ #include "rockchip_drm_gem.h" #include "rockchip_drm_fb.h" #include "rockchip_drm_vop2.h" +#include "rockchip_rgb.h" /* * VOP2 architecture @@ -212,6 +213,9 @@ struct vop2 { struct clk *hclk; struct clk *aclk; + /* optional internal rgb encoder */ + struct rockchip_rgb *rgb; + /* must be put at the end of the struct */ struct vop2_win win[]; }; @@ -2697,11 +2701,25 @@ static int vop2_bind(struct device *dev, struct device *master, void *data) if (ret) return ret; + vop2->rgb = rockchip_rgb_init(dev, &vop2->vps[2].crtc, vop2->drm, 2); + if (IS_ERR(vop2->rgb)) { + if (PTR_ERR(vop2->rgb) == -EPROBE_DEFER) { + ret = PTR_ERR(vop2->rgb); + goto err_crtcs; + } + vop2->rgb = NULL; + } + rockchip_drm_dma_init_device(vop2->drm, vop2->dev); pm_runtime_enable(&pdev->dev); return 0; + +err_crtcs: + vop2_destroy_crtcs(vop2); + + return ret; } static void vop2_unbind(struct device *dev, struct device *master, void *data) @@ -2710,6 +2728,9 @@ static void vop2_unbind(struct device *dev, struct device *master, void *data) pm_runtime_disable(dev); + if (vop2->rgb) + rockchip_rgb_fini(vop2->rgb); + vop2_destroy_crtcs(vop2); } From patchwork Wed Nov 30 14:02:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13059884 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D8417C433FE for ; Wed, 30 Nov 2022 14:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v/qIDt/+hd8pdHJuiXmw5kWwMVta/CIj6utFyX1yH+s=; b=h92hQz3dStr/nZ LXUFzyRUsfa+tK1ttYhjmyxbrwx0pHqwf5xSI9hTnrLXNawVRon/BsT9iXvJfWrYtbIvXoYvAiX4U DpBH9359pjIntYlgFOUABycBOyvAiQypwrJ+BCn3NWqkITfb9Hq0Nh0ONRzz2ZqXlQSPwjtY/OU7N d2TsANk5rA2c4qGX2qRPrYS+cx0ftzPXJrSzlPQawurR1/H08qTIy0M54jbniB+CsdHbSUCgR2al8 BnhzOcDVCSTZd+Q2bgL2hUCxP2cmPW/GQDqNNfLNOcFOqXIYVMcIylRZ/OaylPsVdgeIYoRncvMDJ sO+fZdZonNiMIlFpQLyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0NhF-00Ggqi-Sw; Wed, 30 Nov 2022 14:04:22 +0000 Received: from mail-vi1eur04on0622.outbound.protection.outlook.com ([2a01:111:f400:fe0e::622] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0Ng2-00GgCA-Hx; Wed, 30 Nov 2022 14:03:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AdNEkTC1szKEPvz+N/wexEr3Cxw9gMvu/hndOjI91FLuCOnm8D/XugIQtllJi7b0lUhsypPEodtBkWlygwNZZrpXNFPB20+D8bnnlPQn1M4YszteMPJg0m1JDkd+CtHEQBfFD4C2/b4KLxaJCyhiFQv/xWkuJ8dAl1ralTeo1/6KPgi9VXw1XkJhtBLpTdkzIbl7SOLpl/VZHr2DPg9F0Vx582kIrCSXg3VZRSosaAp+cILN49wmWTeGxxQJyNx2FF8xRSwqdY/HimvZ9K7Y7NHkL8d0r0e3AyNxOp2S5TyvWGnjo2FVVhGbqGgzNrM3svA+n6mPmi7sGGyk6/cfRA== 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=5JWOS8lUvJPNqMcIJc8qzTn3TapYiYs8bxcc+17j4mQ=; b=kg30KorPmthHjI3f8c6ky/T60aZxz747j9Uhu910CHjvnB7ENKhiFw1ROwpkf7TfYmvtTNMeaxCT4Hiv6/HkOdoqVwLHyAAE7IhRqkVuEywdaiCXLQj/rjaWJH8kfQVqmxuiYGlCtCUH1pjYK5Z8ioaHJ8Pmrss+/qSdJRjBNWrOY4qyJYNmmW8mAfpCxiBB5z2Cpc9ebrFC3P42nDkRF160yyyz8b19pvLNJqqhvQGUkVkrEjccLYuG54hkGG1yjktgwCkRQlqFa7hhIQ94S56ulmTj/hZaYwWvZBLby6DraU+kGYuOqIL2KoyJJ6HPgBoOu8f8tbx+a30vIvQFyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5JWOS8lUvJPNqMcIJc8qzTn3TapYiYs8bxcc+17j4mQ=; b=Hxq7lLfV/lMq8Ga655HdPXAHxUjJanG31bPdV9YQTRP+AQB22iRo5tBvB3gGqBPmnoGchAx+Z65KK+y/nektQ/pEBXxI3Zhwk1aRA+nzmC963WuAHUgNATVK+vLw5+cFc7ZhFq8rFY5Gkf5YNAFxiboEDbzShHEEPkWxB4H4ts0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by AS2PR08MB8695.eurprd08.prod.outlook.com (2603:10a6:20b:55e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8; Wed, 30 Nov 2022 14:02:55 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::3643:6226:28c:e637%2]) with mapi id 15.20.5880.008; Wed, 30 Nov 2022 14:02:55 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch Subject: [PATCH 5/5] arm64: dts: rockchip: add pinctrls for 16-bit/18-bit rgb interface to rk356x Date: Wed, 30 Nov 2022 15:02:17 +0100 Message-Id: <20221130140217.3196414-6-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221130140217.3196414-1-michael.riesch@wolfvision.net> References: <20221130140217.3196414-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0182.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::15) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|AS2PR08MB8695:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e981ed7-212a-435d-151d-08dad2db9403 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RynORZ740K/YT8szrCdE9tlLiEuLsbO+Lb7RumomSmqkN406YrMoaMLHy5RVbVkZWUKU8sMy4Zx8h9g+I4cORDaebbuVsiO9DELYx0QnjdidKYL2Kwqr+fPVi2r8S+5NyCS/Qzpc7DXNwCQANi5RLACYV7txqwfXeYXoa9ThyH7+ePSvsefg1I8Wyky67+Ju135ooufthewMzrwrwQ1a9gHYE0vkhuz0SmxOLCONYIMLTl27LlFWQ7eZ/pxfqqnPKS/62bgNiQ6t9HDDuENQAJwio1WPqNnri6cptr9vtboMLLh59D02rxzv7bjhqNXTGey1/FmXbnoUtwsP2eiecF8604zbkYVVrXyL4uXtszr6+gnMPnI5fIOOQN1Cc/r/6Y3muoFqxmp2WQA5NwEuMdjh925sogY/iHgrA98xjBuTak+PePJLxpYmseNfBhkbjgjSVvVm3vMaRJg71Qctr6KzpEYhBWb2BLyHKsnTBTdVBeuYp9Qb42XIzW3U34Hl5bQsezkZs9NrmYiuDiKzRJ7/A0SFEvTnRmHKb64HSwrgnp3jYZJyx4WHgygPSJe8mbm/rkLERb03TNp15JlTbxIISgx0j2AwMF69abo6aP3XAhdYRtu3l/6BO/MnDYD55WTiXeJ7uoz8NG69Bob3/tqqxfhAxg55WKx86Wuq2rM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(396003)(376002)(39850400004)(451199015)(38100700002)(6486002)(966005)(54906003)(478600001)(316002)(8936002)(2906002)(41300700001)(83380400001)(1076003)(2616005)(86362001)(6512007)(107886003)(6666004)(36756003)(52116002)(6506007)(66556008)(7416002)(186003)(8676002)(66476007)(44832011)(5660300002)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6Ye/RyJ/3TK3ZIIY2WqYP73ioxai3tlaU/+2VGrlqzNxiTfMtMBKBs/9poM/cnpiOQjPmrJnHEgCeAOhTiLzjTQcohBGGwaMU7j/JHE1XpzXoDIvXjT6B8qpzROW5SlvQWyY5hxIJ+UWpc/ziaT10SBjd6q7SlGS1NqQlkbxvOSj2H9qLIwAHU4tWA5hy3AEyavrn84ye0moZGcXYZnBzUdsoteLp7VcTy3TBMSTFOCqQhF0gThkVqMBW+hIdh5SZEdgUDQE1TPb0ssXcXTN9dbWxmMLsGcgiEafpvqaOhx/K3CGIsqublFheecqtiDvcUWlp5kO+iOqaB3Trw+eyIBOIEKIVvV8I1XBqBpCAV+71+WJj3dhYBzqSdwnvwt4xaUKmXwql4eNCI2FmHHBplMRs6KVklYx92ZFT6vQDjtyp7h7N4l67Zlh4G4v2VKGRRCyRw2PJRoRYfUkpfnUlR1dQspd5zFYLCHLdQTlc6wVSL8BvsBu6pftztPQkUupiHd5/oNaNQTGbPeoWVZbYSsiunYd6xl4nanVAAwdQwF1VubvrykMrselLzfq5W1Oce4oiAmvw6l+w4XNWZzyO7yVrN/zeJ6Y9pEvvBU/1A2kMYL8nlkMcUcr+nosKj8IWtPvzIzeB95ulFnWaBL4WJ98ExE0Ni7drCk9MhArdNmy+CX3qtIujHmYu103vDNrHgwffGuD8jzD71wwf2M0oFr5bdps8t5h8VR7pmhR+7TQPTKoCrv8Q0NhuXRVRgOKQIGw6tMA/tAhAouzQMToDVvYmBpoRpgCt5hWW8ymLlpfSpbJoTHgEz0Lk81k65Z0cAYShVWNFBkAMkFQBUcjgqL2Bc3v1n5hg+eqKXLVx4LVOBgJpfU9ylxcQOzFIvjLyICnyMig/UahHU0POpViyh3vceHSavB0kN3KVA2OZR9xwrwBvi7C+ENU+Bz1wizuwmBbSRk0xY6NQkk0H+n1OdZ0qJDeSW42AjJ5I43Goe5yVCzjitX1ec3Nr3XVGlkXYZKfWpG3nDcG+HQUgqpFLGR3zkjvagjNj8eNyrmXS9CQ0BT8nXglx2NEiApjfpXdexq8nUbYWwmB4Mvf6fCJcZk+jWbEAUXwxKjMJ+j02qHGe00pQB7MWFuQBONr/LRIG6R5B34HbmhvxLneuvAckn7ArwrWR1NswfUCEXTfSSccK6KF/MA7N7TE6HupsOqfMjwKJkx8ZOtHbrNwgCpt/cyOM+AYPxevqbtESSvTjiBRmJue+MrQX5N45ERtt4G9FVsQuOYDY+wP3/sV8/UkZH4CYxfOBMK4hx8M6BcCo44McyJnAp6XwuVnGasIW/UwsoYouXFlDV2RG4nGO4HCTAJJL2it4HEaPMC0US7yOZ3riuKB8pVjh9PxQOuEgqxZsJn/3caEXWbcdtqsU75HjaqotepsTkA2MlIQl2AnjawZvVtXKCCT22/VPKv/sXmFqpCE65VA1+uR09vMJVvcwf4+afH/qtxa9N+X9SmXSCkW5nZnHD1+Zj46EAHDmdHYYA28q3xF6fmQXjTQ5YRMuUjgrdi9gmW+iA99/MhqMllZuUzQuPxPNjNHj+m6MUPv7ecXY9gQFLluXb2ijZRIrwLVBOneNite49oY3MuFXmtYxCtirX1XlxahtV86X+HC+T000wibreGWPNIniQrNwg== X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 2e981ed7-212a-435d-151d-08dad2db9403 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 14:02:55.0028 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +NfkpIVCCzCHDsdEUUZla4DY2Vm9LupILMZH7yJWwtzBFsjeVlFsTDa30/g+uThqdPjKsFgrog7QFExcb8g9/qBK0Y3nT8zYU4c1mXViRBA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8695 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221130_060306_643566_F75E13D7 X-CRM114-Status: GOOD ( 10.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The rk3568-pinctrl.dtsi only defines the 24-bit RGB interface. Add separate nodes for the 16-bit and 18-bit version, respectively. While at it, split off the clock/sync signals from the data signals. The exact mapping of the data pins was discussed here: https://lore.kernel.org/linux-rockchip/f33a0488-528c-99de-3279-3c0346a03fd6@wolfvision.net/T/ Signed-off-by: Michael Riesch --- .../boot/dts/rockchip/rk3568-pinctrl.dtsi | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi index 8f90c66dd9e9..0a979bfb63d9 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi @@ -3117,4 +3117,98 @@ tsadc_pin: tsadc-pin { <0 RK_PA1 0 &pcfg_pull_none>; }; }; + + lcdc { + /omit-if-no-ref/ + lcdc_clock: lcdc-clock { + rockchip,pins = + /* lcdc_clk */ + <3 RK_PA0 1 &pcfg_pull_none>, + /* lcdc_den */ + <3 RK_PC3 1 &pcfg_pull_none>, + /* lcdc_hsync */ + <3 RK_PC1 1 &pcfg_pull_none>, + /* lcdc_vsync */ + <3 RK_PC2 1 &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + lcdc_data16: lcdc-data16 { + rockchip,pins = + /* lcdc_d3 */ + <2 RK_PD3 1 &pcfg_pull_none>, + /* lcdc_d4 */ + <2 RK_PD4 1 &pcfg_pull_none>, + /* lcdc_d5 */ + <2 RK_PD5 1 &pcfg_pull_none>, + /* lcdc_d6 */ + <2 RK_PD6 1 &pcfg_pull_none>, + /* lcdc_d7 */ + <2 RK_PD7 1 &pcfg_pull_none>, + /* lcdc_d10 */ + <3 RK_PA3 1 &pcfg_pull_none>, + /* lcdc_d11 */ + <3 RK_PA4 1 &pcfg_pull_none>, + /* lcdc_d12 */ + <3 RK_PA5 1 &pcfg_pull_none>, + /* lcdc_d13 */ + <3 RK_PA6 1 &pcfg_pull_none>, + /* lcdc_d14 */ + <3 RK_PA7 1 &pcfg_pull_none>, + /* lcdc_d15 */ + <3 RK_PB0 1 &pcfg_pull_none>, + /* lcdc_d19 */ + <3 RK_PB4 1 &pcfg_pull_none>, + /* lcdc_d20 */ + <3 RK_PB5 1 &pcfg_pull_none>, + /* lcdc_d21 */ + <3 RK_PB6 1 &pcfg_pull_none>, + /* lcdc_d22 */ + <3 RK_PB7 1 &pcfg_pull_none>, + /* lcdc_d23 */ + <3 RK_PC0 1 &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + lcdc_data18: lcdc-data18 { + rockchip,pins = + /* lcdc_d2 */ + <2 RK_PD2 1 &pcfg_pull_none>, + /* lcdc_d3 */ + <2 RK_PD3 1 &pcfg_pull_none>, + /* lcdc_d4 */ + <2 RK_PD4 1 &pcfg_pull_none>, + /* lcdc_d5 */ + <2 RK_PD5 1 &pcfg_pull_none>, + /* lcdc_d6 */ + <2 RK_PD6 1 &pcfg_pull_none>, + /* lcdc_d7 */ + <2 RK_PD7 1 &pcfg_pull_none>, + /* lcdc_d10 */ + <3 RK_PA3 1 &pcfg_pull_none>, + /* lcdc_d11 */ + <3 RK_PA4 1 &pcfg_pull_none>, + /* lcdc_d12 */ + <3 RK_PA5 1 &pcfg_pull_none>, + /* lcdc_d13 */ + <3 RK_PA6 1 &pcfg_pull_none>, + /* lcdc_d14 */ + <3 RK_PA7 1 &pcfg_pull_none>, + /* lcdc_d15 */ + <3 RK_PB0 1 &pcfg_pull_none>, + /* lcdc_d18 */ + <3 RK_PB3 1 &pcfg_pull_none>, + /* lcdc_d19 */ + <3 RK_PB4 1 &pcfg_pull_none>, + /* lcdc_d20 */ + <3 RK_PB5 1 &pcfg_pull_none>, + /* lcdc_d21 */ + <3 RK_PB6 1 &pcfg_pull_none>, + /* lcdc_d22 */ + <3 RK_PB7 1 &pcfg_pull_none>, + /* lcdc_d23 */ + <3 RK_PC0 1 &pcfg_pull_none>; + }; + }; + };