From: Brian Zhu Date: Thu, 16 May 2019 13:13:56 +0000 (+0800) Subject: dv: reset the g_vpotch value according to current vinfo [1/1] X-Git-Tag: hardkernel-4.9.236-104~1222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=173980a6cbf2c193ab8beebe2351a8c59c8ad873;p=platform%2Fkernel%2Flinux-amlogic.git dv: reset the g_vpotch value according to current vinfo [1/1] PD#SWPL-8419 Problem: Get the wrong g_vpotch value when platform bootup Solution: reset the g_vpotch value according to current vinfo Verify: verified by u212 Change-Id: I063140f0a19cf349cd8e6d66c571ae5b2c7e3de7 Signed-off-by: Brian Zhu --- diff --git a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c index 5b0ded4..07fed4b 100644 --- a/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c +++ b/drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c @@ -2131,6 +2131,9 @@ static int dolby_core2_set( VSYNC_WR_DV_REG(DOLBY_CORE2A_SWAP_CTRL2, (hsize << 16) | (vsize + g_vsize_add)); } + if (debug_dolby & 2) + pr_dolby_dbg("g_hpotch %x, g_vpotch %x\n", + g_hpotch, g_vpotch); VSYNC_WR_DV_REG(DOLBY_CORE2A_SWAP_CTRL3, (g_hwidth << 16) | g_vwidth); VSYNC_WR_DV_REG(DOLBY_CORE2A_SWAP_CTRL4, @@ -2458,7 +2461,23 @@ static void apply_stb_core_settings( g_vpotch = 0x60; else g_vpotch = 0x20; + } else if (is_meson_g12()) { + if (vinfo) { + if (debug_dolby & 2) + pr_dolby_dbg("vinfo %d %d %d\n", + vinfo->width, + vinfo->height, + vinfo->field_height); + if ((vinfo->width < 1280) && + (vinfo->height < 720) && + (vinfo->field_height < 720)) + g_vpotch = 0x60; + else + g_vpotch = 0x8; + } else + g_vpotch = 0x8; } + if (mask & 1) { if (is_meson_txlx_stbmode() || force_stb_mode) {