From 3d90d388a5d0b457de59a4058e5f0145a0ace885 Mon Sep 17 00:00:00 2001 From: MingLiang Dong Date: Wed, 9 Jan 2019 04:22:26 -0500 Subject: [PATCH] amvecm: ioctrl get hist ave error [1/1] PD#TV-1950 Problem: VPP_IN_H_V_SIZE register is removed on TL1 Solution: use preblend size to config hist stts size Verify: verify on TL1 Change-Id: I0afc9fd45f69318b2ebd42424aee20e60400d809 Signed-off-by: MingLiang Dong --- drivers/amlogic/media/enhancement/amvecm/amvecm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/enhancement/amvecm/amvecm.c b/drivers/amlogic/media/enhancement/amvecm/amvecm.c index f5f7517..f37cbc0 100644 --- a/drivers/amlogic/media/enhancement/amvecm/amvecm.c +++ b/drivers/amlogic/media/enhancement/amvecm/amvecm.c @@ -783,8 +783,14 @@ void vpp_get_vframe_hist_info(struct vframe_s *vf) unsigned int hist_height, hist_width; u64 divid; - hist_height = READ_VPP_REG_BITS(VPP_IN_H_V_SIZE, 0, 13); - hist_width = READ_VPP_REG_BITS(VPP_IN_H_V_SIZE, 16, 13); + if (get_cpu_type() == MESON_CPU_MAJOR_ID_TL1) { + /*TL1 remove VPP_IN_H_V_SIZE register*/ + hist_width = READ_VPP_REG_BITS(VPP_PREBLEND_H_SIZE, 0, 13); + hist_height = READ_VPP_REG_BITS(VPP_PREBLEND_H_SIZE, 16, 13); + } else { + hist_height = READ_VPP_REG_BITS(VPP_IN_H_V_SIZE, 0, 13); + hist_width = READ_VPP_REG_BITS(VPP_IN_H_V_SIZE, 16, 13); + } if ((hist_height != pre_hist_height) || (hist_width != pre_hist_width)) { -- 2.7.4