[COMMON] media: smfc: disable timeout interrupt during HWFC is on
authorCho KyongHo <pullip.cho@samsung.com>
Wed, 15 Jul 2015 05:08:01 +0000 (14:08 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:19 +0000 (20:22 +0300)
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 <pullip.cho@samsung.com>
drivers/media/platform/exynos/smfc/smfc-regs.c

index 619d547cfd9feed84d475779fbbde6d50a0a3ae1..97f8f25166855770336abb3804bac7182c6cb571 100644 (file)
@@ -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;