summaryrefslogtreecommitdiff
path: root/drivers/media/platform/rcar-vin/rcar-vin.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2019-12-10 03:05:58 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-02-24 16:18:00 +0100
commite72b7359be18b9c488ed51a653cd51dfa793b67d (patch)
treec186bd57ab14d1976cfef13a3ea6a6a12feb2362 /drivers/media/platform/rcar-vin/rcar-vin.h
parentdea0ab3782e302ed2c19522f753bbe2ccf40cbbb (diff)
media: rcar-vin: Move hardware buffer tracking to own struct
To support SEQ_TB/BT not all buffers given to the hardware will be equal, the driver needs to keep track of different buffer types. Move the tracking of buffers given to hardware into a struct so additional tracking fields can be associated with each buffer. [hverkuil: fix small checkpatch warning] Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/rcar-vin/rcar-vin.h')
-rw-r--r--drivers/media/platform/rcar-vin/rcar-vin.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h b/drivers/media/platform/rcar-vin/rcar-vin.h
index a36b0824f81d..0aa904a4af5b 100644
--- a/drivers/media/platform/rcar-vin/rcar-vin.h
+++ b/drivers/media/platform/rcar-vin/rcar-vin.h
@@ -164,9 +164,8 @@ struct rvin_info {
* @scratch: cpu address for scratch buffer
* @scratch_phys: physical address of the scratch buffer
*
- * @qlock: protects @queue_buf, @buf_list, @sequence
- * @state
- * @queue_buf: Keeps track of buffers given to HW slot
+ * @qlock: protects @buf_hw, @buf_list, @sequence and @state
+ * @buf_hw: Keeps track of buffers given to HW slot
* @buf_list: list of queued buffers
* @sequence: V4L2 buffers sequence number
* @state: keeps track of operation state
@@ -205,7 +204,9 @@ struct rvin_dev {
dma_addr_t scratch_phys;
spinlock_t qlock;
- struct vb2_v4l2_buffer *queue_buf[HW_BUFFER_NUM];
+ struct {
+ struct vb2_v4l2_buffer *buffer;
+ } buf_hw[HW_BUFFER_NUM];
struct list_head buf_list;
unsigned int sequence;
enum rvin_dma_state state;