media: ti-vpe: cal: Group all DMA queue fields in struct cal_dmaqueue
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 6 Dec 2020 23:53:49 +0000 (00:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 4 Jan 2021 11:12:25 +0000 (12:12 +0100)
commitca4fec54f6ba0825532ac21698cf2b7324d02737
tree23272111cd9a412cd48e5fe3bb3f23159052e4bb
parent9ae6b925848eed49f08451c6ee90d9a21ce0a3c9
media: ti-vpe: cal: Group all DMA queue fields in struct cal_dmaqueue

The cal_dmaqueue structure only contains the list of queued buffers.
Move the other fields that are logically related to the DMA queue
(current and next buffer points, state, wait queue and lock) from
cal_ctx to cal_dmaqueue.

Take this as an opportunity to document the fields usage and to give
them more appropriate names. The 'active' field stored the list of all
queued buffers, not the active buffers, so rename it to 'queue'. The
'cur_frm' and 'next_frm' are respectively renamed to 'active' and
'pending' to better explain their purpose. The 'dma_state' and
'dma_wait' fields are stripped of their 'dma_' prefix as they're now
part of cal_dmaqueue. Finally, 'slock' is renamed to 'lock'.

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
drivers/media/platform/ti-vpe/cal.h