Message ID | 20210524110909.672432-37-tomi.valkeinen@ideasonboard.com |
---|---|
State | Accepted |
Commit | f4a87d54c5895a822b4b8ef518dd4f115e30a604 |
Headers | show |
Series | media: ti-vpe: cal: multistream & embedded data support | expand |
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index 62c45add4efe..fcc81024ae18 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; + + 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; - ctx->use_pix_proc = true; + ctx->pix_proc = ret; + } return 0; } diff --git a/drivers/media/platform/ti-vpe/cal.h b/drivers/media/platform/ti-vpe/cal.h index 42a3f8004077..29b865d1a238 100644 --- a/drivers/media/platform/ti-vpe/cal.h +++ b/drivers/media/platform/ti-vpe/cal.h @@ -88,6 +88,7 @@ struct cal_format_info { u32 code; /* Bits per pixel */ u8 bpp; + bool meta; }; /* buffer for one video frame */