diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2021-11-16 17:38:33 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-11-22 10:41:55 +0300 |
commit | 53a3e71095c572333ceea30762565dbedec951ca (patch) | |
tree | a75380c6191eef0afca05ecbfd4326d34be8501d /drivers/staging/media/hantro/hantro_postproc.c | |
parent | 04dad52ee341c738adfd929d5f2b906001a2aeda (diff) | |
download | linux-53a3e71095c572333ceea30762565dbedec951ca.tar.xz |
media: hantro: Simplify postprocessor
Add a 'postprocessed' boolean property to struct hantro_fmt
to signal that a format is produced by the post-processor.
This will allow to introduce the G2 post-processor in a simple way.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@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_postproc.c')
-rw-r--r-- | drivers/staging/media/hantro/hantro_postproc.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c index 882fb8bc5ddd..4549aec08feb 100644 --- a/drivers/staging/media/hantro/hantro_postproc.c +++ b/drivers/staging/media/hantro/hantro_postproc.c @@ -53,15 +53,9 @@ const struct hantro_postproc_regs hantro_g1_postproc_regs = { bool hantro_needs_postproc(const struct hantro_ctx *ctx, const struct hantro_fmt *fmt) { - struct hantro_dev *vpu = ctx->dev; - if (ctx->is_encoder) return false; - - if (!vpu->variant->postproc_fmts) - return false; - - return fmt->fourcc != V4L2_PIX_FMT_NV12; + return fmt->postprocessed; } static void hantro_postproc_g1_enable(struct hantro_ctx *ctx) |