deinterlace: there's a change to hang in shutdown [1/1]
authorJihong Sui <jihong.sui@amlogic.com>
Wed, 28 Nov 2018 08:23:05 +0000 (16:23 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 3 Dec 2018 06:28:03 +0000 (22:28 -0800)
PD#OTT-778

Problem:
1.kernel received reboot command, but hang in shutdown

Solution:
move tasklet_disable behind tasklet_kill

Verify:
P321

Change-Id: I994c21c5aeb42dbbb4e3b50ccac8376db4d4039d
Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
drivers/amlogic/media/deinterlace/deinterlace.c

index 4cf4c55a8ab7270af5fc6b1a8648671faad944c3..fc75fffb3474bb1e3425f8a2360b84b21e1f70cb 100644 (file)
@@ -129,7 +129,7 @@ static di_dev_t *de_devp;
 static dev_t di_devno;
 static struct class *di_clsp;
 
-static const char version_s[] = "2018-11-12a";
+static const char version_s[] = "2018-11-28b";
 
 static int bypass_state = 1;
 static int bypass_all;
@@ -7654,8 +7654,9 @@ static int di_remove(struct platform_device *pdev)
        di_devp->di_event = 0xff;
        kthread_stop(di_devp->task);
        hrtimer_cancel(&di_pre_hrtimer);
+       tasklet_kill(&di_pre_tasklet);  //ary.sui
        tasklet_disable(&di_pre_tasklet);
-       tasklet_kill(&di_pre_tasklet);
+
 #ifdef CONFIG_AMLOGIC_MEDIA_RDMA
 /* rdma handle */
        if (di_devp->rdma_handle > 0)
@@ -7711,8 +7712,9 @@ static void di_shutdown(struct platform_device *pdev)
        di_devp = platform_get_drvdata(pdev);
        ret = hrtimer_cancel(&di_pre_hrtimer);
        pr_info("di pre hrtimer canel %d.\n", ret);
-       tasklet_disable(&di_pre_tasklet);
        tasklet_kill(&di_pre_tasklet);
+       tasklet_disable(&di_pre_tasklet);
+
        init_flag = 0;
        if (is_meson_txlx_cpu())
                di_top_gate_control(true, true);