diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2017-07-22 17:21:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-08 06:32:52 -0400 |
commit | b54a5c2dc83a96d6a9e1b114fd47c5b5dc8e8be5 (patch) | |
tree | b1a117e96bc5b21e1d951d55d3755da4a0d233e9 /drivers | |
parent | 4560cb4a0c9969260356b0ac9473c45bb1c1101d (diff) |
media: imx: prpencvf: enable double write reduction
For the write channels with 4:2:0 subsampled YUV formats, avoid chroma
overdraw by only writing chroma for even lines. Reduces necessary write
memory bandwidth by at least 25% (more with rotation enabled).
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/imx/imx-ic-prpencvf.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index ed363fe3b3d0..42c5045e397e 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -374,6 +374,17 @@ static int prp_setup_channel(struct prp_priv *priv, image.phys0 = addr0; image.phys1 = addr1; + if (channel == priv->out_ch || channel == priv->rot_out_ch) { + switch (image.pix.pixelformat) { + case V4L2_PIX_FMT_YUV420: + case V4L2_PIX_FMT_YVU420: + case V4L2_PIX_FMT_NV12: + /* Skip writing U and V components to odd rows */ + ipu_cpmem_skip_odd_chroma_rows(channel); + break; + } + } + ret = ipu_cpmem_set_image(channel, &image); if (ret) return ret; |