[PATCH v8 22/24] drm: rockchip: Add VOP2 driver

Sascha Hauer s.hauer at pengutronix.de
Fri Mar 18 01:52:00 PDT 2022


Hi Andy,

On Thu, Mar 17, 2022 at 03:23:12PM +0800, Andy Yan wrote:
>    I found a obvious  error in 0x604(OVERLAY_LAYER_SEL) register, the
>    configuration value
> 
>    is 0x54763513.
> 
>    I am not sure if you know clearly about this register:
> 
>    Every four bits of this register select a Window(Cluster0,Cluster1,
>    Esmart0, Esmart1, Smart0. Smart1)
> 
>    for layer0 to layer 5 from bottom to top.
> 
>    0: Cluster0
> 
>    1: Cluster1:
> 
>    2: Esmart0
> 
>    3: Smart0
> 
>    6: Esmart1
> 
>    7: Smart1
> 
>    And one window can only be selected by one layer at a time.
> 
>    So when I change this register to 0x54762513, the square draw by
>    weston-simple-dmabuf-egl appeared on the top of the weston background on
>    screen.

I can reproduce this here. It seems I have only tested overlays with two
active VPs. With only one active VP I see the same behaviour as you do.

The following patch fixes this, will include that in the next round.

Sascha

------------------------------8<-------------------------------
>From d07036753bd1496fa8a49c31eff004e927ce412b Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer at pengutronix.de>
Date: Fri, 18 Mar 2022 09:47:53 +0100
Subject: [PATCH] fixup! drm: rockchip: Add VOP2 driver

---
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index 81ff79eddb8a0..71bc8c11b8bcf 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -1941,7 +1941,7 @@ static void vop2_setup_layer_mixer(struct vop2_video_port *vp)
 	}
 
 	/* configure unused layers to 0x5 (reserved) */
-	for (; nlayer < 3; nlayer++) {
+	for (; nlayer < vp->nlayers; nlayer++) {
 		layer_sel &= ~RK3568_OVL_LAYER_SEL__LAYER(nlayer + ofs, 0x7);
 		layer_sel |= RK3568_OVL_LAYER_SEL__LAYER(nlayer + ofs, 5);
 	}
-- 
2.30.2

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the Linux-rockchip mailing list