[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXv+5GU3f40BijQxazGVtJ0o9rZY_cux9mxRUEtXYHF2Oz-UQ@mail.gmail.com>
Date: Fri, 8 Oct 2021 18:30:26 +0800
From: Chen-Yu Tsai <wenst@...omium.org>
To: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
Cc: Linux Media Mailing List <linux-media@...r.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
linux-staging@...ts.linux.dev,
Benjamin Gaignard <benjamin.gaignard@...labora.com>,
Boris Brezillon <boris.brezillon@...labora.com>,
Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
Fabio Estevam <festevam@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Heiko Stuebner <heiko@...ech.de>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>, kernel@...labora.com,
Ezequiel Garcia <ezequiel@...labora.com>,
Adrian Ratiu <adrian.ratiu@...labora.com>
Subject: Re: [PATCH v7 07/11] media: rkvdec: Add the VP9 backend
Hi,
On Thu, Sep 30, 2021 at 12:07 AM Andrzej Pietrasiewicz
<andrzej.p@...labora.com> wrote:
>
> From: Boris Brezillon <boris.brezillon@...labora.com>
>
> The Rockchip VDEC supports VP9 profile 0 up to 4096x2304@...ps. Add
> a backend for this new format.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@...labora.com>
> Signed-off-by: Ezequiel Garcia <ezequiel@...labora.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@...labora.com>
> Co-developed-by: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
> ---
> drivers/staging/media/rkvdec/Kconfig | 1 +
> drivers/staging/media/rkvdec/Makefile | 2 +-
> drivers/staging/media/rkvdec/rkvdec-vp9.c | 1078 +++++++++++++++++++++
> drivers/staging/media/rkvdec/rkvdec.c | 52 +-
> drivers/staging/media/rkvdec/rkvdec.h | 12 +-
> 5 files changed, 1137 insertions(+), 8 deletions(-)
> create mode 100644 drivers/staging/media/rkvdec/rkvdec-vp9.c
>
[...]
> diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
> index 7131156c1f2c..6aa8aca66547 100644
> --- a/drivers/staging/media/rkvdec/rkvdec.c
> +++ b/drivers/staging/media/rkvdec/rkvdec.c
[...]
> @@ -319,7 +354,7 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
> struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
> const struct rkvdec_coded_fmt_desc *desc;
> struct v4l2_format *cap_fmt;
> - struct vb2_queue *peer_vq;
> + struct vb2_queue *peer_vq, *vq;
> int ret;
>
> /*
> @@ -331,6 +366,15 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
> if (vb2_is_busy(peer_vq))
> return -EBUSY;
>
> + /*
> + * Some codecs like VP9 can contain dynamic resolution changes which
> + * are currently not supported by the V4L2 API or driver, so return
> + * an error if userspace tries to reconfigure the output format.
> + */
> + vq = v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
> + if (vb2_is_busy(vq))
> + return -EINVAL;
This check is already done in rkvdec_s_fmt(), though it returns -EBUSY
instead. And I don't see similar changes to Hantro, so maybe this isn't
an API limitation as described in the comment? My recent patch [1] also
loosens the restrictions on this.
ChenYu
[1] https://lore.kernel.org/linux-media/20211008100423.739462-3-wenst@chromium.org/
> +
> ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_output_fmt);
> if (ret)
> return ret;
Powered by blists - more mailing lists