From 71928f92e61e4ecb218fb3e7c3db768418f66fd0 Mon Sep 17 00:00:00 2001 From: Chaoyi Chen Date: Fri, 8 Dec 2023 11:23:48 +0800 Subject: [PATCH] drm/rockchip: vop: correct RK3288/RK3399 VOP WIN register fields In RK3288/RK3399, there is a problem with the definition of the `fmt_10` field in the VOP WIN register. The original `fmt_10` definition conflicts with the `lb_mode` definition. This will cause the `lb_mode` function to be affected, there may be problems with incorrect colors displayed, incorrect window sizes, image flickering, etc. This patch correct `fmt_10` field to the expected value in TRM. Change-Id: I0f9f23c459dc5870532e28b74053a9b4dc606de0 Signed-off-by: Chaoyi Chen --- 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 7c632677ce6d..069cb6e7aef9 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -185,7 +185,7 @@ static const struct vop_win_phy rk3288_win01_data = { .nformats = ARRAY_SIZE(formats_win_full_10bit), .enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0), .format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1), - .fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 4), + .fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 4), .csc_mode = VOP_REG_VER(RK3288_WIN0_CTRL0, 0x3, 10, 3, 2, -1), .rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12), .xmirror = VOP_REG_VER(RK3368_WIN0_CTRL0, 0x1, 21, 3, 2, -1), @@ -669,7 +669,7 @@ static const struct vop_win_phy rk3399_win01_data = { .nformats = ARRAY_SIZE(formats_win_full_10bit_yuyv), .enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0), .format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1), - .fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 4), + .fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 4), .fmt_yuyv = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 17), .csc_mode = VOP_REG_VER(RK3288_WIN0_CTRL0, 0x3, 10, 3, 2, -1), .rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),