From: Xuhua Zhang Date: Tue, 8 Jan 2019 07:35:23 +0000 (+0800) Subject: tvin: vdin: fix TXLX ATv channel switching crash [1/1] X-Git-Tag: hardkernel-4.9.236-104~1899 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5abdd8c45fc2c23d7a2ab617697b8f4a5fd6984;p=platform%2Fkernel%2Flinux-amlogic.git tvin: vdin: fix TXLX ATv channel switching crash [1/1] PD#SWPL-3964 Problem: ATv channel switching crash Solution: stop vdin, close afbc need judge platform, there is not afbce on txlx Verify: verify by einstein Change-Id: Ibcff1da47b9fdca7e1758b0d45e7d6800bfc8080 Signed-off-by: Xuhua Zhang --- diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c index 2e0b8e0..0804f87 100644 --- a/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c +++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c @@ -654,11 +654,13 @@ void vdin_stop_dec(struct vdin_dev_s *devp) disable_irq_nosync(devp->irq); afbc_init_flag = 0; - while (++afbc_write_down_flag < afbc_write_down_test_times) { - if (vdin_afbce_read_writedown_flag() == 0) - usleep_range(5000, 5001); - else - break; + if (is_meson_tl1_cpu() && (devp->afbce_mode == 1)) { + while (++afbc_write_down_flag < afbc_write_down_test_times) { + if (vdin_afbce_read_writedown_flag() == 0) + usleep_range(5000, 5001); + else + break; + } } if (!(devp->parm.flag & TVIN_PARM_FLAG_CAP) &&