From patchwork Fri Oct 13 12:20:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 13420847 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 49131CDB47E for ; Fri, 13 Oct 2023 12:21:12 +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=BwRl8lNYRYloRx7annZNqSLp49eB9NzbX38w91oo1zA=; b=sSQyAxkvXCD1eN ngWjxYlRTVTQcw8YDQDRFl1XlNw5JEfoUL/ZktzbPRUWMDNGmV5Z0N3LBQzjxZ4oS2vdPjrklDli8 6U5rphskpSAY8FleR6vKKkgUdg1ALZWA9Y6AYe+eVYK738J+58j/9LABfrjUbwsvM8YFl5aQ7Fh2y jtjyQzvmN5IOjAp1ibMWyGvoftxAoECh7HVz2u/HHa2+T8MKfGYRJXFM9+D9hOnd1hChA9AWxZqlX yDTzWl33mYTBaBMumDgaiULcrzKLUnySTVmN7IdEnEBUmHpp5OP/Mx7DS5BKCY+hJeZJG1cCOKFvz 0IfjKwZsEOrxThsDaHww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHA7-003PGn-0S; Fri, 13 Oct 2023 12:21:03 +0000 Received: from m15.mail.163.com ([45.254.50.220]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHA4-003PFg-0h for linux-rockchip@lists.infradead.org; Fri, 13 Oct 2023 12:21:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=s8yb1 2Hf+rhU0ZtbvrV2FJ0jB5SD/SdydsH2waGwU/I=; b=K2ku7Y0oVqh2E+bvtrsUf 36tO3qIHimTwDOD+too7b7Y2XQ6n0Wmp1PVNhOTffqYuB+6hnDaymq3rDT5IipwU gkUjI8dUkSkttiocOSB/CpI9y9y0AZrp/BBZW9Np456s7s4FvrY0BCSBaawdpa2t cVRmTqbkhkmpUg3EiYg21M= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g2-4 (Coremail) with SMTP id _____wD3X3cWNillrunEAQ--.20789S2; Fri, 13 Oct 2023 20:20:41 +0800 (CST) From: Andy Yan To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, heiko@sntech.de Cc: s.hauer@pengutronix.de, hjc@rock-chips.com, sebastian.reichel@collabora.com, sjoerd.simons@collabora.com, Andy Yan Subject: [PATCH v2 1/4] drm/rockchip: remove unused struct in vop2 Date: Fri, 13 Oct 2023 20:20:36 +0800 Message-Id: <20231013122036.1594090-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013122001.1594009-1-andyshrk@163.com> References: <20231013122001.1594009-1-andyshrk@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wD3X3cWNillrunEAQ--.20789S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7trWUKrW3Kw4fArWDWrWrAFb_yoW8Zr4rpa 98A34jvrWxKrWjgr1DJF4Dur4SywnFkay2kFs7G3ZIqFyIgr1DA3W5Kr1rArsxZF129rW7 trnrt34UJF429r7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jk9N3UUUUU= X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/1tbiTB4IXmI0bglZGAABs1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231013_052100_726730_A6F541EE X-CRM114-Status: UNSURE ( 8.28 ) X-CRM114-Notice: Please train this message. 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: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Andy Yan These structs are undefined and un used. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer --- (no changes since v1) drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 -- drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 583df4d22f7e..3c524ca23d53 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -160,7 +160,6 @@ struct vop2_video_port { struct vop2 *vop2; struct clk *dclk; unsigned int id; - const struct vop2_video_port_regs *regs; const struct vop2_video_port_data *data; struct completion dsp_hold_completion; @@ -2274,7 +2273,6 @@ static int vop2_create_crtcs(struct vop2 *vop2) vp = &vop2->vps[i]; vp->vop2 = vop2; vp->id = vp_data->id; - vp->regs = vp_data->regs; vp->data = vp_data; snprintf(dclk_name, sizeof(dclk_name), "dclk_vp%d", vp->id); diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h index f1234a151130..56fd31e05238 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.h @@ -134,16 +134,13 @@ struct vop2_video_port_data { u16 cubic_lut_len; struct vop_rect max_output; const u8 pre_scan_max_dly[4]; - const struct vop2_video_port_regs *regs; unsigned int offset; }; struct vop2_data { u8 nr_vps; - const struct vop2_ctrl *ctrl; const struct vop2_win_data *win; const struct vop2_video_port_data *vp; - const struct vop_csc_table *csc_table; struct vop_rect max_input; struct vop_rect max_output; From patchwork Fri Oct 13 12:20:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 13420848 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 086AFCDB47E for ; Fri, 13 Oct 2023 12:21:22 +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=roDQTz/NIwlWso+c6m50Vr4Mb0/pqlS2ZWJnGzULr7s=; b=uDzyFgj8b3cKBD zCSCRAgmH2bs6G3PRKu1BuMxOUOgfTmrjKrRhgF9shJs40DfbKBos+DrHh/DERT431HRqKCF3cXpD EF4OCf1Oq2/VkaT9VcDBs4xvP7Ovd178yYtT7uSDXHfc7C795TzJeo9Gh4Rpo3RrSXMemAOWWsWm/ NRS4H5O+kF3du4C33gB93sBh3WEv96WEb6kVAE1GciNvo/zy19U+Y8F6emmhBBKKvUYGYn/CR+rvW /xpXZtIa3cNJ7GYPKuzB+XeWNltTYE+Ad2hrx8C6tQV9TwllsFP+9zmKq81fE85po3lgj3bXx9rU6 qXbv3v8La3NtgC+mM3dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHAF-003PII-2s; Fri, 13 Oct 2023 12:21:11 +0000 Received: from m12.mail.163.com ([220.181.12.216]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHAC-003PH4-0t for linux-rockchip@lists.infradead.org; Fri, 13 Oct 2023 12:21:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=yhEQj W9QxKi+Z9UeIXry2hAaUPbAMdnPcufJwdhVnYo=; b=mkzEbJAYSW5e7+Seot+34 lud88N3qjpkP7YZ//djX8VpF0bN7QvnWQDe6FeQCzBz4ynhY74cAbutVGvUKpEGR K25N+L2yqPGsDHeM87HyrNgiCy9ZylC8B/CxGqPavnB8hQR8KmBD/n24ywLLCN7e JLCqUixU0FSL3pRlH0tu5Y= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g4-0 (Coremail) with SMTP id _____wDnj9YkNill4B2_AQ--.8050S2; Fri, 13 Oct 2023 20:20:55 +0800 (CST) From: Andy Yan To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, heiko@sntech.de Cc: s.hauer@pengutronix.de, hjc@rock-chips.com, sebastian.reichel@collabora.com, sjoerd.simons@collabora.com, Andy Yan Subject: [PATCH v2 2/4] drm/rockchip: remove NR_LAYERS macro on vop2 Date: Fri, 13 Oct 2023 20:20:51 +0800 Message-Id: <20231013122051.1594164-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013122001.1594009-1-andyshrk@163.com> References: <20231013122001.1594009-1-andyshrk@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wDnj9YkNill4B2_AQ--.8050S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7XF45CryfWw43WryDJw18Krg_yoWkWwcE93 W7urnxGr4kWrn5Aw4DCrWfGF97KanF9F18Za10qas8ZF1kJ347t3s2q3y7WFy5AFnrWFnF g3Wqgry3CFn3GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU058n5UUUUU== X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/1tbiOwkIXmC5n1jCzAAAs0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231013_052108_678974_4453E021 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. 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: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Andy Yan There are 8 layers on rk3588, so a fix defined macro is not appropriate. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer --- (no changes since v1) drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 3c524ca23d53..57c05c6b246c 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -2251,8 +2251,6 @@ static struct vop2_video_port *find_vp_without_primary(struct vop2 *vop2) return NULL; } -#define NR_LAYERS 6 - static int vop2_create_crtcs(struct vop2 *vop2) { const struct vop2_data *vop2_data = vop2->data; @@ -2371,7 +2369,7 @@ static int vop2_create_crtcs(struct vop2 *vop2) struct vop2_video_port *vp = &vop2->vps[i]; if (vp->crtc.port) - vp->nlayers = NR_LAYERS / nvps; + vp->nlayers = vop2_data->win_size / nvps; } return 0; From patchwork Fri Oct 13 12:21:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 13420849 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 2622FCDB47E for ; Fri, 13 Oct 2023 12:21:43 +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=e+tJUiZ8o/4Pq6uHBUut9jW9eUA8HrczCy2h11gCP8o=; b=mtmJkfhzA6uRJw JsreBe7NyYg4xQJAYvxomhiw7ny4G9lKTkaEn6koFUl9bk5CZ7HerkiHzP9j2m430YGK60McxMh1v 93Q7dJiOeVAPG/8PgS0Kqcig080VzRXBbCU0uTGGwcbtaRn707pI1KqgdZ8+CPxKxXg1rYwV0z83H mS5YcpjEzOJKZ2wP2QIOQd3w3uf0avM71N8gjWwCT+zCwwmBKuwWrcNRYVHFOwcc3Dl3MM35njl1A ppXjC+DEnurHrxZLnKeFmTIce5HA366Eh0XkaNkBB4JhFn0tilxWn3tA8ixP01ZUNmPAGMh3D6rDy Yf1LUgBWA0KvImwvYu8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHAc-003PLJ-2m; Fri, 13 Oct 2023 12:21:34 +0000 Received: from m15.mail.163.com ([45.254.50.219]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHAZ-003PKF-1u for linux-rockchip@lists.infradead.org; Fri, 13 Oct 2023 12:21:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=IOWG0 MbrbYhiKt6BQbObVALF/qURdsD/wOrjlu3Xh6Y=; b=EpjbJfZJTKzr6NJYkBNYz tyR+3paNFfi8L+izGcaYH8vi9SpwPqB77XT1zSHAwiKEkjlqPKV4KD/ZEFMZ7t6T dIWXMezc+UTQZfgRihsARoUZTTal8PUdmjxH9MAW8bxz4UHUBYmxjwhz8evLE0nY tp4PjvfwW75SzEj1bJ4658= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g0-1 (Coremail) with SMTP id _____wD3_1g5NillDlfJAQ--.24625S2; Fri, 13 Oct 2023 20:21:17 +0800 (CST) From: Andy Yan To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, heiko@sntech.de Cc: s.hauer@pengutronix.de, hjc@rock-chips.com, sebastian.reichel@collabora.com, sjoerd.simons@collabora.com, Andy Yan Subject: [PATCH v2 3/4] drm/rockchip: fix the plane format defination of rk3568/6 Date: Fri, 13 Oct 2023 20:21:12 +0800 Message-Id: <20231013122112.1594259-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013122001.1594009-1-andyshrk@163.com> References: <20231013122001.1594009-1-andyshrk@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wD3_1g5NillDlfJAQ--.24625S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7uFWDAr18uryfuF18Jw17GFg_yoW8KryxpF WDArnrX3y09Fy8tF1kJr98Jr4rA3ZrCa1I9w4F93Z7KFy5KFyUKF9xtFyDCr9Fqry8Ca1I yr43JryrZF47JrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jyE__UUUUU= X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/1tbiEAoIXl8YLt07VwACsW X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231013_052132_115184_9F4D44E1 X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. 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: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Andy Yan Add the missing 10 bit RGB format for cluster window. The cluster windows on rk3568/6 only support afbc format, so change the linear yuv format NV12/16/24 to non-Linear YUV420_8BIT/YUV420_10BIT/YUYV/Y210. Add NV15 for esmart windows. Also add some comments. Signed-off-by: Andy Yan --- Changes in v2: - split rename to another patch drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c index 62b573f282a7..05aee588e8c9 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c @@ -16,6 +16,10 @@ #include "rockchip_drm_vop2.h" static const uint32_t formats_win_full_10bit[] = { + DRM_FORMAT_XRGB2101010, + DRM_FORMAT_ARGB2101010, + DRM_FORMAT_XBGR2101010, + DRM_FORMAT_ABGR2101010, DRM_FORMAT_XRGB8888, DRM_FORMAT_ARGB8888, DRM_FORMAT_XBGR8888, @@ -24,9 +28,10 @@ static const uint32_t formats_win_full_10bit[] = { DRM_FORMAT_BGR888, DRM_FORMAT_RGB565, DRM_FORMAT_BGR565, - DRM_FORMAT_NV12, - DRM_FORMAT_NV16, - DRM_FORMAT_NV24, + DRM_FORMAT_YUV420_8BIT, /* yuv420_8bit non-Linear mode only */ + DRM_FORMAT_YUV420_10BIT, /* yuv420_10bit non-Linear mode only */ + DRM_FORMAT_YUYV, /* yuv422_8bit non-Linear mode only*/ + DRM_FORMAT_Y210, /* yuv422_10bit non-Linear mode only */ }; static const uint32_t formats_win_full_10bit_yuyv[] = { @@ -38,11 +43,12 @@ static const uint32_t formats_win_full_10bit_yuyv[] = { DRM_FORMAT_BGR888, DRM_FORMAT_RGB565, DRM_FORMAT_BGR565, - DRM_FORMAT_NV12, - DRM_FORMAT_NV16, - DRM_FORMAT_NV24, - DRM_FORMAT_YVYU, - DRM_FORMAT_VYUY, + DRM_FORMAT_NV12, /* yuv420_8bit linear mode, 2 plane */ + DRM_FORMAT_NV15, /* yuv420_10bit linear mode, 2 plane, no padding */ + DRM_FORMAT_NV16, /* yuv422_8bit linear mode, 2 plane */ + DRM_FORMAT_NV24, /* yuv444_8bit linear mode, 2 plane */ + DRM_FORMAT_YVYU, /* yuv422_8bit[YVYU] linear mode */ + DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode */ }; static const uint32_t formats_win_lite[] = { From patchwork Fri Oct 13 12:21:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 13420850 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 BE662CDB47E for ; Fri, 13 Oct 2023 12:21:57 +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=yx8qlV1LteoMalO5WPA/ZinNQHTaU4r98nya+pP4+e8=; b=jn6gf8vRbu8U2Z 2jATcj7gOD470IVriSeAvKk1y8K8VSYO8OZX6Kf685QY1iXGs5h1t+DaKMnnc5OWwE5mfs8QFN2zc r3V5WpeOMFnJ56/pQY2Wh3+8AjUitN4l3+fit/RWNu/wCuoLrkdoeLGGEtiz7o49bJv8J9UVrkhm4 C4DUP7s57e+TKxFEt2IrcGD6piab6IiREDjHX3aOKPMf4jzxhcxQbmban5Yw5Sf3rX4eSEXStWVxa DeJBjX4HB0WCfgsMLUf4HaSJPBBM7hPNwvNbrs7cEqestGtI2hYA2Rqhdj6y7r0ZG0zpjS0iFErOy Lfgqs/gpsQhW2VTiyl+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHAr-003PNx-20; Fri, 13 Oct 2023 12:21:49 +0000 Received: from m12.mail.163.com ([220.181.12.196]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrHAo-003PMV-0I for linux-rockchip@lists.infradead.org; Fri, 13 Oct 2023 12:21:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=7vbeS vE0+nN2xFlJ3s3DLsu1/gcvjE/n2nTDWrgjPuE=; b=FC5AdfUNLhVoQrOx26FMf CGTpGLBYqK0M+Jir08Ek+AJSS2iD0jRUkUd0lgcmRRbVK7MomO/xr+WInqAYjPt1 a1c3prmYEcvISqE6ieLKYIqRbqWH1OAP8ZnlnE9HVfor6IeEZtKClK9ZcFIKgWBg OcKl01sfWd3vQ1vsqi4ths= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g5-1 (Coremail) with SMTP id _____wD3_xxKNillelXIAQ--.30261S2; Fri, 13 Oct 2023 20:21:34 +0800 (CST) From: Andy Yan To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, heiko@sntech.de Cc: s.hauer@pengutronix.de, hjc@rock-chips.com, sebastian.reichel@collabora.com, sjoerd.simons@collabora.com, Andy Yan Subject: [PATCH v2 4/4] drm/rockchip: rename windows format for vop2 Date: Fri, 13 Oct 2023 20:21:29 +0800 Message-Id: <20231013122129.1594307-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013122001.1594009-1-andyshrk@163.com> References: <20231013122001.1594009-1-andyshrk@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wD3_xxKNillelXIAQ--.30261S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxAF1xKF43Kr1xGF15GryUKFg_yoWrCF1xpa 9F9rnxuF45uF45Wr1UJayUZr4rC3ZIka1a9wn5G3Z7KF43KF9rXr1UKas8CryDKFy8Ar1U Ar4aqryUZr47tFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jk18PUUUUU= X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/1tbiEBAIXl8YLt0+AwAAsf X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231013_052146_936608_549ED932 X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. 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: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Andy Yan formats_win_full_10bit is for cluster window, formats_win_full_10bit_yuyv is for rk356x esmart, rk3588 esmart window will support more format. formats_win_lite is for smart window. Rename it based the windows type may let meaning is clearer Signed-off-by: Andy Yan --- (no changes since v1) drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c index 05aee588e8c9..574cb013639e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c @@ -15,7 +15,7 @@ #include "rockchip_drm_vop2.h" -static const uint32_t formats_win_full_10bit[] = { +static const uint32_t formats_cluster[] = { DRM_FORMAT_XRGB2101010, DRM_FORMAT_ARGB2101010, DRM_FORMAT_XBGR2101010, @@ -34,7 +34,7 @@ static const uint32_t formats_win_full_10bit[] = { DRM_FORMAT_Y210, /* yuv422_10bit non-Linear mode only */ }; -static const uint32_t formats_win_full_10bit_yuyv[] = { +static const uint32_t formats_rk356x_esmart[] = { DRM_FORMAT_XRGB8888, DRM_FORMAT_ARGB8888, DRM_FORMAT_XBGR8888, @@ -51,7 +51,7 @@ static const uint32_t formats_win_full_10bit_yuyv[] = { DRM_FORMAT_VYUY, /* yuv422_8bit[VYUY] linear mode */ }; -static const uint32_t formats_win_lite[] = { +static const uint32_t formats_smart[] = { DRM_FORMAT_XRGB8888, DRM_FORMAT_ARGB8888, DRM_FORMAT_XBGR8888, @@ -150,8 +150,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = { .name = "Smart0-win0", .phys_id = ROCKCHIP_VOP2_SMART0, .base = 0x1c00, - .formats = formats_win_lite, - .nformats = ARRAY_SIZE(formats_win_lite), + .formats = formats_smart, + .nformats = ARRAY_SIZE(formats_smart), .format_modifiers = format_modifiers, .layer_sel_id = 3, .supported_rotations = DRM_MODE_REFLECT_Y, @@ -162,8 +162,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = { }, { .name = "Smart1-win0", .phys_id = ROCKCHIP_VOP2_SMART1, - .formats = formats_win_lite, - .nformats = ARRAY_SIZE(formats_win_lite), + .formats = formats_smart, + .nformats = ARRAY_SIZE(formats_smart), .format_modifiers = format_modifiers, .base = 0x1e00, .layer_sel_id = 7, @@ -175,8 +175,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = { }, { .name = "Esmart1-win0", .phys_id = ROCKCHIP_VOP2_ESMART1, - .formats = formats_win_full_10bit_yuyv, - .nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv), + .formats = formats_rk356x_esmart, + .nformats = ARRAY_SIZE(formats_rk356x_esmart), .format_modifiers = format_modifiers, .base = 0x1a00, .layer_sel_id = 6, @@ -188,8 +188,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = { }, { .name = "Esmart0-win0", .phys_id = ROCKCHIP_VOP2_ESMART0, - .formats = formats_win_full_10bit_yuyv, - .nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv), + .formats = formats_rk356x_esmart, + .nformats = ARRAY_SIZE(formats_rk356x_esmart), .format_modifiers = format_modifiers, .base = 0x1800, .layer_sel_id = 2, @@ -202,8 +202,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = { .name = "Cluster0-win0", .phys_id = ROCKCHIP_VOP2_CLUSTER0, .base = 0x1000, - .formats = formats_win_full_10bit, - .nformats = ARRAY_SIZE(formats_win_full_10bit), + .formats = formats_cluster, + .nformats = ARRAY_SIZE(formats_cluster), .format_modifiers = format_modifiers_afbc, .layer_sel_id = 0, .supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 | @@ -217,8 +217,8 @@ static const struct vop2_win_data rk3568_vop_win_data[] = { .name = "Cluster1-win0", .phys_id = ROCKCHIP_VOP2_CLUSTER1, .base = 0x1200, - .formats = formats_win_full_10bit, - .nformats = ARRAY_SIZE(formats_win_full_10bit), + .formats = formats_cluster, + .nformats = ARRAY_SIZE(formats_cluster), .format_modifiers = format_modifiers_afbc, .layer_sel_id = 1, .supported_rotations = DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270 |