osd: frame just display on half screen [1/1]
authorJian Cao <jian.cao@amlogic.com>
Fri, 12 Apr 2019 02:34:25 +0000 (10:34 +0800)
committerJian Cao <jian.cao@amlogic.com>
Fri, 12 Apr 2019 02:56:42 +0000 (19:56 -0700)
PD#SWPL-7039

Problem:
bring up osd for TM2
frame just display on half screen

Solution:
fix field_out_en value from array

Verify:
Verified on T962e2_ab319

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

index f1705df..fd64c26 100644 (file)
@@ -7608,6 +7608,7 @@ static void osd_set_freescale_new(u32 index,
        struct layer_blend_reg_s *blend_reg;
        u32 width, height;
        u32 src_height;
+       u32 output_index;
 
        layer_blend = &(blending->layer_blend);
        blend_reg = &(blending->blend_reg);
@@ -7615,6 +7616,7 @@ static void osd_set_freescale_new(u32 index,
                osd_log_err("error osd index=%d\n", index);
                return;
        }
+       output_index = get_output_device_id(index);
        osd_hw.free_scale_enable[index] = 0x10001;
        osd_hw.free_scale[index].h_enable = 1;
        osd_hw.free_scale[index].v_enable = 1;
@@ -7638,7 +7640,7 @@ static void osd_set_freescale_new(u32 index,
                osd_hw.dst_data[index].y;
        width = osd_hw.dst_data[index].w;
        height = osd_hw.dst_data[index].h;
-       if (osd_hw.field_out_en) {
+       if (osd_hw.field_out_en[output_index]) {
                height = height >> 1;
                osd_hw.free_dst_data[index].y_start >>= 1;
        }