diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2021-06-14 13:23:45 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-07-12 14:22:11 +0200 |
commit | f4a87d54c5895a822b4b8ef518dd4f115e30a604 (patch) | |
tree | 39ca9605b22e30f6f5f122995cc1c12b4fbecd15 /drivers/media/platform/ti-vpe/cal.c | |
parent | media: ti-vpe: cal: allow more than 1 source pads (diff) | |
download | wireguard-linux-f4a87d54c5895a822b4b8ef518dd4f115e30a604.tar.xz wireguard-linux-f4a87d54c5895a822b4b8ef518dd4f115e30a604.zip |
media: ti-vpe: cal: add embedded data support
Add support for capturing embedded data from the sensor. The only
difference with capturing pixel data and embedded data is that we need
to ensure the PIX PROC is disabled for embedded data so that CAL doesn't
repack the data.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/ti-vpe/cal.c')
-rw-r--r-- | drivers/media/platform/ti-vpe/cal.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index cce627c5519c..05bdc6d126d8 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -473,14 +473,17 @@ int cal_ctx_prepare(struct cal_ctx *ctx) { int ret; - ret = cal_reserve_pix_proc(ctx->cal); - if (ret < 0) { - ctx_err(ctx, "Failed to reserve pix proc: %d\n", ret); - return ret; - } + ctx->use_pix_proc = !ctx->fmtinfo->meta; - ctx->pix_proc = ret; - ctx->use_pix_proc = true; + if (ctx->use_pix_proc) { + ret = cal_reserve_pix_proc(ctx->cal); + if (ret < 0) { + ctx_err(ctx, "Failed to reserve pix proc: %d\n", ret); + return ret; + } + + ctx->pix_proc = ret; + } return 0; } |