On Wed, Apr 06, 2022 at 11:47:22AM +0200, Piotr Oniszczuk wrote:
Wiadomość napisana przez Piotr Oniszczuk piotr.oniszczuk@gmail.com w dniu 01.04.2022, o godz. 15:05: Sascha
Now works perfectly! (hd playback with 3.5...5.5% cpu while rendering to drm plane)
Fantastic work of You!
Sascha,
Having vop2 finally working with drm planes rendering i discovered another issue: overlay osd is invisible at playback.
context: player draws video on plane #X and osd on overlay plane #Y When user do i.e. seek at playback - app uses overlay OSD plane to display OSD to user. This approach is used by majority of players (KODI, etc.)
This works well on all platforms i have - except rk3566
For me it looks like z-order vop2 issue or alpha blending issue. As this is only on rk3566 and only on drm-planes mode - issue is vop2 related imho.
That turned out to be simpler than I thought it would be. The zpos values were never actually written to the hardware. Please try the following fixup, it should fix this issue.
Thanks for your valuable testing feedback so far :)
Sascha
----------------------------8<------------------------
From d5a102ff1d3010320f492a6ebac6710276fc641f Mon Sep 17 00:00:00 2001
From: Sascha Hauer s.hauer@pengutronix.de Date: Fri, 8 Apr 2022 09:45:24 +0200 Subject: [PATCH] fixup! drm: rockchip: Add VOP2 driver
--- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 54208b20a5a7e..8d1323a47f822 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1943,8 +1943,10 @@ static void vop2_setup_layer_mixer(struct vop2_video_port *vp) break; }
- layer_sel &= ~RK3568_OVL_LAYER_SEL__LAYER(nlayer + ofs, 0x7); - layer_sel |= RK3568_OVL_LAYER_SEL__LAYER(nlayer + ofs, win->data->layer_sel_id); + layer_sel &= ~RK3568_OVL_LAYER_SEL__LAYER(plane->state->normalized_zpos + ofs, + 0x7); + layer_sel |= RK3568_OVL_LAYER_SEL__LAYER(plane->state->normalized_zpos + ofs, + win->data->layer_sel_id); nlayer++; }