osd: osd: a black line below the screen when play video [1/1]
authorJian Cao <jian.cao@amlogic.com>
Thu, 29 Nov 2018 08:04:01 +0000 (16:04 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 30 Nov 2018 04:21:43 +0000 (20:21 -0800)
PD#SWPL-2558

Problem:
a black horizontal line below the screen when play video

Solution:
set dummy data alpha

Verify:
verified on p321

Change-Id: I36dc924b9bc89f4f8ea61eb86c6f5bc9199e40ae
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
drivers/amlogic/media/osd/osd_hw.c

index 2408296695e5860dd43b1c7a40bcd32baf7d084d..420f2fb2934edc01f946325eda2bd712227ef14b 100644 (file)
@@ -6645,9 +6645,7 @@ static void osd_set_freescale(u32 index,
                osd_hw.free_src_data[index].x_start + 1;
        if ((osd_hw.osd_meson_dev.cpu_id ==
                __MESON_CPU_MAJOR_ID_G12A) &&
-               (height != src_height) &&
-               (osd_hw.disp_info.position_h ==
-               osd_hw.disp_info.fullscreen_h)) {
+               (height != src_height)) {
                osd_hw.osd_meson_dev.dummy_data = 0x000000;
                osd_set_dummy_data(index, 0);
        } else {
@@ -7683,7 +7681,7 @@ static void osd_setting_default_hwc(void)
 
 static bool set_old_hwc_freescale(u32 index)
 {
-       u32 x_start, x_end, y_start, y_end;
+       u32 x_start, x_end, y_start, y_end, height_dst, height_src;
 
        if (osd_hw.osd_reverse[index] == REVERSE_TRUE) {
                x_start = osd_hw.vinfo_width
@@ -7718,6 +7716,17 @@ static bool set_old_hwc_freescale(u32 index)
                osd_hw.free_dst_data[index].x_end,
                osd_hw.free_dst_data[index].y_start,
                osd_hw.free_dst_data[index].y_end);
+
+       /* set dummy_data alpha */
+       height_dst = osd_hw.free_dst_data[index].y_end -
+                       osd_hw.free_dst_data[index].y_start + 1;
+       height_src = osd_hw.free_src_data[index].y_end -
+                       osd_hw.free_src_data[index].y_start + 1;
+       if (height_dst != height_src)
+               osd_set_dummy_data(index, 0);
+       else
+               osd_set_dummy_data(index, 0xff);
+
        if ((memcmp(&(osd_hw.free_src_data[index]),
                &osd_hw.free_src_data_backup[index],
                sizeof(struct pandata_s)) != 0) ||