This source file includes following definitions.
- to_xvip_pipeline
1
2
3
4
5
6
7
8
9
10
11
12 #ifndef __XILINX_VIP_DMA_H__
13 #define __XILINX_VIP_DMA_H__
14
15 #include <linux/dmaengine.h>
16 #include <linux/mutex.h>
17 #include <linux/spinlock.h>
18 #include <linux/videodev2.h>
19
20 #include <media/media-entity.h>
21 #include <media/v4l2-dev.h>
22 #include <media/videobuf2-v4l2.h>
23
24 struct dma_chan;
25 struct xvip_composite_device;
26 struct xvip_video_format;
27
28
29
30
31
32
33
34
35
36
37 struct xvip_pipeline {
38 struct media_pipeline pipe;
39
40 struct mutex lock;
41 unsigned int use_count;
42 unsigned int stream_count;
43
44 unsigned int num_dmas;
45 struct xvip_dma *output;
46 };
47
48 static inline struct xvip_pipeline *to_xvip_pipeline(struct media_entity *e)
49 {
50 return container_of(e->pipe, struct xvip_pipeline, pipe);
51 }
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73 struct xvip_dma {
74 struct list_head list;
75 struct video_device video;
76 struct media_pad pad;
77
78 struct xvip_composite_device *xdev;
79 struct xvip_pipeline pipe;
80 unsigned int port;
81
82 struct mutex lock;
83 struct v4l2_pix_format format;
84 const struct xvip_video_format *fmtinfo;
85
86 struct vb2_queue queue;
87 unsigned int sequence;
88
89 struct list_head queued_bufs;
90 spinlock_t queued_lock;
91
92 struct dma_chan *dma;
93 unsigned int align;
94 struct dma_interleaved_template xt;
95 struct data_chunk sgl[1];
96 };
97
98 #define to_xvip_dma(vdev) container_of(vdev, struct xvip_dma, video)
99
100 int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
101 enum v4l2_buf_type type, unsigned int port);
102 void xvip_dma_cleanup(struct xvip_dma *dma);
103
104 #endif