summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>2021-06-03 13:49:58 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-08 16:06:16 +0200
commit42cb2a8f27d284b6c73dfc23bed4d6991f3bc1a3 (patch)
tree37cf7e462b0cfda6f16446b6be73683bc863afea /drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
parentd395a78db9eabd12633b39e05c80e803543b6590 (diff)
downloadlinux-42cb2a8f27d284b6c73dfc23bed4d6991f3bc1a3.tar.bz2
media: hantro: change hantro_codec_ops run prototype to return errors
Change hantro_codec_ops run prototype from 'void' to 'int'. This allows the driver to cancel the job if an error occurs while configuring the hardware. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/hantro/hantro_h1_jpeg_enc.c')
-rw-r--r--drivers/staging/media/hantro/hantro_h1_jpeg_enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c b/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
index b88dc4ed06db..56cf261a8e95 100644
--- a/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
+++ b/drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
@@ -88,7 +88,7 @@ hantro_h1_jpeg_enc_set_qtable(struct hantro_dev *vpu,
}
}
-void hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx)
+int hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx)
{
struct hantro_dev *vpu = ctx->dev;
struct vb2_v4l2_buffer *src_buf, *dst_buf;
@@ -136,6 +136,8 @@ void hantro_h1_jpeg_enc_run(struct hantro_ctx *ctx)
hantro_end_prepare_run(ctx);
vepu_write(vpu, reg, H1_REG_ENC_CTRL);
+
+ return 0;
}
void hantro_jpeg_enc_done(struct hantro_ctx *ctx)