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>
/* 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;