From: "Heiko Stübner" <heiko@sntech.de>
To: Andy Yan <andyshrk@163.com>
Cc: hjc@rock-chips.com, krzk+dt@kernel.org,
devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
derek.foreman@collabora.com, detlev.casanova@collabora.com,
daniel@fooishbar.org, robh@kernel.org,
sebastian.reichel@collabora.com,
Andy Yan <andy.yan@rock-chips.com>,
Michael Riesch <michael.riesch@wolfvision.net>
Subject: Re: [PATCH v15 13/13] drm/rockchip: vop2: Add support for rk3576
Date: Sun, 02 Mar 2025 20:09:52 +0100 [thread overview]
Message-ID: <2764042.X9hSmTKtgW@diego> (raw)
In-Reply-To: <20250218112901.34564-1-andyshrk@163.com>
Hi Andy,
Am Dienstag, 18. Februar 2025, 12:28:58 MEZ schrieb Andy Yan:
> From: Andy Yan <andy.yan@rock-chips.com>
>
> VOP2 on rk3576:
> Three video ports:
> VP0 Max 4096x2160
> VP1 Max 2560x1600
> VP2 Max 1920x1080
>
> 2 4K Cluster windows with AFBC/RFBC, line RGB and YUV
> 4 Esmart windows with line RGB/YUV support:
> Esmart0/1: 4K
> Esmart2/3: 2k, or worked together as a single 4K plane at shared
> line buffer mode.
>
> Compared to the previous VOP, another difference is that each VP
> has its own independent vsync interrupt number.
>
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> Tested-by: Michael Riesch <michael.riesch@wolfvision.net> # on RK3568
> Tested-by: Detlev Casanova <detlev.casanova@collabora.com>
some minor style things, but overall looks really good
> @@ -2665,6 +2721,32 @@ static int vop2_bind(struct device *dev, struct device *master, void *data)
> if (ret)
> return ret;
>
> + if (vop2->version >= VOP_VERSION_RK3576) {
> + struct drm_crtc *crtc;
> +
> + drm_for_each_crtc(crtc, drm) {
> + struct vop2_video_port *vp = to_vop2_video_port(crtc);
> + int vp_irq;
> + const char *irq_name = devm_kasprintf(dev, GFP_KERNEL, "vp%d", vp->id);
> +
> + if (!irq_name)
> + return -ENOMEM;
> +
> + vp_irq = platform_get_irq_byname(pdev, irq_name);
> + if (vp_irq < 0) {
> + DRM_DEV_ERROR(dev, "cannot find irq for vop2 vp%d\n", vp->id);
return dev_err_probe
> + return vp_irq;
> + }
> +
> + ret = devm_request_irq(dev, vp_irq, rk3576_vp_isr, IRQF_SHARED, irq_name,
> + vp);
> + if (ret) {
> + DRM_DEV_ERROR(dev, "request irq for vop2 vp%d failed\n", vp->id);
return dev_err_probe
> + return ret;
> + }
> + }
> + }
> +
> ret = vop2_find_rgb_encoder(vop2);
> if (ret >= 0) {
> vop2->rgb = rockchip_rgb_init(dev, &vop2->vps[ret].crtc,
> +static void rk3576_vop2_setup_overlay(struct vop2_video_port *vp)
> +{
> + struct vop2 *vop2 = vp->vop2;
> + struct drm_crtc *crtc = &vp->crtc;
> + struct drm_plane *plane;
> +
> + vp->win_mask = 0;
> +
> + drm_atomic_crtc_for_each_plane(plane, crtc) {
> + struct vop2_win *win = to_vop2_win(plane);
> +
> + win->delay = win->data->dly[VOP2_DLY_MODE_DEFAULT];
> +
nit: we probably don't need this empty line
> + vp->win_mask |= BIT(win->data->phys_id);
> +
> + if (vop2_cluster_window(win))
> + vop2_setup_cluster_alpha(vop2, win);
> + }
> +
> + if (!vp->win_mask)
> + return;
> +
> + rk3576_vop2_setup_layer_mixer(vp);
> + vop2_setup_alpha(vp);
> + rk3576_vop2_setup_dly_for_windows(vp);
> +}
Heiko
next prev parent reply other threads:[~2025-03-02 19:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 11:27 [PATCH v15 00/13] VOP Support for rk3576 Andy Yan
2025-02-18 11:27 ` [PATCH v15 01/13] drm/rockchip: vop2: use devm_regmap_field_alloc for cluster-regs Andy Yan
2025-02-18 11:27 ` [PATCH v15 02/13] drm/rockchip: vop2: Remove AFBC from TRANSFORM_OFFSET register macro Andy Yan
2025-02-18 11:27 ` [PATCH v15 03/13] drm/rockchip: vop2: Add platform specific callback Andy Yan
2025-02-18 11:27 ` [PATCH v15 04/13] drm/rockchip: vop2: Merge vop2_cluster/esmart_init function Andy Yan
2025-02-18 11:27 ` [PATCH v15 05/13] drm/rockchip: vop2: Support for different layer select configuration between VPs Andy Yan
2025-02-18 11:27 ` [PATCH v15 06/13] drm/rockchip: vop2: Introduce vop hardware version Andy Yan
2025-02-18 11:27 ` [PATCH v15 07/13] drm/rockchip: vop2: Register the primary plane and overlay plane separately Andy Yan
2025-03-02 18:57 ` Heiko Stübner
2025-03-03 6:17 ` Andy Yan
2025-02-18 11:27 ` [PATCH v15 08/13] drm/rockchip: vop2: Set plane possible crtcs by possible vp mask Andy Yan
2025-02-18 11:27 ` [PATCH v15 09/13] drm/rockchip: vop2: Add uv swap for cluster window Andy Yan
2025-02-18 11:27 ` [PATCH v15 10/13] dt-bindings: display: vop2: describe constraint SoC by SoC Andy Yan
2025-02-18 11:28 ` [PATCH v15 11/13] dt-bindings: display: vop2: Add missing rockchip,grf property for rk3566/8 Andy Yan
2025-02-18 11:28 ` [PATCH v15 12/13] dt-bindings: display: vop2: Add rk3576 support Andy Yan
2025-02-18 11:28 ` [PATCH v15 13/13] drm/rockchip: vop2: Add support for rk3576 Andy Yan
2025-03-02 19:09 ` Heiko Stübner [this message]
2025-03-02 12:01 ` Re:[PATCH v15 00/13] VOP Support " Andy Yan
2025-03-02 18:34 ` (subset) [PATCH " 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=2764042.X9hSmTKtgW@diego \
--to=heiko@sntech.de \
--cc=andy.yan@rock-chips.com \
--cc=andyshrk@163.com \
--cc=daniel@fooishbar.org \
--cc=derek.foreman@collabora.com \
--cc=detlev.casanova@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hjc@rock-chips.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=michael.riesch@wolfvision.net \
--cc=robh@kernel.org \
--cc=sebastian.reichel@collabora.com \
/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;
as well as URLs for NNTP newsgroup(s).