summaryrefslogtreecommitdiff
path: root/drivers/media/platform/verisilicon/hantro.h
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>2023-05-03 11:34:38 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-06-09 18:20:21 +0300
commit80c7373a456e71a41e40f0cfb32e32b9572262ce (patch)
tree36815bdf6ecb63a70c911a71c9fb094d74efe2c8 /drivers/media/platform/verisilicon/hantro.h
parent003afda97c6510f33d1ebcd96ca39661f3bf922f (diff)
downloadlinux-80c7373a456e71a41e40f0cfb32e32b9572262ce.tar.xz
media: verisilicon: Conditionally ignore native formats
AV1 film grain feature requires to use the postprocessor to produce valid frames. In such case the driver shouldn't propose native pixels format but only post-processed pixels format. Additionally if when setting a control a value could change capture queue pixels formats it is needed to call hantro_reset_raw_fmt(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/verisilicon/hantro.h')
-rw-r--r--drivers/media/platform/verisilicon/hantro.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h
index a98cb40a8d3b..6523ffb74881 100644
--- a/drivers/media/platform/verisilicon/hantro.h
+++ b/drivers/media/platform/verisilicon/hantro.h
@@ -231,6 +231,8 @@ struct hantro_dev {
* @ctrl_handler: Control handler used to register controls.
* @jpeg_quality: User-specified JPEG compression quality.
* @bit_depth: Bit depth of current frame
+ * @need_postproc: Set to true if the bitstream features require to
+ * use the post-processor.
*
* @codec_ops: Set of operations related to codec mode.
* @postproc: Post-processing context.
@@ -261,6 +263,7 @@ struct hantro_ctx {
const struct hantro_codec_ops *codec_ops;
struct hantro_postproc_ctx postproc;
+ bool need_postproc;
/* Specific for particular codec modes. */
union {