From f1c0082a07d8414fb15768c265c83116a3adce31 Mon Sep 17 00:00:00 2001 From: Jian Cao Date: Thu, 29 Nov 2018 16:04:01 +0800 Subject: [PATCH] osd: osd: a black line below the screen when play video [1/1] 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 --- drivers/amlogic/media/osd/osd_hw.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c index 2408296695e5..420f2fb2934e 100644 --- a/drivers/amlogic/media/osd/osd_hw.c +++ b/drivers/amlogic/media/osd/osd_hw.c @@ -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) || -- 2.20.1