osd: support 4K UI worked in 1080p output [1/1]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Wed, 23 Oct 2019 01:06:06 +0000 (09:06 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 28 Oct 2019 05:16:31 +0000 (22:16 -0700)
PD#SWPL-15649

Problem:
4K UI display abnormal with 1080p output

Solution:
adjust freescale to 2line mode when 4K UI with 1080p output

Verify:
g12a

Change-Id: I636b1d8634beabd3f356e63b9d7a9a05b1a556bb
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
drivers/amlogic/media/osd/osd_hw.c

index d2304eb..88c53af 100644 (file)
@@ -2502,6 +2502,10 @@ int osd_set_scan_mode(u32 index)
                        osd_h_filter_mode = 1;
                        osd_v_filter_mode = 1;
                }
+               if ((osd_hw.fb_for_4k2k) &&
+                   (osd_hw.free_scale_enable[index]))
+                       osd_hw.scale_workaround = 1;
+
                if (is_interlaced(vinfo)) {
                        osd_hw.scan_mode[index] = SCAN_MODE_INTERLACE;
                        if (osd_hw.osd_meson_dev.osd_ver == OSD_NORMAL)
@@ -2570,9 +2574,6 @@ int osd_set_scan_mode(u32 index)
                                && (vinfo->height == 2160))
                                || ((vinfo->width == 4096)
                                && (vinfo->height == 2160))) {
-                               if ((osd_hw.fb_for_4k2k)
-                                       && (osd_hw.free_scale_enable[index]))
-                                               osd_hw.scale_workaround = 1;
                                osd_hw.field_out_en[output_index] = 0;
                        } else if (((vinfo->width == 720)
                                && (vinfo->height == 480))