From: Bencheng Jing Date: Thu, 1 Feb 2018 13:33:01 +0000 (+0800) Subject: di: fix pulldown crash caused by wrong pointer X-Git-Tag: khadas-vims-v0.9.6-release~2541 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d2bf52480c12107b3007e90172bbf072044afce;p=platform%2Fkernel%2Flinux-amlogic.git di: fix pulldown crash caused by wrong pointer PD#160099: di: fix pulldown crash 1) fix pulldown info bit error Change-Id: I9c111cda6efb7b3161f601d6ffe3c17838108b4a Signed-off-by: Bencheng Jing --- diff --git a/drivers/amlogic/media/deinterlace/deinterlace_hw.c b/drivers/amlogic/media/deinterlace/deinterlace_hw.c index f34f0ff..baa34fb 100644 --- a/drivers/amlogic/media/deinterlace/deinterlace_hw.c +++ b/drivers/amlogic/media/deinterlace/deinterlace_hw.c @@ -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) diff --git a/drivers/amlogic/media/deinterlace/pulldown_drv.c b/drivers/amlogic/media/deinterlace/pulldown_drv.c index f534488..94544a2 100644 --- a/drivers/amlogic/media/deinterlace/pulldown_drv.c +++ b/drivers/amlogic/media/deinterlace/pulldown_drv.c @@ -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