From fc87b70470ce05938c61ca4212321feaa83b1f8c Mon Sep 17 00:00:00 2001 From: Brian Zhu Date: Mon, 18 Feb 2019 21:56:29 +0800 Subject: [PATCH] vpp: correct the vpp dummy reg for g12a/g12b/tl1 [1/1] PD#TV-1565 Problem: After g12a chip, vpp post dummy reg was changed. The test_screen/rgb_screen sysfs did not work. Solution: Use the correct vpp post dummy reg for those chip Verify: Verified on X301 and W400 Change-Id: I1cb718a1f7040804b63d0197de0bb6aafe233357 Signed-off-by: Brian Zhu --- drivers/amlogic/media/video_sink/video.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 7839101..eff1995 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -10147,7 +10147,11 @@ static ssize_t video_test_screen_store(struct class *cla, #endif /* show test screen YUV blend*/ - if (is_meson_gxm_cpu() || + if (!legacy_vpp) + WRITE_VCBUS_REG( + VPP_POST_BLEND_BLEND_DUMMY_DATA, + test_screen & 0x00ffffff); + else if (is_meson_gxm_cpu() || (get_cpu_type() == MESON_CPU_MAJOR_ID_TXLX)) /* bit width change to 10bit in gxm, 10/12 in txlx*/ WRITE_VCBUS_REG(VPP_DUMMY_DATA1, @@ -10213,7 +10217,11 @@ static ssize_t video_rgb_screen_store(struct class *cla, #endif /* show test screen YUV blend*/ yuv_eight = rgb2yuv(rgb_screen & 0x00ffffff); - if (is_meson_gxtvbb_cpu()) { + if (!legacy_vpp) { + WRITE_VCBUS_REG( + VPP_POST_BLEND_BLEND_DUMMY_DATA, + yuv_eight & 0x00ffffff); + } else if (is_meson_gxtvbb_cpu()) { WRITE_VCBUS_REG(VPP_DUMMY_DATA1, rgb_screen & 0x00ffffff); } else if (cpu_after_eq(MESON_CPU_MAJOR_ID_TXL)) { -- 2.7.4