linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
To: linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: dafna.hirschfeld@collabora.com, hverkuil@xs4all.nl,
	kernel@collabora.com, dafna3@gmail.com, mchehab@kernel.org,
	tfiga@chromium.org, tiffany.lin@mediatek.com,
	andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com,
	hsinyi@chromium.org, maoguang.meng@mediatek.com,
	irui.wang@mediatek.com, acourbot@chromium.org,
	Yunfei.Dong@mediatek.com, yong.wu@mediatek.com,
	eizan@chromium.org
Subject: [PATCH 1/5] media: mtk-vcodec: enter ABORT state if encoding failed
Date: Wed,  4 Aug 2021 16:27:25 +0200	[thread overview]
Message-ID: <20210804142729.7231-2-dafna.hirschfeld@collabora.com> (raw)
In-Reply-To: <20210804142729.7231-1-dafna.hirschfeld@collabora.com>

In case the encoding failed, we should set
ctx->state = MTK_STATE_ABORT, since this indicates
a fatal error and there is no point to continue
trying to encode in that case.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
index 416f356af363..1678c31bc9aa 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
@@ -1109,6 +1109,7 @@ static void mtk_venc_worker(struct work_struct *work)
 		dst_buf->vb2_buf.planes[0].bytesused = 0;
 		v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_ERROR);
 		mtk_v4l2_err("venc_if_encode failed=%d", ret);
+		ctx->state = MTK_STATE_ABORT;
 	} else {
 		v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE);
 		dst_buf->vb2_buf.planes[0].bytesused = enc_result.bs_size;
-- 
2.17.1


  reply	other threads:[~2021-08-04 14:32 UTC|newest]

Thread overview: 10+ 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 ` Dafna Hirschfeld [this message]
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
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

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=20210804142729.7231-2-dafna.hirschfeld@collabora.com \
    --to=dafna.hirschfeld@collabora.com \
    --cc=Yunfei.Dong@mediatek.com \
    --cc=acourbot@chromium.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=dafna3@gmail.com \
    --cc=eizan@chromium.org \
    --cc=hsinyi@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=irui.wang@mediatek.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=maoguang.meng@mediatek.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=tfiga@chromium.org \
    --cc=tiffany.lin@mediatek.com \
    --cc=yong.wu@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).