summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-09-11 16:09:57 +0800
committerLiu Ying <Ying.Liu@freescale.com>2015-09-18 18:04:01 +0800
commitcf7df46e3b1d2142ff354498982194247bf07fea (patch)
treecfd8e17dd068073534f171c1a22c43ce84964e17 /include/linux
parente64bbcd9243a17f9eba9cb3abb6f2c1939eae110 (diff)
MLK-11316-2 mxc IPUv3: PRE: Define small Y resolution
In order to workaround the PRE SoC bug recorded by errata ERR009624, the software cannot write the PRE_CTRL register when the PRE writes the PRE_CTRL register automatically to set the ENABLE bit(bit0) to 1 in the PRE repeat mode. The software mechanism to set the PRE_CTRL register is different for PRE Y resolution higher than 9 lines and lower than or equal to 9 lines. So, this patch defines the small Y resolution and adds a helper to check the Y resolution. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ipu-v3-pre.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ipu-v3-pre.h b/include/linux/ipu-v3-pre.h
index 44fff478da15..29a18b683ed1 100644
--- a/include/linux/ipu-v3-pre.h
+++ b/include/linux/ipu-v3-pre.h
@@ -20,6 +20,7 @@
#define IPU_PRE_MAX_WIDTH 1920
#define IPU_PRE_MAX_BPP 4
+#define IPU_PRE_SMALL_LINE 9 /* to workaround errata ERR009624*/
struct ipu_rect {
int left;
@@ -73,6 +74,20 @@ struct ipu_pre_context {
unsigned long store_addr;
};
+/*
+ * In order to workaround the PRE SoC bug recorded by errata ERR009624,
+ * the software cannot write the PRE_CTRL register when the PRE writes
+ * the PRE_CTRL register automatically to set the ENABLE bit(bit0) to 1
+ * in the PRE repeat mode.
+ * The software mechanism to set the PRE_CTRL register is different for
+ * PRE Y resolution higher than 9 lines and lower or equal to 9 lines.
+ * Use this helper to check the Y resolution.
+ */
+static inline bool ipu_pre_yres_is_small(unsigned int yres)
+{
+ return yres <= IPU_PRE_SMALL_LINE;
+}
+
#ifdef CONFIG_MXC_IPU_V3_PRE
int ipu_pre_alloc(int ipu_id, ipu_channel_t ipu_ch);
void ipu_pre_free(unsigned int *id);