From a530326a0f12b0b1515b76fa0944dddeb55e5dfd Mon Sep 17 00:00:00 2001 From: Nickey Yang Date: Wed, 26 Jun 2019 14:23:31 +0800 Subject: [PATCH] drm/rockchip: vop: adjust the layers in RK3399's VOBL AFAWK, there are four layers in RK3399's VOPB, and two layers for RK3399's VOPL. And RK3399's VOBL has the win0 and win2 layers, the formats they support as below. win0: XR24 AR24 XB24 AB24 RG24 BG24 RG16 BG16 NV12 NV16 NV24 NA12 NA16 NA24 win2: XR24 AR24 XB24 AB24 RG24 BG24 RG16 BG16 So only win0 layer supports NV12 format (for video decode format), adjust the overlay for video and primary layer for display. It didn't care this case if some platforms had handled the display in application (e.g android), then on the Linux platform, it's hard to handle the all kinds of cases in Display application, perhaps the linux needn't this patch fixes it in the future. Depend-CL:76144 Fixes: d82f1d3e5800 ("arm64: dts: rockchip: reasonable alllcation of VOP on rk3399 linux") Change-Id: Id93b315b6e3ae670bf5ea4dc0a64e140c6e37e80 Signed-off-by: Caesar Wang Signed-off-by: Nickey Yang --- drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index 5ea33c412489..ead313b8387c 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -627,11 +627,11 @@ static const struct vop_data rk3399_vop_big = { static const struct vop_win_data rk3399_vop_lit_win_data[] = { { .base = 0x00, .phy = &rk3288_win01_data, .csc = &rk3399_win0_csc, - .type = DRM_PLANE_TYPE_PRIMARY, + .type = DRM_PLANE_TYPE_OVERLAY, .feature = WIN_FEATURE_AFBDC }, { .phy = NULL }, { .base = 0x00, .phy = &rk3368_win23_data, .csc = &rk3399_win2_csc, - .type = DRM_PLANE_TYPE_CURSOR, + .type = DRM_PLANE_TYPE_PRIMARY, .feature = WIN_FEATURE_AFBDC, .area = rk3368_area_data, .area_size = ARRAY_SIZE(rk3368_area_data), },