From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 949DCC433FE for ; Fri, 10 Dec 2021 08:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238777AbhLJI7R (ORCPT ); Fri, 10 Dec 2021 03:59:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231728AbhLJI7R (ORCPT ); Fri, 10 Dec 2021 03:59:17 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ED98C061746 for ; Fri, 10 Dec 2021 00:55:42 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvbgn-0000TC-1L; Fri, 10 Dec 2021 09:55:37 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mvbgm-0002Mi-En; Fri, 10 Dec 2021 09:55:36 +0100 Date: Fri, 10 Dec 2021 09:55:36 +0100 From: Sascha Hauer To: Johan Jonker Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de, Andy Yan , Benjamin Gaignard , Michael Riesch , Sandy Huang , Heiko =?iso-8859-15?Q?St=FCbner?= , Peter Geis Subject: Re: [PATCH 17/18] drm: rockchip: Add VOP2 driver Message-ID: <20211210085536.GC25513@pengutronix.de> References: <20211208151230.3695378-1-s.hauer@pengutronix.de> <20211208151230.3695378-18-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:51:38 up 295 days, 12:15, 150 users, load average: 0.22, 0.19, 0.18 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Johan, On Wed, Dec 08, 2021 at 05:59:16PM +0100, Johan Jonker wrote: > Hi, > > On 12/8/21 4:12 PM, Sascha Hauer wrote: > > From: Andy Yan > > > > The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. > > It replaces the VOP unit found in the older Rockchip SoCs. > > > > This driver has been derived from the downstream Rockchip Kernel and > > heavily modified: > > > > - All nonstandard DRM properties have been removed > > - dropped struct vop2_plane_state and pass around less data between > > functions > > - Dropped all DRM_FORMAT_* not known on upstream > > - rework register access to get rid of excessively used macros > > - Drop all waiting for framesyncs > > > > The driver is tested with HDMI and MIPI-DSI display on a RK3568-EVB > > board. Overlay support is tested with the modetest utility. AFBC support > > on the cluster windows is tested with weston-simple-dmabuf-egl on > > weston using the (yet to be upstreamed) panfrost driver support. > > > > Signed-off-by: Sascha Hauer > > --- > > [..] > > > + > > +static const struct of_device_id vop2_dt_match[] = { > > + { > > + .compatible = "rockchip,rk3568-vop", > > + .data = &rk3568_vop > > + }, { > > > + .compatible = "rockchip,rk3568-vop", > > Maybe use: > .compatible = "rockchip,rk3566-vop", Copy/Paste bug. Will fix. > > > + .data = &rk3566_vop > > + }, { > > + }, > > Maybe sort this list alphabetical based on compatible in case later more > SoCs are added. > > rk3566 > rk3568 Ok. > > === > > The structure layout size above could be reduced for if we get more > compatible strings additions. > > Example vop1: > > static const struct of_device_id vop_driver_dt_match[] = { > { .compatible = "rockchip,rk3036-vop", > .data = &rk3036_vop }, > { .compatible = "rockchip,rk3126-vop", > .data = &rk3126_vop }, > { .compatible = "rockchip,px30-vop-big", > .data = &px30_vop_big }, > { .compatible = "rockchip,px30-vop-lit", > .data = &px30_vop_lit }, > { .compatible = "rockchip,rk3066-vop", > .data = &rk3066_vop }, > { .compatible = "rockchip,rk3188-vop", > .data = &rk3188_vop }, > { .compatible = "rockchip,rk3288-vop", > .data = &rk3288_vop }, > { .compatible = "rockchip,rk3368-vop", > .data = &rk3368_vop }, > { .compatible = "rockchip,rk3366-vop", > .data = &rk3366_vop }, > { .compatible = "rockchip,rk3399-vop-big", > .data = &rk3399_vop_big }, > { .compatible = "rockchip,rk3399-vop-lit", > .data = &rk3399_vop_lit }, > { .compatible = "rockchip,rk3228-vop", > .data = &rk3228_vop }, > { .compatible = "rockchip,rk3328-vop", > .data = &rk3328_vop }, > {}, It's shorter, but ugly ;) That's only my personal taste though, I don't care much. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | From mboxrd@z Thu Jan 1 00:00:00 1970 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 D3146C433EF for ; Fri, 10 Dec 2021 08:55:56 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VWl16H+OwxUNvVOHaOXt7xQSan9DMgthWC8rZ4+P6vk=; b=QbqI0VnDN2W2k0 U2qBFDLhM1NqZnsajqR7VMMBGDrWyiH3tkjNrJkQggCnW7UCuhSKoOzmFL3Ipwlg1AzTb1rkDIkUJ m34WEaS9hU/E64nPjj3qtt3zkYx8ilzVe1KuzhLLI45Wx/1h0qStatnZ4yxJblueKaFTQ8cRultl4 izaj0ha47yv6qY0eXigmESLlnDAFJqg07YbY+WC7oKGioQmCYsyMCTu5n2ZeTtj1RWbT5jcaLnh5O XGahxSZA4BfxYBx9QdGmNw+e6HUtvmxSq9pYKBBmjduak1RS3HZsRKB/Imn6tLOmpTgXxdn6ms6g3 NGh6U9fmRqSn/9WYiLIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvbh2-001G8o-6B; Fri, 10 Dec 2021 08:55:52 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvbgq-001G6I-26 for linux-rockchip@lists.infradead.org; Fri, 10 Dec 2021 08:55:41 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvbgn-0000TC-1L; Fri, 10 Dec 2021 09:55:37 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mvbgm-0002Mi-En; Fri, 10 Dec 2021 09:55:36 +0100 Date: Fri, 10 Dec 2021 09:55:36 +0100 From: Sascha Hauer To: Johan Jonker Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de, Andy Yan , Benjamin Gaignard , Michael Riesch , Sandy Huang , Heiko =?iso-8859-15?Q?St=FCbner?= , Peter Geis Subject: Re: [PATCH 17/18] drm: rockchip: Add VOP2 driver Message-ID: <20211210085536.GC25513@pengutronix.de> References: <20211208151230.3695378-1-s.hauer@pengutronix.de> <20211208151230.3695378-18-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:51:38 up 295 days, 12:15, 150 users, load average: 0.22, 0.19, 0.18 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-rockchip@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211210_005540_114530_969A0BF4 X-CRM114-Status: GOOD ( 30.20 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Hi Johan, On Wed, Dec 08, 2021 at 05:59:16PM +0100, Johan Jonker wrote: > Hi, > > On 12/8/21 4:12 PM, Sascha Hauer wrote: > > From: Andy Yan > > > > The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. > > It replaces the VOP unit found in the older Rockchip SoCs. > > > > This driver has been derived from the downstream Rockchip Kernel and > > heavily modified: > > > > - All nonstandard DRM properties have been removed > > - dropped struct vop2_plane_state and pass around less data between > > functions > > - Dropped all DRM_FORMAT_* not known on upstream > > - rework register access to get rid of excessively used macros > > - Drop all waiting for framesyncs > > > > The driver is tested with HDMI and MIPI-DSI display on a RK3568-EVB > > board. Overlay support is tested with the modetest utility. AFBC support > > on the cluster windows is tested with weston-simple-dmabuf-egl on > > weston using the (yet to be upstreamed) panfrost driver support. > > > > Signed-off-by: Sascha Hauer > > --- > > [..] > > > + > > +static const struct of_device_id vop2_dt_match[] = { > > + { > > + .compatible = "rockchip,rk3568-vop", > > + .data = &rk3568_vop > > + }, { > > > + .compatible = "rockchip,rk3568-vop", > > Maybe use: > .compatible = "rockchip,rk3566-vop", Copy/Paste bug. Will fix. > > > + .data = &rk3566_vop > > + }, { > > + }, > > Maybe sort this list alphabetical based on compatible in case later more > SoCs are added. > > rk3566 > rk3568 Ok. > > === > > The structure layout size above could be reduced for if we get more > compatible strings additions. > > Example vop1: > > static const struct of_device_id vop_driver_dt_match[] = { > { .compatible = "rockchip,rk3036-vop", > .data = &rk3036_vop }, > { .compatible = "rockchip,rk3126-vop", > .data = &rk3126_vop }, > { .compatible = "rockchip,px30-vop-big", > .data = &px30_vop_big }, > { .compatible = "rockchip,px30-vop-lit", > .data = &px30_vop_lit }, > { .compatible = "rockchip,rk3066-vop", > .data = &rk3066_vop }, > { .compatible = "rockchip,rk3188-vop", > .data = &rk3188_vop }, > { .compatible = "rockchip,rk3288-vop", > .data = &rk3288_vop }, > { .compatible = "rockchip,rk3368-vop", > .data = &rk3368_vop }, > { .compatible = "rockchip,rk3366-vop", > .data = &rk3366_vop }, > { .compatible = "rockchip,rk3399-vop-big", > .data = &rk3399_vop_big }, > { .compatible = "rockchip,rk3399-vop-lit", > .data = &rk3399_vop_lit }, > { .compatible = "rockchip,rk3228-vop", > .data = &rk3228_vop }, > { .compatible = "rockchip,rk3328-vop", > .data = &rk3328_vop }, > {}, It's shorter, but ugly ;) That's only my personal taste though, I don't care much. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 A106BC433EF for ; Fri, 10 Dec 2021 08:55:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BC3210E54A; Fri, 10 Dec 2021 08:55:40 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by gabe.freedesktop.org (Postfix) with ESMTPS id AB23710E548 for ; Fri, 10 Dec 2021 08:55:38 +0000 (UTC) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvbgn-0000TC-1L; Fri, 10 Dec 2021 09:55:37 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mvbgm-0002Mi-En; Fri, 10 Dec 2021 09:55:36 +0100 Date: Fri, 10 Dec 2021 09:55:36 +0100 From: Sascha Hauer To: Johan Jonker Subject: Re: [PATCH 17/18] drm: rockchip: Add VOP2 driver Message-ID: <20211210085536.GC25513@pengutronix.de> References: <20211208151230.3695378-1-s.hauer@pengutronix.de> <20211208151230.3695378-18-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:51:38 up 295 days, 12:15, 150 users, load average: 0.22, 0.19, 0.18 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Benjamin Gaignard , Peter Geis , Sandy Huang , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Michael Riesch , kernel@pengutronix.de, Andy Yan , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Johan, On Wed, Dec 08, 2021 at 05:59:16PM +0100, Johan Jonker wrote: > Hi, > > On 12/8/21 4:12 PM, Sascha Hauer wrote: > > From: Andy Yan > > > > The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. > > It replaces the VOP unit found in the older Rockchip SoCs. > > > > This driver has been derived from the downstream Rockchip Kernel and > > heavily modified: > > > > - All nonstandard DRM properties have been removed > > - dropped struct vop2_plane_state and pass around less data between > > functions > > - Dropped all DRM_FORMAT_* not known on upstream > > - rework register access to get rid of excessively used macros > > - Drop all waiting for framesyncs > > > > The driver is tested with HDMI and MIPI-DSI display on a RK3568-EVB > > board. Overlay support is tested with the modetest utility. AFBC support > > on the cluster windows is tested with weston-simple-dmabuf-egl on > > weston using the (yet to be upstreamed) panfrost driver support. > > > > Signed-off-by: Sascha Hauer > > --- > > [..] > > > + > > +static const struct of_device_id vop2_dt_match[] = { > > + { > > + .compatible = "rockchip,rk3568-vop", > > + .data = &rk3568_vop > > + }, { > > > + .compatible = "rockchip,rk3568-vop", > > Maybe use: > .compatible = "rockchip,rk3566-vop", Copy/Paste bug. Will fix. > > > + .data = &rk3566_vop > > + }, { > > + }, > > Maybe sort this list alphabetical based on compatible in case later more > SoCs are added. > > rk3566 > rk3568 Ok. > > === > > The structure layout size above could be reduced for if we get more > compatible strings additions. > > Example vop1: > > static const struct of_device_id vop_driver_dt_match[] = { > { .compatible = "rockchip,rk3036-vop", > .data = &rk3036_vop }, > { .compatible = "rockchip,rk3126-vop", > .data = &rk3126_vop }, > { .compatible = "rockchip,px30-vop-big", > .data = &px30_vop_big }, > { .compatible = "rockchip,px30-vop-lit", > .data = &px30_vop_lit }, > { .compatible = "rockchip,rk3066-vop", > .data = &rk3066_vop }, > { .compatible = "rockchip,rk3188-vop", > .data = &rk3188_vop }, > { .compatible = "rockchip,rk3288-vop", > .data = &rk3288_vop }, > { .compatible = "rockchip,rk3368-vop", > .data = &rk3368_vop }, > { .compatible = "rockchip,rk3366-vop", > .data = &rk3366_vop }, > { .compatible = "rockchip,rk3399-vop-big", > .data = &rk3399_vop_big }, > { .compatible = "rockchip,rk3399-vop-lit", > .data = &rk3399_vop_lit }, > { .compatible = "rockchip,rk3228-vop", > .data = &rk3228_vop }, > { .compatible = "rockchip,rk3328-vop", > .data = &rk3328_vop }, > {}, It's shorter, but ugly ;) That's only my personal taste though, I don't care much. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | From mboxrd@z Thu Jan 1 00:00:00 1970 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 11B7BC433F5 for ; Fri, 10 Dec 2021 08:57:17 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ppcrfb3//F3prnSJwFFFnP5X0Vm/Tx8KdiVucSMLWKI=; b=bsKqYPSIf1xbA7 hbJPVdW+qe5rFl99O3Cy4oznRNnM16F7OFiopblyZ1nE20C+cWfiWmCJ89gsRVMLcfTf3Nu1mNvWH VU/JIuh5KFiwl+jzqx1YvIj0Pdek0NPXOx4O/8VfvyYXmbPPY7OdsugBM1e3bTZc/4/0uVRGWEVzx 6iHa179A4UXLufYEmjT1/J8N4/3yx6RqnL1f5p8UAZL2Tj/iwHImkAL3r62/5n9ZDBckWorMSW8aV 6ozCqcCVskMheavCN53TKnneKJfyiFSRu3HLGGuFnQaTW6gTbd4F/rbrAe4ufUTicIJPFdsDbzlGq 0l+AheG169BiqfMdO+0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvbgt-001G6t-7Q; Fri, 10 Dec 2021 08:55:43 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvbgo-001G5s-T6 for linux-arm-kernel@lists.infradead.org; Fri, 10 Dec 2021 08:55:40 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvbgn-0000TC-1L; Fri, 10 Dec 2021 09:55:37 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mvbgm-0002Mi-En; Fri, 10 Dec 2021 09:55:36 +0100 Date: Fri, 10 Dec 2021 09:55:36 +0100 From: Sascha Hauer To: Johan Jonker Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de, Andy Yan , Benjamin Gaignard , Michael Riesch , Sandy Huang , Heiko =?iso-8859-15?Q?St=FCbner?= , Peter Geis Subject: Re: [PATCH 17/18] drm: rockchip: Add VOP2 driver Message-ID: <20211210085536.GC25513@pengutronix.de> References: <20211208151230.3695378-1-s.hauer@pengutronix.de> <20211208151230.3695378-18-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:51:38 up 295 days, 12:15, 150 users, load average: 0.22, 0.19, 0.18 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211210_005538_969193_489089C4 X-CRM114-Status: GOOD ( 31.09 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Johan, On Wed, Dec 08, 2021 at 05:59:16PM +0100, Johan Jonker wrote: > Hi, > > On 12/8/21 4:12 PM, Sascha Hauer wrote: > > From: Andy Yan > > > > The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. > > It replaces the VOP unit found in the older Rockchip SoCs. > > > > This driver has been derived from the downstream Rockchip Kernel and > > heavily modified: > > > > - All nonstandard DRM properties have been removed > > - dropped struct vop2_plane_state and pass around less data between > > functions > > - Dropped all DRM_FORMAT_* not known on upstream > > - rework register access to get rid of excessively used macros > > - Drop all waiting for framesyncs > > > > The driver is tested with HDMI and MIPI-DSI display on a RK3568-EVB > > board. Overlay support is tested with the modetest utility. AFBC support > > on the cluster windows is tested with weston-simple-dmabuf-egl on > > weston using the (yet to be upstreamed) panfrost driver support. > > > > Signed-off-by: Sascha Hauer > > --- > > [..] > > > + > > +static const struct of_device_id vop2_dt_match[] = { > > + { > > + .compatible = "rockchip,rk3568-vop", > > + .data = &rk3568_vop > > + }, { > > > + .compatible = "rockchip,rk3568-vop", > > Maybe use: > .compatible = "rockchip,rk3566-vop", Copy/Paste bug. Will fix. > > > + .data = &rk3566_vop > > + }, { > > + }, > > Maybe sort this list alphabetical based on compatible in case later more > SoCs are added. > > rk3566 > rk3568 Ok. > > === > > The structure layout size above could be reduced for if we get more > compatible strings additions. > > Example vop1: > > static const struct of_device_id vop_driver_dt_match[] = { > { .compatible = "rockchip,rk3036-vop", > .data = &rk3036_vop }, > { .compatible = "rockchip,rk3126-vop", > .data = &rk3126_vop }, > { .compatible = "rockchip,px30-vop-big", > .data = &px30_vop_big }, > { .compatible = "rockchip,px30-vop-lit", > .data = &px30_vop_lit }, > { .compatible = "rockchip,rk3066-vop", > .data = &rk3066_vop }, > { .compatible = "rockchip,rk3188-vop", > .data = &rk3188_vop }, > { .compatible = "rockchip,rk3288-vop", > .data = &rk3288_vop }, > { .compatible = "rockchip,rk3368-vop", > .data = &rk3368_vop }, > { .compatible = "rockchip,rk3366-vop", > .data = &rk3366_vop }, > { .compatible = "rockchip,rk3399-vop-big", > .data = &rk3399_vop_big }, > { .compatible = "rockchip,rk3399-vop-lit", > .data = &rk3399_vop_lit }, > { .compatible = "rockchip,rk3228-vop", > .data = &rk3228_vop }, > { .compatible = "rockchip,rk3328-vop", > .data = &rk3328_vop }, > {}, It's shorter, but ugly ;) That's only my personal taste though, I don't care much. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel