Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b54a5c2d authored by Steve Longerbeam's avatar Steve Longerbeam Committed by Mauro Carvalho Chehab
Browse files

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: default avatarSteve Longerbeam <steve_longerbeam@mentor.com>
Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 4560cb4a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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;