From patchwork Fri Jun 14 01:02:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 10993991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D155076 for ; Fri, 14 Jun 2019 01:03:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFE4426E90 for ; Fri, 14 Jun 2019 01:03:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B438627528; Fri, 14 Jun 2019 01:03:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52E3126E90 for ; Fri, 14 Jun 2019 01:03:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8ECD892F3; Fri, 14 Jun 2019 01:03:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7AE96892F3 for ; Fri, 14 Jun 2019 01:03:08 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id x17so656580wrl.9 for ; Thu, 13 Jun 2019 18:03:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+EV7DG8i07w38rTd1k2CcWOZS1S6GGa4Mr7+B4XkO7M=; b=maAossrRv+1ClXUzlKzWDwMSrdvrgP3Vj2THQEAm8YPYKx/7oCdjXhuja8HRk1xR+O fvHmwYS9QvxXjoSf1fHXEqlBOb8jwAv546gENSM1T3dTF2N4HpBBRgaQlOAjEyOqob6R QAAuf0RYZxxtEYwQLyeQ9LBHwRmsbWbzAQU/9A69MoA51cEuNv2i3gBDMA8ZBFsn+I+0 a4UKVp+ufFrQdD/1Fdh8E2Wy7lwVrUVWxjMcOxU9GvmE3C+HD/PK+MrawdcutFU0f84j fJNfobftbLmOXM8f4ZMjSqGTNjyIYMl0YMtGGeCGDXZ6A+F564XqnA/ewUGFhzEkEElr DEHw== X-Gm-Message-State: APjAAAUjjsKZBoIahA2J8RO+mXvKUrasu1GOePxSrR+NzSIYp7x4fTDb YbCl3n4Q6E4y3Kq3nb7XeX0= X-Google-Smtp-Source: APXvYqzuBFsGZGklqTH+D6iW9N9NeQjHnth0STybblRODEa+D76ffLeUX/1dGRXXHPmOakPD+zw4ew== X-Received: by 2002:a5d:53c2:: with SMTP id a2mr9034856wrw.8.1560474187054; Thu, 13 Jun 2019 18:03:07 -0700 (PDT) Received: from mappy.world.mentorg.com (sjewanfw1-nat.mentorg.com. [139.181.7.34]) by smtp.gmail.com with ESMTPSA id r131sm1177476wmf.4.2019.06.13.18.03.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 13 Jun 2019 18:03:06 -0700 (PDT) From: Steve Longerbeam To: Philipp Zabel Subject: [PATCH] gpu: ipu-v3: image-convert: Enable double write reduction Date: Thu, 13 Jun 2019 18:02:55 -0700 Message-Id: <20190614010255.13593-1-slongerbeam@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+EV7DG8i07w38rTd1k2CcWOZS1S6GGa4Mr7+B4XkO7M=; b=dqzAr8lDzVrREDJu/eQH5cHbAFXP18GA93BzzRHGXmp+2enb6Phtfs9IxKmg82gKz6 EKaO8kLQlDE6p8hNbrlELjK+3KH4mNyV7BCdU9PqhEjMpbJ7ttOxV4U5mk9W4m+6blns p3Eh7SabkjaBcUr0MKJfp0xtCHpeQvfv3WyiR+NeGLjYq0C7uk2zjqI+8rI1uOoCwxE3 IsBD12tP5GWeJuJkjhGFdOZNjvtDUCB52OG6RZDcHORLHAih8qV/DI049lBLYsWV7KUZ D6jwmEJy9QhMA6rBa8e9qPuxIEaZjemM8bP7C4FuOfETwYSKXrbEW93w563q6MXpDqsb KM0Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: open list , "open list:DRM DRIVERS FOR FREESCALE IMX" , Steve Longerbeam MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;