From 81bc3489b97f842b43b29690aa2c6abcab82ab1f Mon Sep 17 00:00:00 2001 From: Bencheng Jing Date: Thu, 6 Dec 2018 16:53:17 +0800 Subject: [PATCH] pq: fix sr registers load fail on txl [1/1] PD#SWPL-2941 Problem: sr top ctrl is closed when video off Solution: txl and txl sr top don't close Verify: TxL Change-Id: Ia8e7e3bd93dd328497af66cf9758e3021cafe22c Signed-off-by: Bencheng Jing --- drivers/amlogic/media/enhancement/amvecm/amvecm.c | 5 ++++- drivers/amlogic/media/video_sink/video.c | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/media/enhancement/amvecm/amvecm.c b/drivers/amlogic/media/enhancement/amvecm/amvecm.c index a06833b..8a006fe 100644 --- a/drivers/amlogic/media/enhancement/amvecm/amvecm.c +++ b/drivers/amlogic/media/enhancement/amvecm/amvecm.c @@ -5643,7 +5643,10 @@ void init_pq_setting(void) } /*probe close sr0 peaking for switch on video*/ WRITE_VPP_REG_BITS(VPP_SRSHARP0_CTRL, 1, 0, 1); - WRITE_VPP_REG_BITS(VPP_SRSHARP1_CTRL, 0, 0, 1); + if (cpu_after_eq(MESON_CPU_MAJOR_ID_TL1)) + WRITE_VPP_REG_BITS(VPP_SRSHARP1_CTRL, 0, 0, 1); + else + WRITE_VPP_REG_BITS(VPP_SRSHARP1_CTRL, 1, 0, 1); /*default dnlp off*/ WRITE_VPP_REG_BITS(SRSHARP0_PK_NR_ENABLE + sr_offset[0], 0, 1, 1); diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 463ff1c..115db2d 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -6401,8 +6401,11 @@ SET_FILTER: vpp_misc_set &= ~(VPP_VD2_PREBLEND | VPP_VD2_POSTBLEND | VPP_PREBLEND_EN); /*auto disable sr when video off*/ - VSYNC_WR_MPEG_REG(VPP_SRSHARP0_CTRL, 0); - VSYNC_WR_MPEG_REG(VPP_SRSHARP1_CTRL, 0); + if (!is_meson_txl_cpu() && + !is_meson_txlx_cpu()) { + VSYNC_WR_MPEG_REG(VPP_SRSHARP0_CTRL, 0); + VSYNC_WR_MPEG_REG(VPP_SRSHARP1_CTRL, 0); + } video_onoff_state = VIDEO_ENABLE_STATE_IDLE; video_onoff_time = jiffies_to_msecs(jiffies); vpu_delay_work_flag |= -- 2.7.4