From: MingLiang Dong Date: Wed, 9 Jan 2019 09:22:26 +0000 (-0500) Subject: amvecm: ioctrl get hist ave error [1/1] X-Git-Tag: hardkernel-4.9.236-104~1879 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d90d388a5d0b457de59a4058e5f0145a0ace885;p=platform%2Fkernel%2Flinux-amlogic.git 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 --- 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)) {