From 0f0317ba0c57340ef062007e635199f95630faea Mon Sep 17 00:00:00 2001 From: Luke Go Date: Wed, 29 Jan 2020 18:41:43 +0900 Subject: [PATCH] android: media: osd: The zoom related problem fix. - In android, zoom in/out feature cause osd's free scale adjust problem. So I separate the resolution table to adjust free scale mode. I Limited applying free scale handling logic from 1920x1200. The free scale handling will applied above 1920x1200 resolutions. Change-Id: I00edf256ca9de16cb8fcbf987ee6dd75dec28a81 Signed-off-by: Luke Go --- drivers/amlogic/media/osd/osd_hw.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index e95c7f959e45..2572cbb6def4 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -6852,15 +6852,20 @@ static void osd_set_freescale(u32 index, * and osd driver needs to scale the size * to fit in actual hdmi output resolution. */ - if (dst_width > 1920) + if ((dst_width <= 1920) && (dst_height <= 1200)) { osd_hw.free_scale[index].h_enable = 1; - else - osd_hw.free_scale[index].h_enable = 0; - - if (dst_height > 1080) osd_hw.free_scale[index].v_enable = 1; - else - osd_hw.free_scale[index].v_enable = 0; + } else { + if (dst_width > 1920) + osd_hw.free_scale[index].h_enable = 1; + else + osd_hw.free_scale[index].h_enable = 0; + + if (dst_height > 1080) + osd_hw.free_scale[index].v_enable = 1; + else + osd_hw.free_scale[index].v_enable = 0; + } osd_hw.free_scale_enable[index] = (((osd_hw.free_scale[index].h_enable << 16) & 0xffff0000)