From b41c04770c30f9f909e38bef395864b7f994858a Mon Sep 17 00:00:00 2001 From: Pengcheng Chen Date: Tue, 22 Oct 2019 09:00:15 +0800 Subject: [PATCH] osd: set correct dummy data with window_axis control [1/1] 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 --- drivers/amlogic/media/osd/osd_hw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index 64b73d62..871fc6e 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -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; -- 2.7.4