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)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 30 Oct 2019 05:48:23 +0000 (22:48 -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 d2304ebdfb8f9c8f1881f5b176b97079930b0578..88c53af454ffa82647a3a04d00839e65c72f06f6 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))