diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2020-07-01 15:16:07 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-07-19 13:26:06 +0200 |
commit | 46d7aaebbe441d5381e35d8e16df784690e65ef3 (patch) | |
tree | 400a92e60e58c4cfea2d3cbe56b6b615947ee904 | |
parent | b72a6342dd240ce8e15b7acf1c38c67a0c56092b (diff) | |
download | linux-46d7aaebbe441d5381e35d8e16df784690e65ef3.tar.gz |
hantro: Make sure we don't use post-processor on an encoder
Commit 986eee3a5234 ("media: hantro: Prevent encoders from using post-processing") fixed hantro_needs_postproc condition, but missed one case. Encoders don't have any post-processor hardware block, so also can't be disabled. Fix it. Fixes: 986eee3a5234 ("media: hantro: Prevent encoders from using post-processing") Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | drivers/staging/media/hantro/hantro_drv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index 34367b169011..d32b6b1ab70b 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -122,10 +122,12 @@ void hantro_start_prepare_run(struct hantro_ctx *ctx) v4l2_ctrl_request_setup(src_buf->vb2_buf.req_obj.req, &ctx->ctrl_handler); - if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt)) - hantro_postproc_enable(ctx); - else - hantro_postproc_disable(ctx); + if (!ctx->is_encoder) { + if (hantro_needs_postproc(ctx, ctx->vpu_dst_fmt)) + hantro_postproc_enable(ctx); + else + hantro_postproc_disable(ctx); + } } void hantro_end_prepare_run(struct hantro_ctx *ctx) |