From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
To: "Irui Wang (王瑞)" <Irui.Wang@mediatek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>
Cc: "dafna3@gmail.com" <dafna3@gmail.com>,
"tfiga@chromium.org" <tfiga@chromium.org>,
"Tiffany Lin (林慧珊)" <tiffany.lin@mediatek.com>,
"eizan@chromium.org" <eizan@chromium.org>,
"Maoguang Meng (孟毛广)" <Maoguang.Meng@mediatek.com>,
"kernel@collabora.com" <kernel@collabora.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"hverkuil@xs4all.nl" <hverkuil@xs4all.nl>,
"Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>,
"Yong Wu (吴勇)" <Yong.Wu@mediatek.com>,
"hsinyi@chromium.org" <hsinyi@chromium.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"Andrew-CT Chen (陳智迪)" <Andrew-CT.Chen@mediatek.com>,
"acourbot@chromium.org" <acourbot@chromium.org>
Subject: Re: [PATCH 5/5] media: mtk-vcodec: venc: Fail if a msg sent to VPU was not signaled
Date: Mon, 18 Oct 2021 13:43:13 +0200 [thread overview]
Message-ID: <8973bfb4-8708-e739-02cb-f9ee670f401a@collabora.com> (raw)
In-Reply-To: <6c56de481d7060b759d67417e9fa6383f6e2f418.camel@mediatek.com>
On 06.08.21 08:50, Irui Wang (王瑞) wrote:
> On Wed, 2021-08-04 at 16:27 +0200, Dafna Hirschfeld wrote:
>> Each message sent to the VPU should raise a signal. The signal
>> handler sets vpu->signaled. Test the field and fail
>> if it is 0.
>
> I suppose you want to handle the message execution result, if ipi
> message can't send or acked successfully, the returned "status" of
> "mtk_vcodec_fw_ipi_send" will return, so I think you don't need to
> check "signaled" again.
in that case, the field 'signaled' is not needed and can be removed
So I can send a patch to remove it.
Thanks,
Dafna
>
>>
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>> ---
>> drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
>> b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
>> index 234705ba7cd6..8331b1bd1971 100644
>> --- a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
>> +++ b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
>> @@ -92,6 +92,7 @@ static int vpu_enc_send_msg(struct venc_vpu_inst
>> *vpu, void *msg,
>> {
>> int status;
>>
>> + vpu->signaled = 0;
>> mtk_vcodec_debug_enter(vpu);
>>
>> if (!vpu->ctx->dev->fw_handler) {
>> @@ -106,6 +107,8 @@ static int vpu_enc_send_msg(struct venc_vpu_inst
>> *vpu, void *msg,
>> *(uint32_t *)msg, len, status);
>> return -EINVAL;
>> }
>> + if (!vpu->signaled)
>> + return -EINVAL;
>> if (vpu->failure)
>> return -EINVAL;
>>
>> @@ -122,7 +125,6 @@ int vpu_enc_init(struct venc_vpu_inst *vpu)
>> mtk_vcodec_debug_enter(vpu);
>>
>> init_waitqueue_head(&vpu->wq_hd);
>> - vpu->signaled = 0;
>> vpu->failure = 0;
>>
>> status = mtk_vcodec_fw_ipi_register(vpu->ctx->dev->fw_handler,
>> vpu->id,
prev parent reply other threads:[~2021-10-18 11:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 14:27 [PATCH 0/5] media: mtk-vcodec: venc: variouse bug fixes Dafna Hirschfeld
2021-08-04 14:27 ` [PATCH 1/5] media: mtk-vcodec: enter ABORT state if encoding failed Dafna Hirschfeld
2021-08-04 14:27 ` [PATCH 2/5] media: mtk-vcodec: call v4l2_m2m_ctx_release first when file is released Dafna Hirschfeld
2021-08-04 14:27 ` [PATCH 3/5] media: mtk-vcodec: change the venc handler funcs to return int Dafna Hirschfeld
2021-08-04 14:27 ` [PATCH 4/5] media: mtk-vcodec: Add two error cases upon vpu irq handling Dafna Hirschfeld
2021-08-06 6:58 ` Irui Wang (王瑞)
2021-08-06 7:48 ` Dafna Hirschfeld
[not found] ` <HK0PR03MB302713CFF1F1E79AD99737679DF69@HK0PR03MB3027.apcprd03.prod.outlook.com>
2021-08-09 8:26 ` 答复: " Dafna Hirschfeld
2021-08-09 9:12 ` 答复: " Irui Wang (王瑞)
2021-08-11 10:14 ` Dafna Hirschfeld
2021-11-03 20:50 ` Dafna Hirschfeld
2021-11-04 1:38 ` Irui Wang
2021-11-04 6:50 ` Dafna Hirschfeld
2021-11-04 9:16 ` Irui Wang
2021-11-04 9:23 ` Dafna Hirschfeld
2021-11-04 9:51 ` Irui Wang
2021-11-04 10:26 ` Dafna Hirschfeld
2021-11-04 12:21 ` Irui Wang
2021-11-05 8:16 ` Dafna Hirschfeld
2021-11-06 7:02 ` Irui Wang
2021-11-09 13:12 ` Dafna Hirschfeld
2021-08-04 14:27 ` [PATCH 5/5] media: mtk-vcodec: venc: Fail if a msg sent to VPU was not signaled Dafna Hirschfeld
2021-08-06 6:50 ` Irui Wang (王瑞)
2021-10-18 11:43 ` Dafna Hirschfeld [this message]
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=8973bfb4-8708-e739-02cb-f9ee670f401a@collabora.com \
--to=dafna.hirschfeld@collabora.com \
--cc=Andrew-CT.Chen@mediatek.com \
--cc=Irui.Wang@mediatek.com \
--cc=Maoguang.Meng@mediatek.com \
--cc=Yong.Wu@mediatek.com \
--cc=Yunfei.Dong@mediatek.com \
--cc=acourbot@chromium.org \
--cc=dafna3@gmail.com \
--cc=eizan@chromium.org \
--cc=hsinyi@chromium.org \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=tfiga@chromium.org \
--cc=tiffany.lin@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;
as well as URLs for NNTP newsgroup(s).