This repository has been archived by the owner on Jul 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
0054-v4l-Extend-struct-v4l2_mbus_frame_desc_entry.patch
105 lines (96 loc) · 3.09 KB
/
0054-v4l-Extend-struct-v4l2_mbus_frame_desc_entry.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Meng Wei <[email protected]>
Date: Fri, 26 Oct 2018 09:52:40 +0800
Subject: [PATCH] v4l: Extend struct v4l2_mbus_frame_desc_entry
Add bus type to frame descriptors
Add bpp fields and bus-specific information (CSI-2).
Add information for 2D DMA to the frame descriptor entries
Signed-off-by: Chang Ying <[email protected]>
Signed-off-by: Meng Wei <[email protected]>
---
include/media/v4l2-subdev.h | 53 +++++++++++++++++++++++++++++++------
1 file changed, 45 insertions(+), 8 deletions(-)
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 4bd777a68d64..889deab36029 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -332,29 +332,66 @@ enum v4l2_mbus_frame_desc_flags {
V4L2_MBUS_FRAME_DESC_FL_BLOB = BIT(1),
};
+/**
+ * struct v4l2_mbus_frame_desc_entry_csi2
+ *
+ * @channel: CSI-2 virtual channel
+ * @data_type: CSI-2 data type ID
+ */
+struct v4l2_mbus_frame_desc_entry_csi2 {
+ u8 channel;
+ u8 data_type;
+};
+
/**
* struct v4l2_mbus_frame_desc_entry - media bus frame description structure
*
- * @flags: bitmask flags, as defined by &enum v4l2_mbus_frame_desc_flags.
- * @pixelcode: media bus pixel code, valid if @flags
- * %FRAME_DESC_FL_BLOB is not set.
- * @length: number of octets per frame, valid if @flags
- * %V4L2_MBUS_FRAME_DESC_FL_LEN_MAX is set.
+ * @flags: V4L2_MBUS_FRAME_DESC_FL_* flags
+ * @bpp: bits per pixel
+ * @pixelcode: media bus pixel code, valid if FRAME_DESC_FL_BLOB is not set
+ * @start_line: start line of the data for 2D DMA
+ * @start_pixel: start pixel of the data for 2D DMA
+ * @width: image width for 2D DMA
+ * @height: image height for 2D DMA
+ * @length: number of octets per frame, valid if V4L2_MBUS_FRAME_DESC_FL_BLOB
+ * is set
+ * @csi2: CSI-2 specific bus configuration
*/
struct v4l2_mbus_frame_desc_entry {
- enum v4l2_mbus_frame_desc_flags flags;
+ u16 flags;
+ u8 bpp;
u32 pixelcode;
- u32 length;
+ union {
+ struct {
+ u16 start_line;
+ u16 start_pixel;
+ u16 width;
+ u16 height;
+ } two_dim;
+ u32 length;
+ };
+ union {
+ struct v4l2_mbus_frame_desc_entry_csi2 csi2;
+ } bus;
+};
+
+enum {
+ V4L2_MBUS_FRAME_DESC_TYPE_PLATFORM,
+ V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL,
+ V4L2_MBUS_FRAME_DESC_TYPE_CCP2,
+ V4L2_MBUS_FRAME_DESC_TYPE_CSI2,
};
#define V4L2_FRAME_DESC_ENTRY_MAX 4
/**
* struct v4l2_mbus_frame_desc - media bus data frame description
+ * @type: type of the bus (V4L2_MBUS_FRAME_DESC_TYPE_*)
* @entry: frame descriptors array
* @num_entries: number of entries in @entry array
*/
struct v4l2_mbus_frame_desc {
+ u32 type;
struct v4l2_mbus_frame_desc_entry entry[V4L2_FRAME_DESC_ENTRY_MAX];
unsigned short num_entries;
};
@@ -783,7 +820,7 @@ struct v4l2_subdev_internal_ops {
/* Set this flag if this subdev generates events. */
#define V4L2_SUBDEV_FL_HAS_EVENTS (1U << 3)
/* Set this flag if this sub-device supports substreams. */
-#define V4L2_SUBDEV_FL_HAS_SUBSTREAMS (1U << 4)
+#define V4L2_SUBDEV_FL_HAS_SUBSTREAMS (1U << 4)
struct regulator_bulk_data;
--
https://clearlinux.org