From f5abdd8c45fc2c23d7a2ab617697b8f4a5fd6984 Mon Sep 17 00:00:00 2001 From: Xuhua Zhang Date: Tue, 8 Jan 2019 15:35:23 +0800 Subject: [PATCH] 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 --- drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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) && -- 2.7.4