Skip to content

Commit 1046a2c

Browse files
committed
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (144 commits) [media] saa7134.h: Suppress compiler warnings when CONFIG_VIDEO_SAA7134_RC is not set [media] it913x [VER 1.07] Support for single ITE 9135 devices [media] Support for Terratec G1 [media] cx25821: off by one in cx25821_vidioc_s_input() [media] media: tea5764: reconcile Kconfig symbol and macro [media] omap_vout: Add poll() support [media] omap3isp: preview: Add crop support on the sink pad [media] omap3isp: preview: Rename min/max input/output sizes defines [media] omap3isp: preview: Remove horizontal averager support [media] omap3isp: Report the ISP revision through the media controller API [media] omap3isp: ccdc: remove redundant operation [media] omap3isp: Fix memory leaks in initialization error paths [media] omap3isp: Add missing mutex_destroy() calls [media] omap3isp: Move *_init_entities() functions to the init/cleanup section [media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup() [media] MFC: Change MFC firmware binary name [media] vb2: add vb2_get_unmapped_area in vb2 core [media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor [media] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control [media] media: ov6650: stylistic improvements ...
2 parents 46e85f5 + b3f4e1e commit 1046a2c

216 files changed

Lines changed: 10316 additions & 3785 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/DocBook/media/v4l/compat.xml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,6 +2486,9 @@ ioctls.</para>
24862486
<listitem>
24872487
<para>Flash API. <xref linkend="flash-controls" /></para>
24882488
</listitem>
2489+
<listitem>
2490+
<para>&VIDIOC-CREATE-BUFS; and &VIDIOC-PREPARE-BUF; ioctls.</para>
2491+
</listitem>
24892492
</itemizedlist>
24902493
</section>
24912494

‎Documentation/DocBook/media/v4l/controls.xml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ control is deprecated. New drivers and applications should use the
232232
<entry>Enables a power line frequency filter to avoid
233233
flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are:
234234
<constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0),
235-
<constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1) and
236-
<constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2).</entry>
235+
<constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1),
236+
<constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2) and
237+
<constant>V4L2_CID_POWER_LINE_FREQUENCY_AUTO</constant> (3).</entry>
237238
</row>
238239
<row>
239240
<entry><constant>V4L2_CID_HUE_AUTO</constant></entry>

‎Documentation/DocBook/media/v4l/io.xml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,33 @@ ioctl is called.</entry>
927927
Applications set or clear this flag before calling the
928928
<constant>VIDIOC_QBUF</constant> ioctl.</entry>
929929
</row>
930+
<row>
931+
<entry><constant>V4L2_BUF_FLAG_PREPARED</constant></entry>
932+
<entry>0x0400</entry>
933+
<entry>The buffer has been prepared for I/O and can be queued by the
934+
application. Drivers set or clear this flag when the
935+
<link linkend="vidioc-querybuf">VIDIOC_QUERYBUF</link>, <link
936+
linkend="vidioc-qbuf">VIDIOC_PREPARE_BUF</link>, <link
937+
linkend="vidioc-qbuf">VIDIOC_QBUF</link> or <link
938+
linkend="vidioc-qbuf">VIDIOC_DQBUF</link> ioctl is called.</entry>
939+
</row>
940+
<row>
941+
<entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry>
942+
<entry>0x0400</entry>
943+
<entry>Caches do not have to be invalidated for this buffer.
944+
Typically applications shall use this flag if the data captured in the buffer
945+
is not going to be touched by the CPU, instead the buffer will, probably, be
946+
passed on to a DMA-capable hardware unit for further processing or output.
947+
</entry>
948+
</row>
949+
<row>
950+
<entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry>
951+
<entry>0x0800</entry>
952+
<entry>Caches do not have to be cleaned for this buffer.
953+
Typically applications shall use this flag for output buffers if the data
954+
in this buffer has not been created by the CPU but by some DMA-capable unit,
955+
in which case caches have not been used.</entry>
956+
</row>
930957
</tbody>
931958
</tgroup>
932959
</table>

‎Documentation/DocBook/media/v4l/v4l2.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ and discussions on the V4L mailing list.</revremark>
469469
&sub-close;
470470
&sub-ioctl;
471471
<!-- All ioctls go here. -->
472+
&sub-create-bufs;
472473
&sub-cropcap;
473474
&sub-dbg-g-chip-ident;
474475
&sub-dbg-g-register;
@@ -511,6 +512,7 @@ and discussions on the V4L mailing list.</revremark>
511512
&sub-queryctrl;
512513
&sub-query-dv-preset;
513514
&sub-querystd;
515+
&sub-prepare-buf;
514516
&sub-reqbufs;
515517
&sub-s-hw-freq-seek;
516518
&sub-streamon;
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<refentry id="vidioc-create-bufs">
2+
<refmeta>
3+
<refentrytitle>ioctl VIDIOC_CREATE_BUFS</refentrytitle>
4+
&manvol;
5+
</refmeta>
6+
7+
<refnamediv>
8+
<refname>VIDIOC_CREATE_BUFS</refname>
9+
<refpurpose>Create buffers for Memory Mapped or User Pointer I/O</refpurpose>
10+
</refnamediv>
11+
12+
<refsynopsisdiv>
13+
<funcsynopsis>
14+
<funcprototype>
15+
<funcdef>int <function>ioctl</function></funcdef>
16+
<paramdef>int <parameter>fd</parameter></paramdef>
17+
<paramdef>int <parameter>request</parameter></paramdef>
18+
<paramdef>struct v4l2_create_buffers *<parameter>argp</parameter></paramdef>
19+
</funcprototype>
20+
</funcsynopsis>
21+
</refsynopsisdiv>
22+
23+
<refsect1>
24+
<title>Arguments</title>
25+
26+
<variablelist>
27+
<varlistentry>
28+
<term><parameter>fd</parameter></term>
29+
<listitem>
30+
<para>&fd;</para>
31+
</listitem>
32+
</varlistentry>
33+
<varlistentry>
34+
<term><parameter>request</parameter></term>
35+
<listitem>
36+
<para>VIDIOC_CREATE_BUFS</para>
37+
</listitem>
38+
</varlistentry>
39+
<varlistentry>
40+
<term><parameter>argp</parameter></term>
41+
<listitem>
42+
<para></para>
43+
</listitem>
44+
</varlistentry>
45+
</variablelist>
46+
</refsect1>
47+
48+
<refsect1>
49+
<title>Description</title>
50+
51+
<para>This ioctl is used to create buffers for <link linkend="mmap">memory
52+
mapped</link> or <link linkend="userp">user pointer</link>
53+
I/O. It can be used as an alternative or in addition to the
54+
<constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter control over buffers
55+
is required. This ioctl can be called multiple times to create buffers of
56+
different sizes.</para>
57+
58+
<para>To allocate device buffers applications initialize relevant fields of
59+
the <structname>v4l2_create_buffers</structname> structure. They set the
60+
<structfield>type</structfield> field in the
61+
<structname>v4l2_format</structname> structure, embedded in this
62+
structure, to the respective stream or buffer type.
63+
<structfield>count</structfield> must be set to the number of required buffers.
64+
<structfield>memory</structfield> specifies the required I/O method. The
65+
<structfield>format</structfield> field shall typically be filled in using
66+
either the <constant>VIDIOC_TRY_FMT</constant> or
67+
<constant>VIDIOC_G_FMT</constant> ioctl(). Additionally, applications can adjust
68+
<structfield>sizeimage</structfield> fields to fit their specific needs. The
69+
<structfield>reserved</structfield> array must be zeroed.</para>
70+
71+
<para>When the ioctl is called with a pointer to this structure the driver
72+
will attempt to allocate up to the requested number of buffers and store the
73+
actual number allocated and the starting index in the
74+
<structfield>count</structfield> and the <structfield>index</structfield> fields
75+
respectively. On return <structfield>count</structfield> can be smaller than
76+
the number requested. The driver may also increase buffer sizes if required,
77+
however, it will not update <structfield>sizeimage</structfield> field values.
78+
The user has to use <constant>VIDIOC_QUERYBUF</constant> to retrieve that
79+
information.</para>
80+
81+
<table pgwide="1" frame="none" id="v4l2-create-buffers">
82+
<title>struct <structname>v4l2_create_buffers</structname></title>
83+
<tgroup cols="3">
84+
&cs-str;
85+
<tbody valign="top">
86+
<row>
87+
<entry>__u32</entry>
88+
<entry><structfield>index</structfield></entry>
89+
<entry>The starting buffer index, returned by the driver.</entry>
90+
</row>
91+
<row>
92+
<entry>__u32</entry>
93+
<entry><structfield>count</structfield></entry>
94+
<entry>The number of buffers requested or granted.</entry>
95+
</row>
96+
<row>
97+
<entry>&v4l2-memory;</entry>
98+
<entry><structfield>memory</structfield></entry>
99+
<entry>Applications set this field to
100+
<constant>V4L2_MEMORY_MMAP</constant> or
101+
<constant>V4L2_MEMORY_USERPTR</constant>.</entry>
102+
</row>
103+
<row>
104+
<entry>&v4l2-format;</entry>
105+
<entry><structfield>format</structfield></entry>
106+
<entry>Filled in by the application, preserved by the driver.</entry>
107+
</row>
108+
<row>
109+
<entry>__u32</entry>
110+
<entry><structfield>reserved</structfield>[8]</entry>
111+
<entry>A place holder for future extensions.</entry>
112+
</row>
113+
</tbody>
114+
</tgroup>
115+
</table>
116+
</refsect1>
117+
118+
<refsect1>
119+
&return-value;
120+
121+
<variablelist>
122+
<varlistentry>
123+
<term><errorcode>ENOMEM</errorcode></term>
124+
<listitem>
125+
<para>No memory to allocate buffers for <link linkend="mmap">memory
126+
mapped</link> I/O.</para>
127+
</listitem>
128+
</varlistentry>
129+
<varlistentry>
130+
<term><errorcode>EINVAL</errorcode></term>
131+
<listitem>
132+
<para>The buffer type (<structfield>type</structfield> field) or the
133+
requested I/O method (<structfield>memory</structfield>) is not
134+
supported.</para>
135+
</listitem>
136+
</varlistentry>
137+
</variablelist>
138+
</refsect1>
139+
</refentry>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<refentry id="vidioc-prepare-buf">
2+
<refmeta>
3+
<refentrytitle>ioctl VIDIOC_PREPARE_BUF</refentrytitle>
4+
&manvol;
5+
</refmeta>
6+
7+
<refnamediv>
8+
<refname>VIDIOC_PREPARE_BUF</refname>
9+
<refpurpose>Prepare a buffer for I/O</refpurpose>
10+
</refnamediv>
11+
12+
<refsynopsisdiv>
13+
<funcsynopsis>
14+
<funcprototype>
15+
<funcdef>int <function>ioctl</function></funcdef>
16+
<paramdef>int <parameter>fd</parameter></paramdef>
17+
<paramdef>int <parameter>request</parameter></paramdef>
18+
<paramdef>struct v4l2_buffer *<parameter>argp</parameter></paramdef>
19+
</funcprototype>
20+
</funcsynopsis>
21+
</refsynopsisdiv>
22+
23+
<refsect1>
24+
<title>Arguments</title>
25+
26+
<variablelist>
27+
<varlistentry>
28+
<term><parameter>fd</parameter></term>
29+
<listitem>
30+
<para>&fd;</para>
31+
</listitem>
32+
</varlistentry>
33+
<varlistentry>
34+
<term><parameter>request</parameter></term>
35+
<listitem>
36+
<para>VIDIOC_PREPARE_BUF</para>
37+
</listitem>
38+
</varlistentry>
39+
<varlistentry>
40+
<term><parameter>argp</parameter></term>
41+
<listitem>
42+
<para></para>
43+
</listitem>
44+
</varlistentry>
45+
</variablelist>
46+
</refsect1>
47+
48+
<refsect1>
49+
<title>Description</title>
50+
51+
<para>Applications can optionally call the
52+
<constant>VIDIOC_PREPARE_BUF</constant> ioctl to pass ownership of the buffer
53+
to the driver before actually enqueuing it, using the
54+
<constant>VIDIOC_QBUF</constant> ioctl, and to prepare it for future I/O.
55+
Such preparations may include cache invalidation or cleaning. Performing them
56+
in advance saves time during the actual I/O. In case such cache operations are
57+
not required, the application can use one of
58+
<constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant> and
59+
<constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant> flags to skip the respective
60+
step.</para>
61+
62+
<para>The <structname>v4l2_buffer</structname> structure is
63+
specified in <xref linkend="buffer" />.</para>
64+
</refsect1>
65+
66+
<refsect1>
67+
&return-value;
68+
69+
<variablelist>
70+
<varlistentry>
71+
<term><errorcode>EBUSY</errorcode></term>
72+
<listitem>
73+
<para>File I/O is in progress.</para>
74+
</listitem>
75+
</varlistentry>
76+
<varlistentry>
77+
<term><errorcode>EINVAL</errorcode></term>
78+
<listitem>
79+
<para>The buffer <structfield>type</structfield> is not
80+
supported, or the <structfield>index</structfield> is out of bounds,
81+
or no buffers have been allocated yet, or the
82+
<structfield>userptr</structfield> or
83+
<structfield>length</structfield> are invalid.</para>
84+
</listitem>
85+
</varlistentry>
86+
</variablelist>
87+
</refsect1>
88+
</refentry>

‎arch/arm/mach-pxa/pcm990-baseboard.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ static int pcm990_camera_set_bus_param(struct soc_camera_link *link,
394394
}
395395

396396
if (flags & SOCAM_DATAWIDTH_8)
397-
gpio_set_value(gpio_bus_switch, 1);
397+
gpio_set_value_cansleep(gpio_bus_switch, 1);
398398
else
399-
gpio_set_value(gpio_bus_switch, 0);
399+
gpio_set_value_cansleep(gpio_bus_switch, 0);
400400

401401
return 0;
402402
}

‎arch/arm/mach-shmobile/board-ap4evb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ static struct platform_device ap4evb_camera = {
933933
static struct sh_csi2_client_config csi2_clients[] = {
934934
{
935935
.phy = SH_CSI2_PHY_MAIN,
936-
.lanes = 3,
936+
.lanes = 0, /* default: 2 lanes */
937937
.channel = 0,
938938
.pdev = &ap4evb_camera,
939939
},

‎arch/arm/mach-shmobile/board-mackerel.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,9 +1223,10 @@ static struct soc_camera_platform_info camera_info = {
12231223
.width = 640,
12241224
.height = 480,
12251225
},
1226-
.bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
1227-
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8 |
1228-
SOCAM_DATA_ACTIVE_HIGH,
1226+
.mbus_param = V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_MASTER |
1227+
V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_HSYNC_ACTIVE_HIGH |
1228+
V4L2_MBUS_DATA_ACTIVE_HIGH,
1229+
.mbus_type = V4L2_MBUS_PARALLEL,
12291230
.set_capture = camera_set_capture,
12301231
};
12311232

‎arch/sh/boards/mach-ap325rxa/setup.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,10 @@ static struct soc_camera_platform_info camera_info = {
345345
.width = 640,
346346
.height = 480,
347347
},
348-
.bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
349-
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8 |
350-
SOCAM_DATA_ACTIVE_HIGH,
348+
.mbus_param = V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_MASTER |
349+
V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_HSYNC_ACTIVE_HIGH |
350+
V4L2_MBUS_DATA_ACTIVE_HIGH,
351+
.mbus_type = V4L2_MBUS_PARALLEL,
351352
.set_capture = camera_set_capture,
352353
};
353354

@@ -501,8 +502,7 @@ static struct i2c_board_info ap325rxa_i2c_camera[] = {
501502
};
502503

503504
static struct ov772x_camera_info ov7725_info = {
504-
.flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP | \
505-
OV772X_FLAG_8BIT,
505+
.flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
506506
.edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
507507
};
508508

0 commit comments

Comments
 (0)