From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Irui Wang <irui.wang@mediatek.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
nicolas.dufresne@collabora.com, sebastian.fricke@collabora.com
Cc: Longfei Wang <longfei.wang@mediatek.com>,
Maoguang Meng <maoguang.meng@mediatek.com>,
Project_Global_Chrome_Upstream_Group@mediatek.com,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] media: mediatek: vcodec: Handle invalid decoder vsi
Date: Wed, 20 Mar 2024 10:13:42 +0100 [thread overview]
Message-ID: <c09b063f-a11a-4bc0-8b12-3d66f692c48c@collabora.com> (raw)
In-Reply-To: <20240320061336.2615-1-irui.wang@mediatek.com>
Il 20/03/24 07:13, Irui Wang ha scritto:
> Handle invalid decoder vsi in vpu_dec_init to ensure the decoder vsi is
> valid for future use.
>
> Signed-off-by: Irui Wang <irui.wang@mediatek.com>
This commit needs a Fixes tag, can you please add the relevant one and resend?
Thanks,
Angelo
> ---
> .../media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c b/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c
> index 82e57ae983d5..17770993fe5a 100644
> --- a/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c
> +++ b/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c
> @@ -231,6 +231,12 @@ int vpu_dec_init(struct vdec_vpu_inst *vpu)
> mtk_vdec_debug(vpu->ctx, "vdec_inst=%p", vpu);
>
> err = vcodec_vpu_send_msg(vpu, (void *)&msg, sizeof(msg));
> +
> + if (IS_ERR_OR_NULL(vpu->vsi)) {
> + mtk_vdec_err(vpu->ctx, "invalid vdec vsi, status=%d", err);
> + return -EINVAL;
> + }
> +
> mtk_vdec_debug(vpu->ctx, "- ret=%d", err);
> return err;
> }
next prev parent reply other threads:[~2024-03-20 9:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 6:13 Irui Wang
2024-03-20 9:13 ` AngeloGioacchino Del Regno [this message]
2024-03-21 1:55 ` Irui Wang (王瑞)
2024-03-22 14:44 ` Nicolas Dufresne
2024-03-23 1:45 ` Irui Wang (王瑞)
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=c09b063f-a11a-4bc0-8b12-3d66f692c48c@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=irui.wang@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=longfei.wang@mediatek.com \
--cc=maoguang.meng@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=sebastian.fricke@collabora.com \
--cc=yunfei.dong@mediatek.com \
/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
all inboxes | Powered by JetHome®