From: Jagan Teki <jagan@edgeble.ai>
To: Heiko Stuebner <heiko@sntech.de>,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Cc: Jagan Teki <jagan@edgeble.ai>,
dri-devel@lists.freedesktop.org, Sandy Huang <hjc@rock-chips.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH 06/14] drm/rockchip: vop: Add rv1126 vop_lite support
Date: Mon, 31 Jul 2023 16:30:04 +0530 [thread overview]
Message-ID: <20230731110012.2913742-7-jagan@edgeble.ai> (raw)
In-Reply-To: <20230731110012.2913742-1-jagan@edgeble.ai>
RV1126 VOP_LITE supports the video output processing ofMIPI DSI,
RGB display interfaces with max output resolution of 1920x1080.
Add support for rv1126 vop.
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
---
Cc: dri-devel@lists.freedesktop.org
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 55 +++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
index 7b2805006776..d053ef027552 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
@@ -1120,6 +1120,59 @@ static const struct vop_data rk3328_vop = {
.max_output = { 4096, 2160 },
};
+static const struct vop_common rv1126_common = {
+ .standby = VOP_REG_SYNC(PX30_SYS_CTRL2, 0x1, 1),
+ .out_mode = VOP_REG(PX30_DSP_CTRL2, 0xf, 16),
+ .dsp_blank = VOP_REG(PX30_DSP_CTRL2, 0x1, 14),
+ .dither_down_en = VOP_REG(PX30_DSP_CTRL2, 0x1, 8),
+ .dither_down_sel = VOP_REG(PX30_DSP_CTRL2, 0x1, 7),
+ .dither_down_mode = VOP_REG(PX30_DSP_CTRL2, 0x1, 6),
+ .cfg_done = VOP_REG_SYNC(PX30_REG_CFG_DONE, 0x1, 0),
+ .dither_up = VOP_REG(PX30_DSP_CTRL2, 0x1, 2),
+ .dsp_lut_en = VOP_REG(PX30_DSP_CTRL2, 0x1, 5),
+ .gate_en = VOP_REG(PX30_DSP_CTRL2, 0x1, 0),
+};
+
+static const struct vop_modeset rv1126_modeset = {
+ .htotal_pw = VOP_REG(PX30_DSP_HTOTAL_HS_END, 0x0fff0fff, 0),
+ .hact_st_end = VOP_REG(PX30_DSP_HACT_ST_END, 0x0fff0fff, 0),
+ .vtotal_pw = VOP_REG(PX30_DSP_VTOTAL_VS_END, 0x0fff0fff, 0),
+ .vact_st_end = VOP_REG(PX30_DSP_VACT_ST_END, 0x0fff0fff, 0),
+};
+
+static const struct vop_output rv1126_output = {
+ .rgb_dclk_pol = VOP_REG(PX30_DSP_CTRL0, 0x1, 1),
+ .rgb_pin_pol = VOP_REG(PX30_DSP_CTRL0, 0x7, 2),
+ .rgb_en = VOP_REG(PX30_DSP_CTRL0, 0x1, 0),
+ .mipi_dclk_pol = VOP_REG(PX30_DSP_CTRL0, 0x1, 25),
+ .mipi_pin_pol = VOP_REG(PX30_DSP_CTRL0, 0x7, 26),
+ .mipi_en = VOP_REG(PX30_DSP_CTRL0, 0x1, 24),
+};
+
+static const struct vop_misc rv1126_misc = {
+ .global_regdone_en = VOP_REG(PX30_SYS_CTRL2, 0x1, 13),
+};
+
+static const struct vop_win_data rv1126_vop_win_data[] = {
+ { .base = 0x00, .phy = &px30_win0_data,
+ .type = DRM_PLANE_TYPE_OVERLAY },
+ { .base = 0x00, .phy = &px30_win2_data,
+ .type = DRM_PLANE_TYPE_PRIMARY },
+};
+
+static const struct vop_data rv1126_vop = {
+ .version = VOP_VERSION(2, 0xb),
+ .intr = &px30_intr,
+ .common = &rv1126_common,
+ .modeset = &rv1126_modeset,
+ .output = &rv1126_output,
+ .misc = &rv1126_misc,
+ .win = rv1126_vop_win_data,
+ .win_size = ARRAY_SIZE(rv1126_vop_win_data),
+ .max_output = { 1920, 1080 },
+ .lut_size = 1024,
+};
+
static const struct of_device_id vop_driver_dt_match[] = {
{ .compatible = "rockchip,rk3036-vop",
.data = &rk3036_vop },
@@ -1147,6 +1200,8 @@ static const struct of_device_id vop_driver_dt_match[] = {
.data = &rk3228_vop },
{ .compatible = "rockchip,rk3328-vop",
.data = &rk3328_vop },
+ { .compatible = "rockchip,rv1126-vop",
+ .data = &rv1126_vop },
{},
};
MODULE_DEVICE_TABLE(of, vop_driver_dt_match);
--
2.25.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2023-07-31 11:01 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 10:59 [PATCH 00/14] drm: rockchip: Add RV1126 Display (MIPI DSI) support Jagan Teki
2023-07-31 10:59 ` [PATCH 01/14] genpd: rockchip: Add PD_VO entry for rv1126 Jagan Teki
2023-07-31 20:48 ` Heiko Stübner
2023-08-12 12:57 ` Heiko Stübner
2023-08-14 11:45 ` Ulf Hansson
2023-07-31 11:00 ` [PATCH 02/14] clk: rockchip: rv1126: Add PD_VO clock tree Jagan Teki
2023-07-31 11:00 ` [PATCH 03/14] dt-bindings: phy: rockchip-inno-dsidphy: Document rv1126 Jagan Teki
2023-07-31 20:49 ` Heiko Stübner
2023-08-11 17:52 ` Rob Herring
2023-07-31 11:00 ` [PATCH 04/14] phy: rockchip: inno-dsidphy: Add rv1126 support Jagan Teki
2023-07-31 20:49 ` Heiko Stübner
2023-07-31 11:00 ` [PATCH 05/14] dt-bindings: display: rockchip-vop: Document rv1126 vop Jagan Teki
2023-08-01 21:07 ` Conor Dooley
2023-08-02 14:37 ` Jagan Teki
2023-08-02 15:12 ` Conor Dooley
2023-07-31 11:00 ` Jagan Teki [this message]
2023-07-31 11:00 ` [PATCH 07/14] dt-bindings: display: rockchip-dw-mipi-dsi: Document rv1126 DSI Jagan Teki
2023-08-01 21:05 ` Conor Dooley
2023-07-31 11:00 ` [PATCH 08/14] drm/rockchip: dsi: Add rv1126 MIPI DSI support Jagan Teki
2023-07-31 11:00 ` [PATCH 09/14] ARM: dts: rockchip: rv1126: Add PD_VO entry Jagan Teki
2023-07-31 11:00 ` [PATCH 10/14] ARM: dts: rockchip: rv1126: Add VOP_LITE support Jagan Teki
2023-07-31 11:00 ` [PATCH 11/14] ARM: dts: rockchip: rv1126: Add MIPI DSI pipeline Jagan Teki
2023-07-31 11:00 ` [PATCH 12/14] ARM: dts: rockchip: rv1126: Add Edgeble Neu2 IO DSI overlay Jagan Teki
2023-07-31 11:00 ` [PATCH 13/14] ARM: dts: rockchip: Add Radxa Display 10HD overlay Jagan Teki
2023-07-31 11:00 ` [PATCH 14/14] ARM: dts: rockchip: Add Radxa Display 8HD overlay Jagan Teki
2023-08-10 21:08 ` (subset) [PATCH 00/14] drm: rockchip: Add RV1126 Display (MIPI DSI) support Heiko Stuebner
2023-08-10 21:28 ` Heiko Stuebner
2023-08-12 12:54 ` Heiko Stuebner
2023-08-12 13:00 ` Heiko Stuebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230731110012.2913742-7-jagan@edgeble.ai \
--to=jagan@edgeble.ai \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox