Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2965317ybc; Thu, 14 Nov 2019 01:48:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyB3yYRfpH4tENPr0o65HmeTWeEmR4uZiXtg+TNtb/8U0d5lmqqzPnj9UZnVSWKieHX4wol X-Received: by 2002:a05:6402:886:: with SMTP id e6mr143052edy.46.1573724937962; Thu, 14 Nov 2019 01:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573724937; cv=none; d=google.com; s=arc-20160816; b=YFBZGWBQncfWFuIeLReRn3lTpwDP3THm1/C4hsjlEaYF+szI3AsLda8euRqvJhDdxW D/uOS96LhdufRSnjBObd7ivuYJZKxiqso6K92EM6/4MGMiv/XlVfTi0I/lTQggGwLwiA eZQwmyyDat4dadWNWAqSZQ6HHqgoHVl/CJ+QS+LPinrg+TUoik7j23qBfz68XJuW9pHM NdOOq9KBv813jpyBRNw3UV+IitOjOqhVlH1o10e987lCDbXlPrYxUMQZyq7pxbce9yq9 yXyZqTgtyKPaIbVoRX8OqivMMakuZvRT1e6IyYS1khmc+eGeko83LEa2jPz70zaBIHKs /rOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=LWCTGcggVJKBad+tXJ3/QEK4Foy4tiANAW6SzwfdjLw=; b=T4m2BL0RIrSzK5EJFFrxJGbpP6rppDP6wrll/suedLwKZvboLL93hGqPIu+2/kVp5L iZebkHKIvuHjBbrRQ+eSoARZWiloAiM6Xq2i32hwwWr26L3d6lPHaOMdADsv/tfVVNHO UJLME+SkMIWmO67gm5xBCcDKS9i75j+omxkwwPfzvFJUFumTj5aRSrmGdm54JEwTFapt obvUzKecD2+0z8h2XMgq211GjWgRM6QSmmgM1ipWt59/0OPVO3W+rwjr7BqQVwzUff9s cviJjeG21yWmuK6w0NWEOnjFI0rPPno4/XUdUFr0jBNYq2x2Z2yX+oJwueA/YlqPB2ek iNeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24si760232ejx.326.2019.11.14.01.48.33; Thu, 14 Nov 2019 01:48:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726796AbfKNJqF (ORCPT + 99 others); Thu, 14 Nov 2019 04:46:05 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47204 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbfKNJqF (ORCPT ); Thu, 14 Nov 2019 04:46:05 -0500 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 7504B28DADD; Thu, 14 Nov 2019 09:46:03 +0000 (GMT) Date: Thu, 14 Nov 2019 10:46:00 +0100 From: Boris Brezillon To: Ezequiel Garcia Cc: linux-media@vger.kernel.org, kernel@collabora.com, Tomasz Figa , linux-rockchip@lists.infradead.org, Heiko Stuebner , Jonas Karlman , Philipp Zabel , Chris Healy , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] media: hantro: Support color conversion via post-processing Message-ID: <20191114104600.5c6c3e26@collabora.com> In-Reply-To: <20191113175603.24742-3-ezequiel@collabora.com> References: <20191113175603.24742-1-ezequiel@collabora.com> <20191113175603.24742-3-ezequiel@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ezequiel, On Wed, 13 Nov 2019 14:56:02 -0300 Ezequiel Garcia wrote: > + > +int hantro_postproc_alloc(struct hantro_ctx *ctx) > +{ > + struct hantro_dev *vpu = ctx->dev; > + unsigned int i, buf_size; > + > + buf_size = ctx->dst_fmt.plane_fmt[0].sizeimage; > + > + for (i = 0; i < VB2_MAX_FRAME; ++i) { Don't we know at that point how big the queue is (vq->num_buffers)? Sounds a bit expensive to always allocate VB2_MAX_FRAME aux buffers. > + struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i]; > + > + /* > + * The buffers on this queue are meant as intermediate > + * buffers for the decoder, so no mapping is needed. > + */ > + priv->attrs = DMA_ATTR_NO_KERNEL_MAPPING; > + priv->cpu = dma_alloc_attrs(vpu->dev, buf_size, &priv->dma, > + GFP_KERNEL, priv->attrs); > + if (!priv->cpu) > + return -ENOMEM; > + priv->size = buf_size; > + } > + return 0; > +} Other than that, the post-proc extension looks pretty good. Thought it would be much more invasive than that. Reviewed-by: Boris Brezillon