Skip to contentSkip to conversation

gpu: ipu-v3: image-convert: Enable double write reduction

PATCH In review Steve Longerbeam 2 participants 2 messages Jun 14, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu: ipu-v3: image-convert: 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 (skip odd chroma rows). This reduces necessary write memory bandwidth by at least 25% (more with rotation enabled).

---
 drivers/gpu/ipu-v3/ipu-image-convert.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/ipu-v3/ipu-image-convert.c +9 -0
index 36e88434513a..3036e01d8d42 100644
@@ -1279,6 +1279,15 @@ static void init_idmac_channel(struct ipu_image_convert_ctx *ctx,
 	if (rot_mode)
 		ipu_cpmem_set_rotation(channel, rot_mode);
 
+	/*
+	 * Skip writing U and V components to odd rows in the output
+	 * channels for planar 4:2:0.
+	 */
+	if ((channel == chan->out_chan ||
+	     channel == chan->rotation_out_chan) &&
+	    image->fmt->planar && image->fmt->uv_height_dec == 2)
+		ipu_cpmem_skip_odd_chroma_rows(channel);
+
 	if (channel == chan->rotation_in_chan ||
 	    channel == chan->rotation_out_chan) {
 		burst_size = 8;
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 6 lines · Steve Longerbeam

For the write channels with 4:2:0 subsampled YUV formats, avoid chroma overdraw by only writing chroma for even lines (skip odd chroma rows). This reduces necessary write memory bandwidth by at least 25% (more with rotation enabled).

Applied on imx-drm/next, thanks!

regards
Philipp