From: Tomonori Nakagawa <jack@supremeoverlordjabs.co>
To: "Chaoyi Chen" <chaoyi.chen@rock-chips.com>,
"Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Tomonori Nakagawa <jack@supremeoverlordjabs.co>
Subject: [PATCH v2] drm/rockchip: vop2: give rk3576 VP2 a primary plane
Date: Sun, 2 Aug 2026 07:35:20 +0900 [thread overview]
Message-ID: <20260801223520.8661-1-jack@supremeoverlordjabs.co> (raw)
In-Reply-To: <20260729232450.13797-1-jack@supremeoverlordjabs.co>
On rk3576 the two Cluster windows are the only windows typed
DRM_PLANE_TYPE_PRIMARY, and both have possible_vp_mask = BIT(0) | BIT(1),
so they can only be attached to VP0 or VP1. VP2's only attachable
windows are the Esmart windows, which are all DRM_PLANE_TYPE_OVERLAY.
vop2_create_crtcs() requires every video port a board wires up (an output
endpoint on video_portN) to own a DRM_PLANE_TYPE_PRIMARY plane. On a
board whose DT routes any interface to VP2, no attachable primary plane
is found and probe fails with -ENOENT ("no primary plane for vp 2"),
tearing down the whole VOP2.
Promote Esmart0 to DRM_PLANE_TYPE_PRIMARY. Its possible_vp_mask is
BIT(0) | BIT(2); since vop2_create_crtcs() assigns primaries in window
array order and Cluster0/Cluster1 precede Esmart0, VP0 and VP1 still take
Cluster0/Cluster1, and only VP2 gains Esmart0 as its primary:
VP0: primary Cluster0
VP1: primary Cluster1
VP2: primary Esmart0
Tested on Anbernic RG Vita Pro (rk3576), which routes its DP output to
VP2.
Signed-off-by: Tomonori Nakagawa <jack@supremeoverlordjabs.co>
---
v2: reword the commit message per Chaoyi Chen's review - VP2 is not
DP-specific; describe the plane topology instead (the two
PRIMARY-typed Cluster windows are limited to VP0/VP1 by
possible_vp_mask, so VP2 has no attachable primary). No functional
change.
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
index 17eda592b..e7d013dc3 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
@@ -894,7 +894,7 @@ static const struct vop2_win_data rk3576_vop_win_data[] = {
.format_modifiers = format_modifiers,
.layer_sel_id = { 2, 0xf, 0, 0xf },
.supported_rotations = DRM_MODE_REFLECT_Y,
- .type = DRM_PLANE_TYPE_OVERLAY,
+ .type = DRM_PLANE_TYPE_PRIMARY,
.axi_bus_id = 0,
.axi_yrgb_r_id = 0x10,
.axi_uv_r_id = 0x11,
--
2.54.0
prev parent reply other threads:[~2026-08-01 22:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 23:24 [PATCH] " Tomonori Nakagawa
2026-07-30 1:56 ` Chaoyi Chen
2026-07-30 3:39 ` Tomonori Nakagawa
2026-07-30 3:49 ` Chaoyi Chen
2026-08-01 22:35 ` Tomonori Nakagawa [this message]
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=20260801223520.8661-1-jack@supremeoverlordjabs.co \
--to=jack@supremeoverlordjabs.co \
--cc=airlied@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®