diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2015-09-11 16:09:57 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 11:01:47 -0600 |
commit | 8573397f949fd03652cd8524b693cd4f0450b096 (patch) | |
tree | a7478e60f33a74109fcedbaab3e69df280439eda /include | |
parent | ddc8d0d199721e8eb490103a4c8e5ebd8c0ef13f (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>
(cherry picked from commit cf7df46e3b1d2142ff354498982194247bf07fea)
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ipu-v3-pre.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ipu-v3-pre.h b/include/linux/ipu-v3-pre.h index 2b36d34d25fc..1bf50aeda170 100644 --- a/include/linux/ipu-v3-pre.h +++ b/include/linux/ipu-v3-pre.h @@ -13,6 +13,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; @@ -66,6 +67,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); |