Message ID | 20210412113457.328012-17-tomi.valkeinen@ideasonboard.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: ti-vpe: cal: prepare for multistream support | expand |
Hi Tomi, Thank you for the patch. On Mon, Apr 12, 2021 at 02:34:45PM +0300, Tomi Valkeinen wrote: > Disable PPI and pix proc in cal_ctx_stop() to ensure they are not used > if the same context is used later on a different PHY or without pix > proc. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/media/platform/ti-vpe/cal.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c > index 092041ddbcfb..a6ca341c98bd 100644 > --- a/drivers/media/platform/ti-vpe/cal.c > +++ b/drivers/media/platform/ti-vpe/cal.c > @@ -484,6 +484,12 @@ void cal_ctx_stop(struct cal_ctx *ctx) > CAL_HL_IRQ_WDMA_START_MASK(ctx->dma_ctx)); > > ctx->dma.state = CAL_DMA_STOPPED; > + > + /* Disable PPI context */ > + cal_write(ctx->cal, CAL_CSI2_CTX(ctx->phy->instance, ctx->ppi_ctx), 0); > + > + /* Disable pix proc */ > + cal_write(ctx->cal, CAL_PIX_PROC(ctx->pix_proc), 0); > } > > /* ------------------------------------------------------------------
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index 092041ddbcfb..a6ca341c98bd 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -484,6 +484,12 @@ void cal_ctx_stop(struct cal_ctx *ctx) CAL_HL_IRQ_WDMA_START_MASK(ctx->dma_ctx)); ctx->dma.state = CAL_DMA_STOPPED; + + /* Disable PPI context */ + cal_write(ctx->cal, CAL_CSI2_CTX(ctx->phy->instance, ctx->ppi_ctx), 0); + + /* Disable pix proc */ + cal_write(ctx->cal, CAL_PIX_PROC(ctx->pix_proc), 0); } /* ------------------------------------------------------------------
Disable PPI and pix proc in cal_ctx_stop() to ensure they are not used if the same context is used later on a different PHY or without pix proc. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> --- drivers/media/platform/ti-vpe/cal.c | 6 ++++++ 1 file changed, 6 insertions(+)