From: Boris Brezillon <boris.brezillon@collabora.com>
To: Ezequiel Garcia <ezequiel@collabora.com>
Cc: linux-media@vger.kernel.org, kernel@collabora.com,
Tomasz Figa <tfiga@chromium.org>,
linux-rockchip@lists.infradead.org,
Heiko Stuebner <heiko@sntech.de>, Jonas Karlman <jonas@kwiboo.se>,
Philipp Zabel <p.zabel@pengutronix.de>,
Chris Healy <cphealy@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] media: hantro: Support color conversion via post-processing
Date: Thu, 14 Nov 2019 10:46:00 +0100 [thread overview]
Message-ID: <20191114104600.5c6c3e26@collabora.com> (raw)
In-Reply-To: <20191113175603.24742-3-ezequiel@collabora.com>
Hi Ezequiel,
On Wed, 13 Nov 2019 14:56:02 -0300
Ezequiel Garcia <ezequiel@collabora.com> 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 <boris.brezillon@collabora.com>
next prev parent reply other threads:[~2019-11-14 9:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 17:56 [PATCH v3 0/3] Enable Hantro G1 post-processor Ezequiel Garcia
2019-11-13 17:56 ` [PATCH v3 1/3] media: hantro: Cleanup format negotiation helpers Ezequiel Garcia
2019-11-14 9:26 ` Philipp Zabel
2019-11-14 9:32 ` Boris Brezillon
2019-11-13 17:56 ` [PATCH v3 2/3] media: hantro: Support color conversion via post-processing Ezequiel Garcia
2019-11-14 9:46 ` Boris Brezillon [this message]
2019-11-14 9:48 ` Philipp Zabel
2019-11-15 15:44 ` Ezequiel Garcia
2019-11-15 16:10 ` Philipp Zabel
2019-12-05 14:33 ` Ezequiel Garcia
2019-12-05 14:46 ` Philipp Zabel
2019-12-05 16:02 ` Ezequiel Garcia
2019-11-13 17:56 ` [PATCH v3 3/3] media: vidioc-enum-fmt.rst: clarify format preference Ezequiel Garcia
2019-11-14 9:32 ` Boris Brezillon
2020-02-09 19:52 ` [PATCH v3 0/3] Enable Hantro G1 post-processor Nicolas Dufresne
2020-02-10 2:45 ` Tomasz Figa
2020-02-11 4:16 ` Nicolas Dufresne
2020-02-11 16:22 ` Nicolas Dufresne
2020-02-12 7:06 ` Tomasz Figa
2020-02-19 21:06 ` Nicolas Dufresne
2020-03-09 11:11 ` Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191114104600.5c6c3e26@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=cphealy@gmail.com \
--cc=ezequiel@collabora.com \
--cc=heiko@sntech.de \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=tfiga@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).