<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/media/test-drivers/vimc/vimc-common.h, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>media: vimc: sensor: Add pixel_rate,vblank and hblank configuration</title>
<updated>2026-03-17T09:50:19+00:00</updated>
<author>
<name>Faizel K B</name>
<email>faizel.kb@gmail.com</email>
</author>
<published>2026-03-12T23:16:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ec1e620b245495121535bf5c046c6885c7e409cb'/>
<id>ec1e620b245495121535bf5c046c6885c7e409cb</id>
<content type='text'>
pixel_rate and hblank as read only parameter. vblank can be configured
to match the desired frame rate.

Default values are, pixel_rate - 160 MHz, hblank - 800.
vblank defaults to an equivalent value of 30 fps for resolutions less than
or equal to 1920x1080 and 10 fps for higher resolutions. For higher
resolutions, modify pixel_rate in the driver code.
fps = pixel_rate / ((width + hblank) * (height + vblank))
minimum vblank - 4, maximum vblank - 65535

The configured fps delay is pre-calculated into jiffies and
stored in the sensor's hw structure for efficient access by the
streamer thread.

Signed-off-by: Faizel K B &lt;faizel.kb@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pixel_rate and hblank as read only parameter. vblank can be configured
to match the desired frame rate.

Default values are, pixel_rate - 160 MHz, hblank - 800.
vblank defaults to an equivalent value of 30 fps for resolutions less than
or equal to 1920x1080 and 10 fps for higher resolutions. For higher
resolutions, modify pixel_rate in the driver code.
fps = pixel_rate / ((width + hblank) * (height + vblank))
minimum vblank - 4, maximum vblank - 65535

The configured fps delay is pre-calculated into jiffies and
stored in the sensor's hw structure for efficient access by the
streamer thread.

Signed-off-by: Faizel K B &lt;faizel.kb@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: sensor: Move vimc_sensor_device to common header</title>
<updated>2026-03-17T09:50:18+00:00</updated>
<author>
<name>Faizel K B</name>
<email>faizel.kb@gmail.com</email>
</author>
<published>2026-03-12T23:16:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=12cdc242c3faaa66399a01fb40c151ee236e6bbf'/>
<id>12cdc242c3faaa66399a01fb40c151ee236e6bbf</id>
<content type='text'>
Move the vimc_sensor_device structure from vimc-sensor.c to
vimc-common.h to make it accessible to the vimc-streamer component.

Signed-off-by: Faizel K B &lt;faizel.kb@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the vimc_sensor_device structure from vimc-sensor.c to
vimc-common.h to make it accessible to the vimc-streamer component.

Signed-off-by: Faizel K B &lt;faizel.kb@gmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: Centralize subdev internal_ops initialization</title>
<updated>2024-06-26T14:39:34+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2024-04-24T23:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=556d821ade98edd76c59368a3301fbb30014b851'/>
<id>556d821ade98edd76c59368a3301fbb30014b851</id>
<content type='text'>
Initialize the subdev internal_ops field in the vimc_ent_sd_register()
function. This handles the internal ops the same way as the subdev ops,
and prepares for moving to the V4L2 subdev active state API.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initialize the subdev internal_ops field in the vimc_ent_sd_register()
function. This handles the internal ops the same way as the subdev ops,
and prepares for moving to the V4L2 subdev active state API.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: Constify vimc_ent_type structures</title>
<updated>2024-06-26T14:39:34+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2024-04-24T23:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=73a4385c6947df393ffb4bcdf84eef1294057d0c'/>
<id>73a4385c6947df393ffb4bcdf84eef1294057d0c</id>
<content type='text'>
The vimc_ent_type structure contains static pointers to functions, and
no other information that need to be modified after initialization. Make
them const to avoid the risk of arbitrary code execution following an
overflow that would overwrite the structure's contents.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vimc_ent_type structure contains static pointers to functions, and
no other information that need to be modified after initialization. Make
them const to avoid the risk of arbitrary code execution following an
overflow that would overwrite the structure's contents.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: expand the names of vimc entity types</title>
<updated>2022-07-15T13:42:14+00:00</updated>
<author>
<name>Daniel Oakley</name>
<email>daniel.oakley@ideasonboard.com</email>
</author>
<published>2022-06-16T10:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ec917d77c57c0b3499442d2148bc4ca3598a5e8a'/>
<id>ec917d77c57c0b3499442d2148bc4ca3598a5e8a</id>
<content type='text'>
When introducing the lens controller, it became apparent that the vimc
entity type names were hard to understand, e.g. vimc_len_type refers to the
lens. The names of the vimc entity types have been expanded to make the
code easier to understand. There is no functional change intended.

Suggested-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Oakley &lt;daniel.oakley@ideasonboard.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When introducing the lens controller, it became apparent that the vimc
entity type names were hard to understand, e.g. vimc_len_type refers to the
lens. The names of the vimc entity types have been expanded to make the
code easier to understand. There is no functional change intended.

Suggested-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Oakley &lt;daniel.oakley@ideasonboard.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: add ancillary lens</title>
<updated>2022-07-15T13:40:09+00:00</updated>
<author>
<name>Yunke Cao</name>
<email>yunkec@google.com</email>
</author>
<published>2022-06-28T00:53:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d534b9520a128d20d81d6dcf95441e806bdeb20f'/>
<id>d534b9520a128d20d81d6dcf95441e806bdeb20f</id>
<content type='text'>
Add lens to vimc driver and link them with sensors using ancillary links.
Provides an example of ancillary link usage.The lens supports
FOCUS_ABSOLUTE control.

Test example: With default vimc topology
&gt; media-ctl -p
Media controller API version 5.18.0
...
- entity 28: Lens A (0 pad, 0 link)
             type V4L2 subdev subtype Lens flags 0
             device node name /dev/v4l-subdev6
- entity 29: Lens B (0 pad, 0 link)
             type V4L2 subdev subtype Lens flags 0
             device node name /dev/v4l-subdev7
&gt; v4l2-ctl -d /dev/v4l-subdev7 -C focus_absolute
focus_absolute: 0

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Yunke Cao &lt;yunkec@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add lens to vimc driver and link them with sensors using ancillary links.
Provides an example of ancillary link usage.The lens supports
FOCUS_ABSOLUTE control.

Test example: With default vimc topology
&gt; media-ctl -p
Media controller API version 5.18.0
...
- entity 28: Lens A (0 pad, 0 link)
             type V4L2 subdev subtype Lens flags 0
             device node name /dev/v4l-subdev6
- entity 29: Lens B (0 pad, 0 link)
             type V4L2 subdev subtype Lens flags 0
             device node name /dev/v4l-subdev7
&gt; v4l2-ctl -d /dev/v4l-subdev7 -C focus_absolute
focus_absolute: 0

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Yunke Cao &lt;yunkec@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: Add support for contiguous DMA buffers</title>
<updated>2022-02-16T11:47:02+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2021-07-30T13:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a2e0a806cb58a4d3106add079488e0b56a221b6'/>
<id>4a2e0a806cb58a4d3106add079488e0b56a221b6</id>
<content type='text'>
The vimc driver is used for testing purpose, and some test use cases
involve sharing buffers with a consumer device. Consumers often require
DMA contiguous memory, which vimc doesn't currently support. This leads
in the best case to usage of bounce buffers, which is very slow, and in
the worst case in a complete failure.

Add support for the dma-contig allocator in vimc to support those use
cases properly. The allocator is selected through a new "allocator"
module parameter, which defaults to vmalloc.

[hverkuil: add missing 'select VIDEOBUF2_DMA_CONFIG' to Kconfig]

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vimc driver is used for testing purpose, and some test use cases
involve sharing buffers with a consumer device. Consumers often require
DMA contiguous memory, which vimc doesn't currently support. This leads
in the best case to usage of bounce buffers, which is very slow, and in
the worst case in a complete failure.

Add support for the dma-contig allocator in vimc to support those use
cases properly. The allocator is selected through a new "allocator"
module parameter, which defaults to vmalloc.

[hverkuil: add missing 'select VIDEOBUF2_DMA_CONFIG' to Kconfig]

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: Add a control to display info on test image</title>
<updated>2020-07-19T11:39:22+00:00</updated>
<author>
<name>Kaaira Gupta</name>
<email>kgupta@es.iitr.ac.in</email>
</author>
<published>2020-07-05T13:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5f3fb5c54d67670fa6743d2434a5bd43a97c01de'/>
<id>5f3fb5c54d67670fa6743d2434a5bd43a97c01de</id>
<content type='text'>
Add a control in VIMC to display information such as the correct order of
colors for a given test pattern, counter, brightness, hue, saturation,
contrast, width and height at sensor over test image.

Signed-off-by: Kaaira Gupta &lt;kgupta@es.iitr.ac.in&gt;
Acked-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a control in VIMC to display information such as the correct order of
colors for a given test pattern, counter, brightness, hue, saturation,
contrast, width and height at sensor over test image.

Signed-off-by: Kaaira Gupta &lt;kgupta@es.iitr.ac.in&gt;
Acked-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: Add missing {RGB,BGR,GBR}888 media bus codes</title>
<updated>2020-05-05T15:25:34+00:00</updated>
<author>
<name>Nícolas F. R. A. Prado</name>
<email>nfraprado@protonmail.com</email>
</author>
<published>2020-05-01T13:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=772563b27c9f5cb0e19bf6c5fb4383a86e3347e3'/>
<id>772563b27c9f5cb0e19bf6c5fb4383a86e3347e3</id>
<content type='text'>
Add missing RGB888_*, BGR888_* and GBR888_* media bus codes in the
vimc_pix_map_list. Since there is no GBR24 pixelformat, use the RGB24
pixelformat for MEDIA_BUS_FMT_GBR888_1X24.

Acked-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Co-developed-by: Vitor Massaru Iha &lt;vitor@massaru.org&gt;
Signed-off-by: Vitor Massaru Iha &lt;vitor@massaru.org&gt;
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@protonmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing RGB888_*, BGR888_* and GBR888_* media bus codes in the
vimc_pix_map_list. Since there is no GBR24 pixelformat, use the RGB24
pixelformat for MEDIA_BUS_FMT_GBR888_1X24.

Acked-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Co-developed-by: Vitor Massaru Iha &lt;vitor@massaru.org&gt;
Signed-off-by: Vitor Massaru Iha &lt;vitor@massaru.org&gt;
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@protonmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: vimc: Support multiple media bus codes for each pixelformat</title>
<updated>2020-05-05T15:25:14+00:00</updated>
<author>
<name>Nícolas F. R. A. Prado</name>
<email>nfraprado@protonmail.com</email>
</author>
<published>2020-05-01T13:11:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b77da87c84f8d3f0290ef96f72edac9a9d2b1d23'/>
<id>b77da87c84f8d3f0290ef96f72edac9a9d2b1d23</id>
<content type='text'>
Change vimc_pix_map_list to allow multiple media bus codes to map to the
same pixelformat, making it possible to add media bus codes for which
there are no pixelformat.

Acked-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@protonmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
[hverkuil-cisco@xs4all.nl: fix sparse warning: const u32 -&gt; u32]
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change vimc_pix_map_list to allow multiple media bus codes to map to the
same pixelformat, making it possible to add media bus codes for which
there are no pixelformat.

Acked-by: Helen Koike &lt;helen.koike@collabora.com&gt;
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@protonmail.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
[hverkuil-cisco@xs4all.nl: fix sparse warning: const u32 -&gt; u32]
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
