From df2697c026f4de99ff1c9bc8ea3056a4e1a74515 Mon Sep 17 00:00:00 2001 From: Herman Chen Date: Mon, 16 Jan 2023 15:25:54 +0800 Subject: [PATCH] video: rockchip: mpp: fix slice mode iommu issue When encoder slice mode is enabled the slice irq will deactivate iommu device and get stuck. So only the last slice irq with IRQ_WAKE_THREAD return can deactivate iommu device. Signed-off-by: Herman Chen Change-Id: I9edb8616be56fbc3eace0528407e90f01cd33a5d --- drivers/video/rockchip/mpp/mpp_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/rockchip/mpp/mpp_common.c b/drivers/video/rockchip/mpp/mpp_common.c index d42b88dcd08d..043a5b3b41b3 100644 --- a/drivers/video/rockchip/mpp/mpp_common.c +++ b/drivers/video/rockchip/mpp/mpp_common.c @@ -2291,7 +2291,9 @@ irqreturn_t mpp_dev_irq(int irq, void *param) /* normal condition, set state and wake up isr thread */ set_bit(TASK_STATE_IRQ, &task->state); } - mpp_iommu_dev_deactivate(mpp->iommu_info, mpp); + + if (irq_ret == IRQ_WAKE_THREAD) + mpp_iommu_dev_deactivate(mpp->iommu_info, mpp); } else { mpp_debug(DEBUG_IRQ_CHECK, "error, task is null\n"); }