[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <361ec02b1af1093684dfd33806025f3d044fc6e2.camel@collabora.com>
Date: Wed, 17 Feb 2021 17:11:28 -0300
From: Ezequiel Garcia <ezequiel@...labora.com>
To: Benjamin Gaignard <benjamin.gaignard@...labora.com>,
p.zabel@...gutronix.de, mchehab@...nel.org, robh+dt@...nel.org,
shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
festevam@...il.com, linux-imx@....com, gregkh@...uxfoundation.org,
mripard@...nel.org, paul.kocialkowski@...tlin.com, wens@...e.org,
jernej.skrabec@...l.net, krzk@...nel.org, shengjiu.wang@....com,
adrian.ratiu@...labora.com, aisheng.dong@....com, peng.fan@....com,
Anson.Huang@....com, hverkuil-cisco@...all.nl
Cc: linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
kernel@...labora.com
Subject: Re: [PATCH v1 06/18] media: hantro: Make sure that ctx->codex_ops
is set
On Wed, 2021-02-17 at 09:02 +0100, Benjamin Gaignard wrote:
> Do not try to call ctx->codec_ops->done if ctx->codec_ops is not set.
>
If codec_ops is not set for a codec variant,
things will go south really fast. See hantro_start_streaming
for instance.
I think you can just drop this patch.
Thanks,
Ezequiel
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
> Signed-off-by: Ezequiel Garcia <ezequiel@...labora.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@...labora.com>
> ---
> drivers/staging/media/hantro/hantro_drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
> index 0d58209fc55c..0570047c7fa0 100644
> --- a/drivers/staging/media/hantro/hantro_drv.c
> +++ b/drivers/staging/media/hantro/hantro_drv.c
> @@ -93,7 +93,8 @@ void hantro_irq_done(struct hantro_dev *vpu,
> * and will take care of finishing the job.
> */
> if (cancel_delayed_work(&vpu->watchdog_work)) {
> - if (result == VB2_BUF_STATE_DONE && ctx->codec_ops->done)
> + if (result == VB2_BUF_STATE_DONE &&
> + ctx->codec_ops && ctx->codec_ops->done)
> ctx->codec_ops->done(ctx);
> hantro_job_finish(vpu, ctx, result);
> }
Powered by blists - more mailing lists