]> git.baikalelectronics.ru Git - kernel.git/commit
media: ti-vpe: cal: Set cal_dmaqueue.pending to NULL when no pending buffer
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 6 Dec 2020 23:53:50 +0000 (00:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 4 Jan 2021 11:13:09 +0000 (12:13 +0100)
commit0dc8d567ee387d013d3608886e923022de5c249c
tree6ea3a865232b7ff02c6d092fa14ec60e1aef3ae7
parentcf26cd98ea3bbdea1145edd3f5fcd996b4a83828
media: ti-vpe: cal: Set cal_dmaqueue.pending to NULL when no pending buffer

When a pending buffer becomes active, the cal_dmaqueue.active field is
updated, but the pending field keeps the same value until a new buffer
becomes pending. This requires handling the special case of
pending == active in different places. Simplify the code by setting the
pending field to NULL when the pending buffer becomes active. Buffers
are now simply moved from queue to pending and from pending to active.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal-video.c
drivers/media/platform/ti-vpe/cal.c