Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1123664rwb; Thu, 19 Jan 2023 06:59:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXZ1mQlgXQUBa8CkbZiZuTemBvEXAG+l1C36JJ1q7abT1Hwk3ys7MiQA4sCkDt89FkhF4K X-Received: by 2002:a05:6402:d0:b0:49e:746f:adfa with SMTP id i16-20020a05640200d000b0049e746fadfamr1875959edu.31.1674140359209; Thu, 19 Jan 2023 06:59:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674140359; cv=pass; d=google.com; s=arc-20160816; b=S0ZvfPQ2U8lrE7I7qM2IYFHF9nfWcc01ExNZHEarhxNJ4oCoWE8KfIlVizejpXujPb jBFdyNeiGZxptKlkY7ldkTrQIYl3triQtOMIywQ04qSmVkotDl53kDBGrhT5xxMOsDrm KP0ylMgxGyJd/aqugP1p7GqawiT4+j404vST7fZfHtZFR/g5JXj3EGAX4LF4H2Lr9hQ4 hKRMzx0Eu6it5XBgae06D9zYOAKWSvizPIvgVfxk8yqjYWM1mSZcSK+a4/1LD9LhFkpR AKawAI14ng6MzSzSTFUxBc0zBEkoNdMlmNhizU3pH366VHlL2kUkLMJTg2fv5sR7ZpfM ehpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=ul52RGV0p7N1ehkJLUjpEfApoc6QQClumVBNzHT854U=; b=l7Vlx+Pa7L2KFSQ/ci2+7gUM8uzi49Z5N0aRnK2Hq58YBTjKI3XK1E1mePQuS6zrZO UU6KlCIwluff6YrzjdsVWFPdM7srosDjMBzkv4clY9VLqfXrwhIUJJZOb61mubFUK2SZ uhRWb8UPM1pQqQxEYQFnzC3d4RPBRWTME8L9saCuJGrHOxBhu53j2pzTr7MGKZt0LUjv 0CFCahAOhUN8mXnsbevO/sPriVnNJ6L79hn2dlz97VhGzfCMUWuNmVft3XYwirHaiI10 tmeIcanLe7zPgxMqfXdUlkaag+oxRZPhvPoJMpDMrperv3ahzos/0AYmgLZp2tnf+QRl ILPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=Hi7AE39C; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id em6-20020a056402364600b0048a48f92a6csi40218151edb.439.2023.01.19.06.59.07; Thu, 19 Jan 2023 06:59:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=Hi7AE39C; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbjASOlU (ORCPT + 47 others); Thu, 19 Jan 2023 09:41:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230410AbjASOkQ (ORCPT ); Thu, 19 Jan 2023 09:40:16 -0500 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2066.outbound.protection.outlook.com [40.107.241.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 003F686EEE; Thu, 19 Jan 2023 06:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsEQW67ClmSLM/mCFKuioEhCNgTtpUaBnsdvEqPCkvs1Auz3IBf9HNjWCiT7KmJE7OAfDsU0teoVDlqxoZarW8D2BG5XF9MepKcRvz3/rfxsKigF7pzcjWohHqxQ3m96dwQWLrrycDn3aLTtZGCdJ7AWKHVtWQ8wYRda1gxu0S2R13AyW+CllYY2OyF5dE+WDxIlM5qD9N4IN3Z+UvkEFM9Y9VE7RgGSljCct7tWFDVyE4JdZI2Q7P5r91k9oLeLhSSZId+hGKn1z+2VF33R5hzviD8XoIbzdINxBB4SJhs17+nD7VJ41NkHvUmUopZfbs9ExSUHngaqU9k6/IEVsg== 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=ul52RGV0p7N1ehkJLUjpEfApoc6QQClumVBNzHT854U=; b=fTdIjVzKRV+wKm426SNRYklDoko3xQIjOUC1OAhz4wo5sLfOQwYnrHWXJ3TgXzLgFu5t7a4awJOVLMLMxp7Il5PItYA1oRVTu9aeogWa+1dYN+2hWovEHJdjNaHHB+wunMjd/D0Cvt2FeyLKK4CSCkTO3ARVURuziHt2J23jOfzpwKh9VW9xb+GLmde2yuJ1kZ70sJtwNlNi4GezYV7Xlm/1dWcatgoXHtABmqcMFoq0abj3G42beDVOb+zNNLj4aVCyYWUphYkhID0CD2N/Cnyip0I8duf1+gy6wIdR5NlTrnZ9QTpTtFaUhIVhA7myxJdfBPChQKGo1sheOS9HVg== 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=ul52RGV0p7N1ehkJLUjpEfApoc6QQClumVBNzHT854U=; b=Hi7AE39CUR1x0JTysdN6+8KwpZM9Zrm2Gl7n/FD74bhs3Xdpx4v4aEP4EJrS9pi2TB1WR2Sb8f/xVjvghjhV9Z2T9sUs1izX0g7YwDBqxZ6Wcg4gKdkqJ+2GaSC4bnF86g7IhkkURl20utEUt2ymS0y/R923aDeYuQsNR0migPo= 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 DB9PR08MB6556.eurprd08.prod.outlook.com (2603:10a6:10:261::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Thu, 19 Jan 2023 14:39:23 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219%2]) with mapi id 15.20.6002.024; Thu, 19 Jan 2023 14:39:22 +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 v2 0/6] drm/rockchip: vop2: add support for the rgb output block Date: Thu, 19 Jan 2023 15:39:05 +0100 Message-Id: <20230119143911.3793654-1-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR07CA0152.eurprd07.prod.outlook.com (2603:10a6:802:16::39) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|DB9PR08MB6556:EE_ X-MS-Office365-Filtering-Correlation-Id: a900a1c6-3d0f-48cf-4843-08dafa2af4bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wiX82gcEzN1hg8AHI1k1lVnuPYj8cEkwAYK2Mh2EwSi12pRndW/nZLoWzgDy3pMCRX953VKmkCksh0/LrkhBuNL/YfS+RvCtLXE35TJ+jkGRlIv9p3MUz7iQS5v6vzbrIDh7MDn71zlaWfpR3J8BmSlD2S9qEjn6iVY3sbwrcia+V5NsoZgPez8bkSJH+GXrJ1lRIaRIC/qJ9J8GPFur2zj4cK0M9ngtq5kSKsEfRyfFQsz1pX+7jp1X5l9cxq1FjORSHaaTau4p6cfaRnr2ctdvjx/9sLHG140M4/5lHc3TuP9/kDYgPByNEUIUiHkUjBWTs5dWYRFAQsGuybnuxBx6CEVLy6w1U/Ty4GY61shdroxAAqziP+rEoK7riOxyXRmM/Zns1W4JH5DUgmudEPP/xV+yI+O94Vg+NzgeN67BCgzAnGisuH0rVeEawvoxdcyBOC5ojclaPGhjsE6BO0gjt5F014vfNG6QtPm2Rrxzcsd0tfeUelMWOIGmwwNYySOFeFoCRXO/ElQKRVCd+Rwjr/Ewd7f4F+uPFU6RAarLjZ7MQ3zznU/m8tKMJxfHOPhmotrmop7pGL1vKrj3U0dh/33/mtKU0P1D4AFcYBrscUW7yL1Sq7sMXwXbggXnX6xFFRBjeqk+E8CEupSq5g== 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)(376002)(366004)(346002)(136003)(39850400004)(396003)(451199015)(2616005)(52116002)(36756003)(478600001)(6512007)(8936002)(186003)(6486002)(5660300002)(83380400001)(41300700001)(7416002)(38100700002)(44832011)(316002)(1076003)(66556008)(66946007)(66476007)(86362001)(8676002)(107886003)(2906002)(4326008)(54906003)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?HfAos/ui9H3WM5Wfme8zewbwzygS9Bei8txFcX/YOf+jyyLn19I9FRakh9cD?= =?us-ascii?Q?/5Wpmja3WbO9hIwzZc2LfgMZ3ozFRhAaZhsW5xt/AZaJtBLTjyH8tEumE7aT?= =?us-ascii?Q?cFFDWl4/riuRPpRY+a72owPtkiMJ+oLK+QdKYz8ND0Kkdxq+ZreMmTQSleBD?= =?us-ascii?Q?GOXrmDJL8cEOouMT5NRfJ4d6Apguanq9Xh0CDJ4cZDozCoyC9MFAFZC203je?= =?us-ascii?Q?KH2QsFrvczBK5uLTLLeUQSUYHfaRLnFQLR37I82N4MkL6WAXTq4h/y0QHvJf?= =?us-ascii?Q?66oEiBIqgpkOzM1r0bljfdsiVge1wqBk6NQXoo6DElOltRkt3US5sGNSEjRW?= =?us-ascii?Q?cqPu6AuOzm/qkyTV2AAt+VV7+mx0OKEIojQQhdh+o7qjCCQIKvvD9+C6vhBI?= =?us-ascii?Q?HhSuSHHjP3I1L9BwmXUIjWZwXwQ55rAE+ZnYxeGSmcELS9C9zCYcvdRlo+Im?= =?us-ascii?Q?xmnNg6m1sky9qKT6hEbcBid/dKT7MHNdMlo94zQBpQ8plPUT2bQp8MZZt9Ah?= =?us-ascii?Q?u+cxgLNRLq3omvj2RlP+CPc1tRk26P2w+afjZuxmALqgoYs1s4b0JuwINkmy?= =?us-ascii?Q?AAhpe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?us-ascii?Q?8O86yqGgJ3Pk9U7KFYyhKnKECMztucqNbDJeTVDRHcPm+4OaThGjRPI0ldI+?= =?us-ascii?Q?+qVA4DD+w2ia/VR1KWHAO9KM9DxNjeEazNnb/1FWZHZaEYIym7P4Hsomwqdo?= =?us-ascii?Q?EHjEeMjYIbP8T4Tq6LkHaLJNeQMx8rrQuzAnNhM0fZ3gBAI+bLaJemYGEHcn?= =?us-ascii?Q?4j6Otg=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: a900a1c6-3d0f-48cf-4843-08dafa2af4bf X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 14:39:22.8875 (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: BD9NC48DusZ01J6A4K/Ab8Riamyh440V3OgwMICR1DVAy+BkYkSJZy2xB+XcsKDTvXxcJDSAfymCUIJ4lMOJSMEUmwlELzKnqfi/3BhkEMU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6556 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This series adds support for the RGB output block that can be found in the Rockchip Video Output Processor (VOP) 2. Version 2 of this series incorporates the feedback by Dan Carpenter and Sascha Hauer. Thanks for your comments! Patches 1-4 clean up the code and make it more general. Patch 5 activates the support for the RGB output block in the VOP2 driver. Patch 6 adds pinctrls for the 16-bit and 18-bit RGB data lines. Tested on a custom board featuring the RK3568 SoC with a 18-bit RGB display. Looking forward to your comments! Best regards, Michael Michael Riesch (6): drm/rockchip: vop2: initialize possible_crtcs properly drm/rockchip: rgb: embed drm_encoder into rockchip_encoder drm/rockchip: rgb: add video_port parameter to init function drm/rockchip: vop2: use symmetric function pair vop2_{create,destroy}_crtcs drm/rockchip: vop2: add support for the rgb output block arm64: dts: rockchip: add pinctrls for 16-bit/18-bit rgb interface to rk356x .../boot/dts/rockchip/rk3568-pinctrl.dtsi | 94 +++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 80 ++++++++++++---- drivers/gpu/drm/rockchip/rockchip_rgb.c | 19 ++-- drivers/gpu/drm/rockchip/rockchip_rgb.h | 6 +- 5 files changed, 172 insertions(+), 29 deletions(-) base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 -- 2.30.2