di: fix pulldown crash caused by wrong pointer
authorBencheng Jing <bencheng.jing@amlogic.com>
Thu, 1 Feb 2018 13:33:01 +0000 (21:33 +0800)
committerkele bai <kele.bai@amlogic.com>
Thu, 8 Feb 2018 11:10:31 +0000 (19:10 +0800)
PD#160099: di: fix pulldown crash
1) fix pulldown info bit error

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

index f34f0ff..baa34fb 100644 (file)
@@ -2065,9 +2065,9 @@ void read_pulldown_info(unsigned int *glb_frm_mot_num,
         * addr will increase by 1 automatically
         */
        DI_Wr(DI_INFO_ADDR, 1);
-       *glb_frm_mot_num = Rd(DI_INFO_DATA);
+       *glb_frm_mot_num = (Rd(DI_INFO_DATA)&0xffffff);
        DI_Wr(DI_INFO_ADDR, 4);
-       *glb_fid_mot_num = Rd(DI_INFO_DATA);
+       *glb_fid_mot_num = (Rd(DI_INFO_DATA)&0xffffff);
 }
 
 void read_new_pulldown_info(struct FlmModReg_t *pFMReg)
index f534488..94544a2 100644 (file)
@@ -49,7 +49,7 @@ static void pulldown_mode_init(struct pulldown_detected_s *pd_config)
 }
 
 static void pulldown_wnd_config(struct pulldown_detected_s *pd_config,
-       unsigned short **wins)
+       unsigned short wins[][3])
 {
        unsigned int i = 0;
 
@@ -273,7 +273,7 @@ unsigned int pulldown_detection(struct pulldown_detected_s *res,
 
                if (flm32 && (pldn_cmb0 == 1)) {
                        pulldown_wnd_config(res,
-                               (unsigned short **)dectres.rPstCYWnds);
+                               dectres.rPstCYWnds);
                } else if (dectres.rF22Flag > 1 &&
                        dectres.rFlmPstMod == 1 &&
                        pldn_cmb0 == 1) {
@@ -283,7 +283,7 @@ unsigned int pulldown_detection(struct pulldown_detected_s *res,
                        } else if (dectres.rFlmPstGCm == 0 &&
                                pldn_cmb0 > 1 && pldn_cmb0 <= 5) {
                                pulldown_wnd_config(res,
-                                       (unsigned short **)dectres.rPstCYWnds);
+                                       dectres.rPstCYWnds);
                                /* 1-->only film-mode
                                 * 2-->windows-->mtn
                                 * 3-->windows-->detected
@@ -308,7 +308,7 @@ unsigned int pulldown_detection(struct pulldown_detected_s *res,
                        if ((dectres.rFlmPstGCm == 1) && (pldn_cmb1 > 0)
                            && (pldn_cmb1 <= 5)) {
                                pulldown_wnd_config(res,
-                                       (unsigned short **)dectres.rPstCYWnds);
+                                       dectres.rPstCYWnds);
                                /*
                                 * 1-->normal set in pulldown
                                 * wnd config func