diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/media/0020-v4l-Move-the-media-v4l2-mediabus.h-header-to-include.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/media/0020-v4l-Move-the-media-v4l2-mediabus.h-header-to-include.patch | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/media/0020-v4l-Move-the-media-v4l2-mediabus.h-header-to-include.patch b/extras/recipes-kernel/linux/linux-omap/media/0020-v4l-Move-the-media-v4l2-mediabus.h-header-to-include.patch new file mode 100644 index 00000000..302fe532 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/media/0020-v4l-Move-the-media-v4l2-mediabus.h-header-to-include.patch | |||
@@ -0,0 +1,205 @@ | |||
1 | From 0d2a2247733eca8f357f5a93fcc357edbb941ec1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
3 | Date: Mon, 15 Mar 2010 23:33:31 +0100 | ||
4 | Subject: [PATCH 20/43] v4l: Move the media/v4l2-mediabus.h header to include/linux | ||
5 | |||
6 | The header defines the v4l2_mbus_framefmt structure which will be used | ||
7 | by the V4L2 subdevs userspace API. | ||
8 | |||
9 | Change the type of the v4l2_mbus_framefmt::code field to __u32, as enum | ||
10 | sizes can differ between different ABIs on the same architectures. | ||
11 | |||
12 | Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
13 | --- | ||
14 | include/linux/Kbuild | 1 + | ||
15 | include/linux/v4l2-mediabus.h | 78 +++++++++++++++++++++++++++++++++++++++++ | ||
16 | include/media/soc_mediabus.h | 3 +- | ||
17 | include/media/v4l2-mediabus.h | 61 +------------------------------- | ||
18 | 4 files changed, 81 insertions(+), 62 deletions(-) | ||
19 | create mode 100644 include/linux/v4l2-mediabus.h | ||
20 | |||
21 | diff --git a/include/linux/Kbuild b/include/linux/Kbuild | ||
22 | index 26e0a7f..796e1d8 100644 | ||
23 | --- a/include/linux/Kbuild | ||
24 | +++ b/include/linux/Kbuild | ||
25 | @@ -366,6 +366,7 @@ header-y += unistd.h | ||
26 | header-y += usbdevice_fs.h | ||
27 | header-y += utime.h | ||
28 | header-y += utsname.h | ||
29 | +header-y += v4l2-mediabus.h | ||
30 | header-y += veth.h | ||
31 | header-y += vhost.h | ||
32 | header-y += videodev.h | ||
33 | diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h | ||
34 | new file mode 100644 | ||
35 | index 0000000..a62cd64 | ||
36 | --- /dev/null | ||
37 | +++ b/include/linux/v4l2-mediabus.h | ||
38 | @@ -0,0 +1,78 @@ | ||
39 | +/* | ||
40 | + * Media Bus API header | ||
41 | + * | ||
42 | + * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de> | ||
43 | + * | ||
44 | + * This program is free software; you can redistribute it and/or modify | ||
45 | + * it under the terms of the GNU General Public License version 2 as | ||
46 | + * published by the Free Software Foundation. | ||
47 | + */ | ||
48 | + | ||
49 | +#ifndef __LINUX_V4L2_MEDIABUS_H | ||
50 | +#define __LINUX_V4L2_MEDIABUS_H | ||
51 | + | ||
52 | +#include <linux/types.h> | ||
53 | +#include <linux/videodev2.h> | ||
54 | + | ||
55 | +/* | ||
56 | + * These pixel codes uniquely identify data formats on the media bus. Mostly | ||
57 | + * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is | ||
58 | + * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the | ||
59 | + * data format is fixed. Additionally, "2X8" means that one pixel is transferred | ||
60 | + * in two 8-bit samples, "BE" or "LE" specify in which order those samples are | ||
61 | + * transferred over the bus: "LE" means that the least significant bits are | ||
62 | + * transferred first, "BE" means that the most significant bits are transferred | ||
63 | + * first, and "PADHI" and "PADLO" define which bits - low or high, in the | ||
64 | + * incomplete high byte, are filled with padding bits. | ||
65 | + */ | ||
66 | +enum v4l2_mbus_pixelcode { | ||
67 | + V4L2_MBUS_FMT_FIXED = 1, | ||
68 | + V4L2_MBUS_FMT_YUYV8_2X8, | ||
69 | + V4L2_MBUS_FMT_YVYU8_2X8, | ||
70 | + V4L2_MBUS_FMT_UYVY8_2X8, | ||
71 | + V4L2_MBUS_FMT_VYUY8_2X8, | ||
72 | + V4L2_MBUS_FMT_YVYU10_2X10, | ||
73 | + V4L2_MBUS_FMT_YUYV10_2X10, | ||
74 | + V4L2_MBUS_FMT_YVYU10_1X20, | ||
75 | + V4L2_MBUS_FMT_YUYV10_1X20, | ||
76 | + V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE, | ||
77 | + V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE, | ||
78 | + V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, | ||
79 | + V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE, | ||
80 | + V4L2_MBUS_FMT_RGB565_2X8_LE, | ||
81 | + V4L2_MBUS_FMT_RGB565_2X8_BE, | ||
82 | + V4L2_MBUS_FMT_BGR565_2X8_LE, | ||
83 | + V4L2_MBUS_FMT_BGR565_2X8_BE, | ||
84 | + V4L2_MBUS_FMT_SBGGR8_1X8, | ||
85 | + V4L2_MBUS_FMT_SBGGR10_1X10, | ||
86 | + V4L2_MBUS_FMT_GREY8_1X8, | ||
87 | + V4L2_MBUS_FMT_Y10_1X10, | ||
88 | + V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE, | ||
89 | + V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE, | ||
90 | + V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE, | ||
91 | + V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE, | ||
92 | + V4L2_MBUS_FMT_SGRBG8_1X8, | ||
93 | + V4L2_MBUS_FMT_SBGGR12_1X12, | ||
94 | + V4L2_MBUS_FMT_YUYV8_1_5X8, | ||
95 | + V4L2_MBUS_FMT_YVYU8_1_5X8, | ||
96 | + V4L2_MBUS_FMT_UYVY8_1_5X8, | ||
97 | + V4L2_MBUS_FMT_VYUY8_1_5X8, | ||
98 | +}; | ||
99 | + | ||
100 | +/** | ||
101 | + * struct v4l2_mbus_framefmt - frame format on the media bus | ||
102 | + * @width: frame width | ||
103 | + * @height: frame height | ||
104 | + * @code: data format code | ||
105 | + * @field: used interlacing type | ||
106 | + * @colorspace: colorspace of the data | ||
107 | + */ | ||
108 | +struct v4l2_mbus_framefmt { | ||
109 | + __u32 width; | ||
110 | + __u32 height; | ||
111 | + __u32 code; | ||
112 | + enum v4l2_field field; | ||
113 | + enum v4l2_colorspace colorspace; | ||
114 | +}; | ||
115 | + | ||
116 | +#endif | ||
117 | diff --git a/include/media/soc_mediabus.h b/include/media/soc_mediabus.h | ||
118 | index 037cd7b..6243147 100644 | ||
119 | --- a/include/media/soc_mediabus.h | ||
120 | +++ b/include/media/soc_mediabus.h | ||
121 | @@ -12,8 +12,7 @@ | ||
122 | #define SOC_MEDIABUS_H | ||
123 | |||
124 | #include <linux/videodev2.h> | ||
125 | - | ||
126 | -#include <media/v4l2-mediabus.h> | ||
127 | +#include <linux/v4l2-mediabus.h> | ||
128 | |||
129 | /** | ||
130 | * enum soc_mbus_packing - data packing types on the media-bus | ||
131 | diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h | ||
132 | index 8e65598..971c7fa 100644 | ||
133 | --- a/include/media/v4l2-mediabus.h | ||
134 | +++ b/include/media/v4l2-mediabus.h | ||
135 | @@ -11,66 +11,7 @@ | ||
136 | #ifndef V4L2_MEDIABUS_H | ||
137 | #define V4L2_MEDIABUS_H | ||
138 | |||
139 | -/* | ||
140 | - * These pixel codes uniquely identify data formats on the media bus. Mostly | ||
141 | - * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is | ||
142 | - * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the | ||
143 | - * data format is fixed. Additionally, "2X8" means that one pixel is transferred | ||
144 | - * in two 8-bit samples, "BE" or "LE" specify in which order those samples are | ||
145 | - * transferred over the bus: "LE" means that the least significant bits are | ||
146 | - * transferred first, "BE" means that the most significant bits are transferred | ||
147 | - * first, and "PADHI" and "PADLO" define which bits - low or high, in the | ||
148 | - * incomplete high byte, are filled with padding bits. | ||
149 | - */ | ||
150 | -enum v4l2_mbus_pixelcode { | ||
151 | - V4L2_MBUS_FMT_FIXED = 1, | ||
152 | - V4L2_MBUS_FMT_YUYV8_2X8, | ||
153 | - V4L2_MBUS_FMT_YVYU8_2X8, | ||
154 | - V4L2_MBUS_FMT_UYVY8_2X8, | ||
155 | - V4L2_MBUS_FMT_VYUY8_2X8, | ||
156 | - V4L2_MBUS_FMT_YVYU10_2X10, | ||
157 | - V4L2_MBUS_FMT_YUYV10_2X10, | ||
158 | - V4L2_MBUS_FMT_YVYU10_1X20, | ||
159 | - V4L2_MBUS_FMT_YUYV10_1X20, | ||
160 | - V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE, | ||
161 | - V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE, | ||
162 | - V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, | ||
163 | - V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE, | ||
164 | - V4L2_MBUS_FMT_RGB565_2X8_LE, | ||
165 | - V4L2_MBUS_FMT_RGB565_2X8_BE, | ||
166 | - V4L2_MBUS_FMT_BGR565_2X8_LE, | ||
167 | - V4L2_MBUS_FMT_BGR565_2X8_BE, | ||
168 | - V4L2_MBUS_FMT_SBGGR8_1X8, | ||
169 | - V4L2_MBUS_FMT_SBGGR10_1X10, | ||
170 | - V4L2_MBUS_FMT_GREY8_1X8, | ||
171 | - V4L2_MBUS_FMT_Y10_1X10, | ||
172 | - V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE, | ||
173 | - V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE, | ||
174 | - V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE, | ||
175 | - V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE, | ||
176 | - V4L2_MBUS_FMT_SGRBG8_1X8, | ||
177 | - V4L2_MBUS_FMT_SBGGR12_1X12, | ||
178 | - V4L2_MBUS_FMT_YUYV8_1_5X8, | ||
179 | - V4L2_MBUS_FMT_YVYU8_1_5X8, | ||
180 | - V4L2_MBUS_FMT_UYVY8_1_5X8, | ||
181 | - V4L2_MBUS_FMT_VYUY8_1_5X8, | ||
182 | -}; | ||
183 | - | ||
184 | -/** | ||
185 | - * struct v4l2_mbus_framefmt - frame format on the media bus | ||
186 | - * @width: frame width | ||
187 | - * @height: frame height | ||
188 | - * @code: data format code | ||
189 | - * @field: used interlacing type | ||
190 | - * @colorspace: colorspace of the data | ||
191 | - */ | ||
192 | -struct v4l2_mbus_framefmt { | ||
193 | - __u32 width; | ||
194 | - __u32 height; | ||
195 | - enum v4l2_mbus_pixelcode code; | ||
196 | - enum v4l2_field field; | ||
197 | - enum v4l2_colorspace colorspace; | ||
198 | -}; | ||
199 | +#include <linux/v4l2-mediabus.h> | ||
200 | |||
201 | static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, | ||
202 | const struct v4l2_mbus_framefmt *mbus_fmt) | ||
203 | -- | ||
204 | 1.6.6.1 | ||
205 | |||