From 981980643e5e5b14894e6e497c7702734df13923 Mon Sep 17 00:00:00 2001 From: Cho KyongHo Date: Wed, 15 Jul 2015 14:08:01 +0900 Subject: [PATCH] [COMMON] media: smfc: disable timeout interrupt during HWFC is on If HWFC is enabled, MC Scaler that generates the source image of SMFC may starts significantly later than SMFC. We have observed that SMFC asserts timeout if MC Scalert starts working in the mean time. To prevent unexpected timeout interrupt, it is reqruied to disable the timeout interrupt. Instead of timeout interrupt, hurry threashold interrupt should be used to detect a problem during compression. Change-Id: I92d3bf5bfcceb7f757a8600d3623da4127e1519c Signed-off-by: Cho KyongHo --- drivers/media/platform/exynos/smfc/smfc-regs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/platform/exynos/smfc/smfc-regs.c b/drivers/media/platform/exynos/smfc/smfc-regs.c index 619d547cfd9f..97f8f2516685 100644 --- a/drivers/media/platform/exynos/smfc/smfc-regs.c +++ b/drivers/media/platform/exynos/smfc/smfc-regs.c @@ -330,6 +330,16 @@ void smfc_hwconfigure_start(struct smfc_ctx *ctx, /* configure "Error max compressed size" interrupt */ cfg = __raw_readl(base + REG_INT_EN); + if (hwfc_en) { + /* + * Timer interrupt should be disabled if HWFC is enabled. + * Instead OTF_EMU_HURRY_THRESHOLD interrupt is used for HWFC + * that is asserted when the synchronization between SMFC and + * MC-Scaler is broken. + */ + cfg &= ~(1 << 5); + cfg |= 1 << 12; + } __raw_writel(cfg | (1 << 11), base + REG_INT_EN); cfg = __raw_readl(base + REG_MAIN_JPEG_CNTL) & ~JPEG_CNTL_CODECON_MASK; -- 2.20.1