From: Ezequiel Garcia <ezequiel@collabora.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
gregkh@linuxfoundation.org, mripard@kernel.org,
paul.kocialkowski@bootlin.com, wens@csie.org,
jernej.skrabec@siol.net, peng.fan@nxp.com,
hverkuil-cisco@xs4all.nl, dan.carpenter@oracle.com
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH v4 03/11] media: hantro: change hantro_codec_ops run prototype to return errors
Date: Wed, 03 Mar 2021 18:56:23 -0300 [thread overview]
Message-ID: <22a8ea464f4c7dcb7a90889f53d85f003b7c739a.camel@collabora.com> (raw)
In-Reply-To: <20210303113952.178519-4-benjamin.gaignard@collabora.com>
On Wed, 2021-03-03 at 12:39 +0100, Benjamin Gaignard wrote:
> Change hantro_codec_ops run prototype from 'void' to 'int'.
> This allow to cancel the job if an error occur while configuring
> the hardware.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> drivers/staging/media/hantro/hantro_drv.c | 4 +++-
> .../staging/media/hantro/hantro_g1_h264_dec.c | 6 ++++--
> .../media/hantro/hantro_g1_mpeg2_dec.c | 4 +++-
> .../staging/media/hantro/hantro_g1_vp8_dec.c | 6 ++++--
> .../staging/media/hantro/hantro_h1_jpeg_enc.c | 4 +++-
> drivers/staging/media/hantro/hantro_hw.h | 19 ++++++++++---------
> .../media/hantro/rk3399_vpu_hw_jpeg_enc.c | 4 +++-
> .../media/hantro/rk3399_vpu_hw_mpeg2_dec.c | 4 +++-
> .../media/hantro/rk3399_vpu_hw_vp8_dec.c | 6 ++++--
> 9 files changed, 37 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
> index e5f200e64993..ac1429f00b33 100644
> --- a/drivers/staging/media/hantro/hantro_drv.c
> +++ b/drivers/staging/media/hantro/hantro_drv.c
> @@ -161,7 +161,9 @@ static void device_run(void *priv)
>
> v4l2_m2m_buf_copy_metadata(src, dst, true);
>
> - ctx->codec_ops->run(ctx);
> + if (ctx->codec_ops->run(ctx))
> + goto err_cancel_job;
> +
> return;
>
> err_cancel_job:
> diff --git a/drivers/staging/media/hantro/hantro_g1_h264_dec.c b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
> index 845bef73d218..fcd4db13c9fe 100644
> --- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c
> +++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c
> @@ -273,13 +273,13 @@ static void set_buffers(struct hantro_ctx *ctx)
> vdpu_write_relaxed(vpu, ctx->h264_dec.priv.dma, G1_REG_ADDR_QTABLE);
> }
>
> -void hantro_g1_h264_dec_run(struct hantro_ctx *ctx)
> +int hantro_g1_h264_dec_run(struct hantro_ctx *ctx)
> {
> struct hantro_dev *vpu = ctx->dev;
>
> /* Prepare the H264 decoder context. */
> if (hantro_h264_dec_prepare_run(ctx))
> - return;
> + return -EINVAL;
This should be returning the value from hantro_h264_dec_prepare_run.
Thanks!
Ezequiel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-03-04 1:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 11:39 [PATCH v4 00/11] Add HANTRO G2/HEVC decoder support for IMX8MQ Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 01/11] media: hevc: Add fields and flags for hevc PPS Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 02/11] media: hevc: Add decode params control Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 03/11] media: hantro: change hantro_codec_ops run prototype to return errors Benjamin Gaignard
2021-03-03 21:56 ` Ezequiel Garcia [this message]
2021-03-05 9:24 ` Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 04/11] media: hantro: Define HEVC codec profiles and supported features Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 05/11] media: hantro: Add a field to distinguish the hardware versions Benjamin Gaignard
2021-03-03 22:05 ` Ezequiel Garcia
2021-03-05 9:27 ` Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 06/11] media: uapi: Add a control for HANTRO driver Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 07/11] media: hantro: Introduce G2/HEVC decoder Benjamin Gaignard
2021-03-16 18:46 ` Ezequiel Garcia
2021-03-16 20:19 ` Benjamin Gaignard
2021-03-16 20:35 ` Ezequiel Garcia
2021-03-03 11:39 ` [PATCH v4 08/11] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 09/11] media: hantro: IMX8M: add variant for G2/HEVC codec Benjamin Gaignard
2021-03-03 22:08 ` Ezequiel Garcia
2021-03-05 9:32 ` Benjamin Gaignard
2021-03-03 11:39 ` [PATCH v4 10/11] dt-bindings: media: nxp,imx8mq-vpu: Update bindings Benjamin Gaignard
2021-03-08 20:08 ` Rob Herring
2021-03-03 11:39 ` [PATCH v4 11/11] arm64: dts: imx8mq: Add node to G2 hardware Benjamin Gaignard
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=22a8ea464f4c7dcb7a90889f53d85f003b7c739a.camel@collabora.com \
--to=ezequiel@collabora.com \
--cc=benjamin.gaignard@collabora.com \
--cc=dan.carpenter@oracle.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jernej.skrabec@siol.net \
--cc=kernel@collabora.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=paul.kocialkowski@bootlin.com \
--cc=peng.fan@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=wens@csie.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).