osd: set correct dummy data with window_axis control [1/1]
authorPengcheng Chen <pengcheng.chen@amlogic.com>
Tue, 22 Oct 2019 01:00:15 +0000 (09:00 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Tue, 22 Oct 2019 13:23:04 +0000 (06:23 -0700)
PD#SWPL-15591

Problem:
a thin line appears at the bottom under linux

Solution:
set correct dummy data with window_axis control

Verify:
p212

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

index 64b73d6..871fc6e 100644 (file)
@@ -3177,6 +3177,7 @@ void osd_set_window_axis_hw(u32 index, s32 x0, s32 y0, s32 x1, s32 y1)
        struct vinfo_s *vinfo = NULL;
        s32 temp_y0, temp_y1;
        u32 output_index;
+       u32 height_dst, height_src;
 
        output_index = get_output_device_id(index);
        if (output_index == VIU1)
@@ -3218,6 +3219,16 @@ void osd_set_window_axis_hw(u32 index, s32 x0, s32 y0, s32 x1, s32 y1)
        osd_hw.dst_data[index].w = x1 - x0 + 1;
        osd_hw.dst_data[index].h = y1 - y0 + 1;
 
+       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 (osd_hw.free_dst_data[index].y_end >= osd_hw.vinfo_height[index] - 1)
                osd_set_dummy_data(index, 0xff);
        osd_update_window_axis = true;