[PATCH] [media] imx: csi: enable double write reduction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For 4:2:0 subsampled YUV formats, avoid chroma overdraw by only writing
chroma for even lines. Reduces necessary write memory bandwidth by 25%.

Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
 drivers/staging/media/imx/imx-media-csi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index a2d26693912ec..0fb70d5a9e7fe 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -388,6 +388,12 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
 			goto unsetup_vb2;
 	}
 
+	switch (image.pix.pixelformat) {
+	case V4L2_PIX_FMT_YUV420:
+	case V4L2_PIX_FMT_NV12:
+		ipu_cpmem_skip_odd_chroma_rows(priv->idmac_ch);
+	}
+
 	ipu_cpmem_set_burstsize(priv->idmac_ch, burst_size);
 
 	/*
-- 
2.11.0




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux