di: fix moving character tow line [1/1]
authorBencheng Jing <bencheng.jing@amlogic.com>
Thu, 2 May 2019 08:27:37 +0000 (16:27 +0800)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:13:42 +0000 (14:13 +0800)
PD#TV-4346

Problem:
di post buffer switch,motion read mif not switch

Solution:
fix the motion read mif

Verify:
verified by t962x2_x301

Change-Id: I6728e91bfff4241da1f5067398cc412545c7d96f
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
drivers/amlogic/media/deinterlace/deinterlace_hw.c

index 3918d70..7015e3c 100644 (file)
@@ -2656,6 +2656,12 @@ void di_post_switch_buffer(
                        DI_VSYNC_WR_MPEG_REG_BITS(MCVECRD_CTRL1,
                                di_mcvecrd_mif->canvas_num, 16, 8);
                }
+               /*motion for current display field.*/
+               if (blend_mtn_en) {
+                       DI_VSYNC_WR_MPEG_REG_BITS(MTNRD_CTRL1,
+                               di_mtnprd_mif->canvas_num, 16, 8);
+                       /* current field mtn canvas index.*/
+               }
        } else {
                if ((VSYNC_RD_MPEG_REG(VIU_MISC_CTRL0) & 0x50000) != 0x50000)
                        DI_VSYNC_WR_MPEG_REG_BITS(VIU_MISC_CTRL0, 5, 16, 3);
@@ -2672,6 +2678,12 @@ void di_post_switch_buffer(
                                di_mcvecrd_mif->canvas_num,
                                0, 10);
                }
+               /*motion for current display field.*/
+               if (blend_mtn_en) {
+                       DI_VSYNC_WR_MPEG_REG(DI_MTNRD_CTRL,
+                       (di_mtnprd_mif->canvas_num << 8) | (urgent << 16));
+                       /*current field mtn canvas index.*/
+               }
        }
 
        if (!ei_only && (di_ddr_en || di_vpp_en)) {
@@ -2686,14 +2698,6 @@ void di_post_switch_buffer(
                                (di_buf2_mif->canvas0_addr0 << 0));
        }
 
-       /* motion for current display field. */
-       if (blend_mtn_en) {
-               DI_VSYNC_WR_MPEG_REG(DI_MTNRD_CTRL,
-(di_mtnprd_mif->canvas_num << 8) | (urgent << 16)
-        ); /* current field mtn canvas index. */
-
-       }
-
        if (di_ddr_en) {
                DI_VSYNC_WR_MPEG_REG(DI_DIWR_CTRL,
                        di_diwr_mif->canvas_num |