Skip to content

Commit

Permalink
hantro: Make sure we don't use post-processor on an encoder
Browse files Browse the repository at this point in the history
Commit 986eee3 ("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: 986eee3 ("media: hantro: Prevent encoders from using post-processing")
Signed-off-by: Ezequiel Garcia <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
ezequielgarcia authored and sigmaris committed Aug 8, 2020
1 parent 73db7ad commit 3c2d96c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/staging/media/hantro/hantro_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3c2d96c

Please sign in to comment.