linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpu: ipu-v3: image-convert: Enable double write reduction
@ 2019-06-14  1:02 Steve Longerbeam
  2019-06-14 14:12 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Longerbeam @ 2019-06-14  1:02 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Steve Longerbeam, open list:DRM DRIVERS FOR FREESCALE IMX, open list

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).

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
---
 drivers/gpu/ipu-v3/ipu-image-convert.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c
index 36e88434513a..3036e01d8d42 100644
--- a/drivers/gpu/ipu-v3/ipu-image-convert.c
+++ b/drivers/gpu/ipu-v3/ipu-image-convert.c
@@ -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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpu: ipu-v3: image-convert: Enable double write reduction
  2019-06-14  1:02 [PATCH] gpu: ipu-v3: image-convert: Enable double write reduction Steve Longerbeam
@ 2019-06-14 14:12 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2019-06-14 14:12 UTC (permalink / raw)
  To: Steve Longerbeam; +Cc: open list:DRM DRIVERS FOR FREESCALE IMX, open list

On Thu, 2019-06-13 at 18:02 -0700, Steve Longerbeam wrote:
> 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).
> 
> Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>

Applied on imx-drm/next, thanks!

regards
Philipp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-14 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14  1:02 [PATCH] gpu: ipu-v3: image-convert: Enable double write reduction Steve Longerbeam
2019-06-14 14:12 ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).