Message ID | 20210524110909.672432-32-tomi.valkeinen@ideasonboard.com |
---|---|
State | Accepted |
Commit | 892c37f8a3d673b945e951a8754695c119a2b1b0 |
Headers | show |
Series | media: ti-vpe: cal: multistream & embedded data support | expand |
Hi Tomi, Thank you for the patch. On Mon, May 24, 2021 at 02:09:02PM +0300, Tomi Valkeinen wrote: > When starting streaming the driver currently programs the buffer > address to the CAL base-address register and assigns the buffer pointer > to ctx->dma.pending. This is not correct, as the buffer is not > "pending", but active, and causes the first buffer to be needlessly > written twice. > > Fix this by assigning the buffer pointer to ctx->dma.active. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/media/platform/ti-vpe/cal-video.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti-vpe/cal-video.c > index d06488cb8c36..efa08a9ccbd5 100644 > --- a/drivers/media/platform/ti-vpe/cal-video.c > +++ b/drivers/media/platform/ti-vpe/cal-video.c > @@ -731,7 +731,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) > > spin_lock_irq(&ctx->dma.lock); > buf = list_first_entry(&ctx->dma.queue, struct cal_buffer, list); > - ctx->dma.pending = buf; > + ctx->dma.active = buf; > list_del(&buf->list); > spin_unlock_irq(&ctx->dma.lock); > -- Regards, Laurent Pinchart
diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti-vpe/cal-video.c index d06488cb8c36..efa08a9ccbd5 100644 --- a/drivers/media/platform/ti-vpe/cal-video.c +++ b/drivers/media/platform/ti-vpe/cal-video.c @@ -731,7 +731,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count) spin_lock_irq(&ctx->dma.lock); buf = list_first_entry(&ctx->dma.queue, struct cal_buffer, list); - ctx->dma.pending = buf; + ctx->dma.active = buf; list_del(&buf->list); spin_unlock_irq(&ctx->dma.lock);
When starting streaming the driver currently programs the buffer address to the CAL base-address register and assigns the buffer pointer to ctx->dma.pending. This is not correct, as the buffer is not "pending", but active, and causes the first buffer to be needlessly written twice. Fix this by assigning the buffer pointer to ctx->dma.active. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> --- drivers/media/platform/ti-vpe/cal-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)