[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e31090c371ae7f7999b0aa983a20f33451cc89fb.camel@collabora.com>
Date: Tue, 10 Jul 2018 16:57:34 -0300
From: Ezequiel Garcia <ezequiel@...labora.com>
To: Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Maxime Ripard <maxime.ripard@...tlin.com>,
Chen-Yu Tsai <wens@...e.org>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Marco Franchi <marco.franchi@....com>,
Icenowy Zheng <icenowy@...c.io>,
Hans Verkuil <hverkuil@...all.nl>,
Keiichi Watanabe <keiichiw@...omium.org>,
Jonathan Corbet <corbet@....net>,
Smitha T Murthy <smitha.t@...sung.com>,
Tom Saeger <tom.saeger@...cle.com>,
Andrzej Hajda <a.hajda@...sung.com>,
"David S . Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Randy Dunlap <rdunlap@...radead.org>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Jacob Chen <jacob-chen@...wrt.com>,
Neil Armstrong <narmstrong@...libre.com>,
Benoit Parrot <bparrot@...com>,
Todor Tomov <todor.tomov@...aro.org>,
Alexandre Courbot <acourbot@...omium.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Pawel Osciak <posciak@...omium.org>,
Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
Hans de Goede <hdegoede@...hat.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
linux-sunxi@...glegroups.com,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Hugues Fruchet <hugues.fruchet@...com>,
Randy Li <ayaka@...lik.info>
Subject: Re: [PATCH v5 18/22] media: platform: Add Sunxi-Cedrus VPU decoder
driver
Hey Paul,
My comments on v4 of course apply here as well.
One other thing...
On Tue, 2018-07-10 at 10:01 +0200, Paul Kocialkowski wrote:
> This introduces the Sunxi-Cedrus VPU driver that supports the VPU
> found
> in Allwinner SoCs, also known as Video Engine. It is implemented
> through
> a v4l2 m2m decoder device and a media device (used for media
> requests).
> So far, it only supports MPEG2 decoding.
>
> Since this VPU is stateless, synchronization with media requests is
> required in order to ensure consistency between frame headers that
> contain metadata about the frame to process and the raw slice data
> that
> is used to generate the frame.
>
> This driver was made possible thanks to the long-standing effort
> carried out by the linux-sunxi community in the interest of reverse
> engineering, documenting and implementing support for Allwinner VPU.
>
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>
>
[..]
> +
> +static irqreturn_t cedrus_bh(int irq, void *data)
> +{
> + struct cedrus_dev *dev = data;
> + struct cedrus_ctx *ctx;
> +
> + ctx = v4l2_m2m_get_curr_priv(dev->m2m_dev);
> + if (!ctx) {
> + v4l2_err(&dev->v4l2_dev,
> + "Instance released before the end of
> transaction\n");
> + return IRQ_HANDLED;
> + }
> +
> + v4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx);
> +
I don't like the fact that v4l2_m2m_job_finish calls .device_run
reentrantly. Let me try to make v4l2_m2m_job_finish() safe to be called
in atomic context, so hopefully drivers can just call it in the top-
half.
You are returning the buffers in the top-half, so this is just a matter
or better design, not a performance improvement.
Thanks,
Eze
Powered by blists - more mailing lists