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)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 6 May 2019 02:57:46 +0000 (19:57 -0700)
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 51baaa9..a80a6c9 100644 (file)
@@ -2707,6 +2707,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);
@@ -2723,6 +2729,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)) {
@@ -2737,14 +2749,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 |