summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-05-22 11:24:40 +0800
committerLiu Ying <Ying.Liu@freescale.com>2015-05-22 18:18:27 +0800
commitd545ab54a52c46fb4da13298a0bab93476c9c0d9 (patch)
tree25d2036fea9be569aad18c50a1db2d5388cab397
parent15c9f3a7599c0c9a4de336bc678a284a7aa1b8d8 (diff)
MLK-10862-2 mxc IPUv3: cpmem: SMFC chan 12bit 3 planar burst size fixup
There are some little horizontal stripes on the I420 interlaced frames captured by i.MX6QP SMFC channels but not i.MX6Q Rev1. Changing the IDMAC burst size from 32pixel to 16pixel may workaround this issue which is recorded by TKT266260. The capture performance is expected to be dropped as the burst size is half. The exact performance drop data is not known since the video input device's output is not tough enough to push the capture to it's boundary. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit dc7ba9d506e7a438cd342e02977f3455fbe05cd2)
-rw-r--r--drivers/mxc/ipu3/ipu_common.c7
-rw-r--r--drivers/mxc/ipu3/ipu_param_mem.h15
-rw-r--r--drivers/mxc/ipu3/ipu_prv.h2
3 files changed, 22 insertions, 2 deletions
diff --git a/drivers/mxc/ipu3/ipu_common.c b/drivers/mxc/ipu3/ipu_common.c
index 996299bc67c4..3c19a35cb126 100644
--- a/drivers/mxc/ipu3/ipu_common.c
+++ b/drivers/mxc/ipu3/ipu_common.c
@@ -312,6 +312,7 @@ struct ipu_platform_type {
unsigned int ch27_axi;
unsigned int ch28_axi;
unsigned int normal_axi;
+ bool smfc_idmac_12bit_3planar_bs_fixup; /* workaround little stripes */
bool idmac_used_bufs_en_r;
bool idmac_used_bufs_en_w;
unsigned int idmac_used_bufs_max_r;
@@ -345,6 +346,7 @@ static struct ipu_platform_type ipu_type_imx51 = {
.ch27_axi = 1,
.ch28_axi = 1,
.normal_axi = 0,
+ .smfc_idmac_12bit_3planar_bs_fixup = false,
};
static struct ipu_platform_type ipu_type_imx53 = {
@@ -375,6 +377,7 @@ static struct ipu_platform_type ipu_type_imx53 = {
.normal_axi = 0,
.idmac_used_bufs_en_r = false,
.idmac_used_bufs_en_w = false,
+ .smfc_idmac_12bit_3planar_bs_fixup = false,
};
static struct ipu_platform_type ipu_type_imx6q = {
@@ -405,6 +408,7 @@ static struct ipu_platform_type ipu_type_imx6q = {
.normal_axi = 1,
.idmac_used_bufs_en_r = false,
.idmac_used_bufs_en_w = false,
+ .smfc_idmac_12bit_3planar_bs_fixup = false,
};
static struct ipu_platform_type ipu_type_imx6qp = {
@@ -437,6 +441,7 @@ static struct ipu_platform_type ipu_type_imx6qp = {
.idmac_used_bufs_en_w = true,
.idmac_used_bufs_max_r = 0x3,
.idmac_used_bufs_max_w = 0x3,
+ .smfc_idmac_12bit_3planar_bs_fixup = true,
};
static const struct of_device_id imx_ipuv3_dt_ids[] = {
@@ -495,6 +500,8 @@ static int ipu_probe(struct platform_device *pdev)
ipu->ch27_axi = iputype->ch27_axi;
ipu->ch28_axi = iputype->ch28_axi;
ipu->normal_axi = iputype->normal_axi;
+ ipu->smfc_idmac_12bit_3planar_bs_fixup =
+ iputype->smfc_idmac_12bit_3planar_bs_fixup;
spin_lock_init(&ipu->int_reg_spin_lock);
spin_lock_init(&ipu->rdy_reg_spin_lock);
mutex_init(&ipu->mutex_lock);
diff --git a/drivers/mxc/ipu3/ipu_param_mem.h b/drivers/mxc/ipu3/ipu_param_mem.h
index a97a7d416830..266d4d20beea 100644
--- a/drivers/mxc/ipu3/ipu_param_mem.h
+++ b/drivers/mxc/ipu3/ipu_param_mem.h
@@ -253,6 +253,7 @@ static inline void _ipu_ch_param_init(struct ipu_soc *ipu, int ch,
{
uint32_t u_offset = 0;
uint32_t v_offset = 0;
+ uint32_t bs = 0;
int32_t sub_ch = 0;
struct ipu_ch_param params;
@@ -405,7 +406,12 @@ static inline void _ipu_ch_param_init(struct ipu_soc *ipu, int ch,
ipu_ch_param_set_field(&params, 1, 78, 7, 15); /* burst size */
uv_stride = uv_stride*2;
} else {
- ipu_ch_param_set_field(&params, 1, 78, 7, 31); /* burst size */
+ if (_ipu_is_smfc_chan(ch) &&
+ ipu->smfc_idmac_12bit_3planar_bs_fixup)
+ bs = 15;
+ else
+ bs = 31;
+ ipu_ch_param_set_field(&params, 1, 78, 7, bs); /* burst size */
}
break;
case IPU_PIX_FMT_YVU420P:
@@ -420,7 +426,12 @@ static inline void _ipu_ch_param_init(struct ipu_soc *ipu, int ch,
ipu_ch_param_set_field(&params, 1, 78, 7, 15); /* burst size */
uv_stride = uv_stride*2;
} else {
- ipu_ch_param_set_field(&params, 1, 78, 7, 31); /* burst size */
+ if (_ipu_is_smfc_chan(ch) &&
+ ipu->smfc_idmac_12bit_3planar_bs_fixup)
+ bs = 15;
+ else
+ bs = 31;
+ ipu_ch_param_set_field(&params, 1, 78, 7, bs); /* burst size */
}
break;
case IPU_PIX_FMT_YVU422P:
diff --git a/drivers/mxc/ipu3/ipu_prv.h b/drivers/mxc/ipu3/ipu_prv.h
index 3d5c29305cf2..130d81102a39 100644
--- a/drivers/mxc/ipu3/ipu_prv.h
+++ b/drivers/mxc/ipu3/ipu_prv.h
@@ -148,6 +148,8 @@ struct ipu_soc {
unsigned int ch27_axi;
unsigned int ch28_axi;
unsigned int normal_axi;
+
+ bool smfc_idmac_12bit_3planar_bs_fixup; /* workaround little stripes */
};
struct ipu_channel {