Commit graph zephyr/drivers/video
Author SHA1 Message Date
Jason Yu
b1bf07539e drivers: video: mcux_sdma: Guard against missing active buffers
A temporarily empty input FIFO can leave active_buf NULL for
a subsequent callback. Skip the metadata update and output enqueue
when there is no buffer to deliver.

Fixes #117173

Assisted-by: Copilot:GPT-6 Luna
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2026-10-30 12:50:35 -04:00
Wojciech Jakubiszyn
d428551fa8 drivers: video: ov767x: support an input clock
The OV7670 and OV7675 need XCLK running before they answer on SCCB.
On boards where XCLK comes from a clock controller that is off at
boot, such as a pwm-clock node, the product ID read in init fails.

Add an optional clocks property to both bindings. When it is set,
the driver enables the clock before touching the sensor and waits
1 ms, the minimum time the datasheet asks for before the first SCCB
access. The clock specifier is passed as the clock_control subsystem,
taken from the id cell as for pwm-clock.

Tested on an ESP32-DevKitC with an OV7675, XCLK from a pwm-clock node
on LEDC: the sensor probes at boot without deferred init.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Wojciech Jakubiszyn <wojtekjakubiszyn@gmail.com>
2026-10-28 22:43:03 -04:00
Kate Wang
e6c7eeaa2a drivers: video: mcux_jpegdec: support clock enable during init
For SoCs that support clock control, turn on the gate clock
during init. Nodes without a clocks property are unaffected.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-10-28 22:38:15 -04:00
Kirill Shypachov
05c3e069f8 drivers: video: imx335: fix 25 and 50 fps in 2x2 binning
In 2x2 binning, HMAX 0x0280 and 0x0140 give 25.78 and 51.56 fps
instead of 25 and 50. Sony datasheet E18112A84 corrects them to
0x0294 and 0x014A (p.57, revision history p.97), which give 25.00
and 50.00 fps.

Signed-off-by: Kirill Shypachov <kshypachov@outlook.com>
2026-10-21 15:00:37 -05:00
Wojciech Jakubiszyn
427f7ec822 drivers: video: ov767x: fix gpios ignored on ov7675-only builds
The reset and pwdn initializer macros were guarded with
DT_ANY_INST_HAS_PROP_STATUS_OKAY(), which is evaluated while
DT_DRV_COMPAT is still ovti_ov7670. When only an ovti,ov7675 node
is enabled, the guards are false, the config struct gets no
reset/pwdn entries and the pins from devicetree are never driven.

Check both compatibles, as the config struct definition already
does.

Found with an OV7675 on an ESP32-DevKitC: the preprocessed config
initializer had no .pwdn member although the node sets pwdn-gpios.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Wojciech Jakubiszyn <wojtekjakubiszyn@gmail.com>
2026-10-21 12:01:20 +02:00
Alain Volmat
5bab0a6c07 video: stm32_dcmi: avoid timeout at set_stream disable
When stopping the stream, the DCMI driver currently stop
first the source device (ex: sensor) then afterward call
the HAL_DCMI_Stop. This leads to a timeout at HAL_DCMI_Stop
since the HW block is waiting for an EOF to frame to come
before clearing its ongoing capture bit. Avoid this
timeout by first stopping the DCMI capture and only
afterward stop the source device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-10-19 16:28:52 +02:00
Josuah Demangeon
de98191ba6 drivers: video: esp32: add support for enum_frmival
This is a no-op API call that just forwards the call to the source video
device.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-10-15 16:37:44 +02:00
Josuah Demangeon
4babceb22d soc: espressif: common: defaults for video to work out of the box
Enable multiple platform-level defaults to make video receiver work without
the need to configure every sample.

Also supports shared-multi-heap to be turned off and use memory region
names instead as an option.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-10-15 16:37:44 +02:00
Josuah Demangeon
a4111fcb4b video: drivers: esp32: better logging
Add more logging to avoid silent errors.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-10-15 16:37:44 +02:00
Phi Bang Nguyen
0bfecafa78 drivers: video: mcux_jpegdec: Validate and size the format before streaming
Until the first input buffer is parsed, set_format accepted any request
without storing it or filling the pitch and size, so a caller sizing its
buffers from the returned format got whatever its struct held. Reject an
input format other than JPEG and an output format the decoder cannot
produce, estimate the pitch and size for the requested format and keep it
as the current one, as the other m2m codec drivers do. The JPEG header
still replaces the output format on the first enqueue.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-10-15 14:23:49 +02:00
Pisit Sawangvonganan
894020886d drivers: {video, wifi}: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/video`
- `drivers/wifi`

Assisted-by: Claude:claude-sonnet-5-5 codespell
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-10-03 13:17:18 -05:00
Jacky Mpoka
410ada82da drivers: video: fix typos in video control docstrings
Fix typos from "on succes" to "on success" in video control
function documentation comments.

Assisted-by: Gemini:gemini-3.8-flash
Signed-off-by: Jacky Mpoka <jackympoka22@gmail.com>
2026-10-02 17:54:35 -05:00
Changyeon Jo
5ce4aedb45 drivers: video: native_sim_fifo: drop the experimental tag
The driver was marked experimental because frame intervals and controls
are not implemented yet. Adding them later extends what the driver
supports through the video API without changing its devicetree binding,
so there is no reason to keep it experimental. Drop the EXPERIMENTAL
selection and the prompt suffix.

Assisted-by: Antigravity:gemini-3-pro
Signed-off-by: Changyeon Jo <changyeon@google.com>
2026-09-30 20:01:29 +09:00
Changyeon Jo
d9da0ca078 drivers: video: native_sim_fifo: let the host pipe hold two frames
A host pipe holds 64 KiB by default, less than a single frame of the
default 320x240 RGB565 format. The host writer then blocks mid-frame
until the driver drains the pipe, and the driver waits poll-interval-ms
between two reads, so every larger frame takes several polls to arrive.
The default format could not keep up with a 30 fps writer, and 640x480
YUYV frames arrived at under 6 fps whatever the writer rate.

Enlarge the pipe with F_SETPIPE_SZ when the stream starts, and when a
larger format is selected while streaming, so that it holds two frames:
with room for a single one, the host writer stalls until each frame is
read. The pipe is never shrunk, so smaller frames are unaffected.

Unprivileged processes cannot go beyond /proc/sys/fs/pipe-max-size,
1 MiB by default, nor /proc/sys/fs/pipe-user-pages-soft for all their
pipes together. The largest allowed capacity is used instead, and the
driver warns that the frame rate may be limited.

F_SETPIPE_SZ needs _GNU_SOURCE, which the bottom half defines as other
native simulator bottoms do. Also spell out that when the pipe runs
dry mid-frame, the rest of the frame is read on a later poll.

Assisted-by: Antigravity:gemini-3-pro
Signed-off-by: Changyeon Jo <changyeon@google.com>
2026-09-30 20:01:29 +09:00
Jerome LAMY
43dcaedb19 drivers: video: stm32_dcmipp: make the kernel clock optional
On the STM32MP25 the DCMIPP kernel clock source is selected by the
Cortex-A35 firmware and the Cortex-M33 has no mux to configure. Only
call clock_control_configure() when a dcmipp-ker clock is described, so
such SoCs can list the DCMIPP gate alone.

Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Jerome LAMY <jerome.lamy@savoirfairelinux.com>
2026-09-28 19:40:17 -04:00
Phi Bang Nguyen
7661b0a2a0 video: stm32_dcmi: Report achievable frame intervals
enum_frmival() reported one stepwise range with min and max swapped:
frame dropping only lengthens the interval, so the sensor interval is
the lower bound, not the upper one.

Even with the bounds fixed, one range with the sensor step advertises
intervals the DCMI cannot produce. Its frame control captures every
frame, every 2nd or every 4th one, so dropping multiplies both the
interval and the step. Report each sensor interval once per capture
rate instead, with the interval and the step scaled accordingly.

Assisted-by: Claude:claude-fable-5.1
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-09-28 07:35:42 -04:00
Changyeon Jo
41c86426b8 drivers: video: add a native_sim host FIFO video source
Add a video capture driver for native_sim that reads fixed size raw
frames from a named pipe on the host and exposes them through the video
API as an ordinary zephyr,camera device. A host process such as ffmpeg
feeds the pipe from a webcam, a video file or a test pattern, which
lets video applications run on native_sim without camera hardware.

The driver is split the usual way for native_sim. The bottom half is
built in the native simulator runner context and is the only part
touching the host C library: it creates the FIFO with mkfifo() when
needed, refuses a path that exists but is not a FIFO, and opens it
O_RDONLY | O_NONBLOCK so that no read() can ever stall the simulation.

A dedicated thread polls the FIFO and reads straight into the buffer at
the head of the input queue. The buffer is only dequeued once exactly
width * height * bpp bytes have been read, so stop and flush never lose
it. While the application holds every buffer the driver stops reading
and the host writer blocks on the full pipe.

A writer disconnecting mid-frame makes read() return 0. The partial
frame is then discarded while the descriptor stays open, so the next
writer to attach is guaranteed to be frame aligned.

The application selects the format with video_set_format(), as with the
other video drivers. get_caps() lists the formats of video_sw_generator
that ffmpeg can write (RGB565, RGB24, BGR24, XRGB32, BGRX32, YUYV and
GREY), any size up to 1920x1080, with an even width for YUYV, and the
default is 320x240 RGB565. The host writer is responsible for scaling
and pixel format conversion, so it must write frames of the selected
format. A buffer queued before a larger format was selected is returned
unfilled rather than overrun.

The FIFO path comes from the fifo-path property, or defaults to
/tmp/zephyr-<device>-<pid>.fifo so that several simulator instances do
not collide. It can be overridden at runtime with the --<device>=<path>
command line option. A FIFO created by the driver is removed when the
simulator exits.

Frame intervals and controls are not implemented yet, so the driver is
marked experimental for now.

Assisted-by: Antigravity:gemini-3-pro
Signed-off-by: Changyeon Jo <changyeon@google.com>
2026-09-27 08:53:49 -04:00
Ibrahim Abdalkader
73e96d5b44 drivers: video: stm32_dcmi: enable the DMA FIFO when the DT asks for it
The FIFO threshold in the dmas features cell, documented in the binding,
is ignored by dma_stm32_zcfg_to_halcfg() which always selects direct
mode.

Direct mode writes every word to memory as it arrives, which is too slow
for destinations such as external SDRAM. The DCMI overruns and capture
never completes.

Enable the FIFO when the DT asks for a full threshold. This driver
transfers words, and full is the only threshold the hardware accepts at
that size, so boards asking for 1/4, 1/2 or 3/4 cannot use the FIFO at
all and keep direct mode as before.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-09-26 01:05:12 +02:00
Ibrahim Abdalkader
c899e2c305 drivers: video: stm32_dcmi: request the memory burst through the DMA config
Ask for a 4 beat burst on the memory side with dest_burst_length instead
of leaving it equal to the data size.

Note this has no effect on its own, the burst bits are only written to
the stream when the FIFO is enabled, which it is not yet on any board.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-09-26 01:05:12 +02:00
Daniele Cloralio
d5a0172b94 drivers: video: gc2145: Return -ENOSYS for unsupported selection targets
Return -ENOSYS instead of -EINVAL for selection targets other than
VIDEO_SEL_TGT_CROP, since these operations are not implemented by
the driver.

This lets video_set_compose_format() proceed with format configuration
through set_format instead of aborting with -EINVAL.

Signed-off-by: Daniele Cloralio <d.cloralio@arduino.cc>
2026-09-23 19:18:13 +02:00
Guillaume Gautier
be2ca806d9 include: drivers: dma: stm32: remove slot argument from dma macro
The slot argument from macros STM32_DT_INST_DMA_SLOT* was useless.
With it the macro was basically a redefinition a the Zephyr macro.
It is now removed to be similar to other STM32 DMA macros that call
DT_INST_DMAS_CELL_BY_NAME.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-09-22 17:56:13 +02:00
Guillaume Gautier
89a0b76898 include: drivers: dma: stm32: rename macros with DT_INST for consistency
Typically Zephyr device tree macros that take a inst as argument
start with DT_INST_.
For the STM32 DMA driver we currently have several macros taking an inst as
argument but missing this prefix.
For consistency, it is added to these macros. The goal is to also define
DT_ variants of these macros that take a node_id as argument.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-09-22 17:56:13 +02:00
Kate Wang
31ddee5548 drivers: video: Add NXP PNG decoder driver
Add support for NXP PNG decoder hardware module. This driver provides
memory-to-memory (M2M) video transformation capability to decode PNG
compressed images into raw pixel formats.

Key features:
- Supports PNG input format (VIDEO_PIX_FMT_PNG)
- Resolution support: 1x1 to 1024x65535 pixels (1-pixel step)
- Fixed RGBA32 output format (VIDEO_PIX_FMT_RGBA32)
- Interrupt-driven operation with input/output buffer queues
- 8-byte buffer alignment requirement

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-09-18 11:13:31 +01:00
Raphaël Gallais-Pou
71a1d8575c drivers: dma: stm32: document default API configuration
The new dma_stm32_zcfg_to_halcfg() relies heavily on default STM32
configuration.  Document it in order not to loose the DMA consumer
drivers into wrong configuration.

Signed-off-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
2026-09-16 16:14:13 +01:00
Raphaël Gallais-Pou
09e2d5b31d drivers: stm32: use DMA HAL config helper
Use the private STM32 DMA helper in HAL-managed DMA setup paths instead
of open-coding common DMA_InitTypeDef fields in each consumer.

Keep peripheral-specific settings such as request lines, instances,
channel attributes, bursts, and port allocation local to each driver.

This reduces duplicated HAL DMA setup in flash, MSPI, SAI, SDMMC, and
DCMI STM32 drivers.

Assisted-by: Copilot:gpt-5.5
Signed-off-by: Raphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
2026-09-16 16:14:13 +01:00
Kate Wang
eb9ccd4333 drivers: video: Add NXP JPEG decoder driver
Add support for NXP JPEG decoder hardware module. This driver provides
memory-to-memory (M2M) video transformation capability to decode JPEG
compressed images into raw pixel formats.

Key features:
- Supports JPEG input format (VIDEO_PIX_FMT_JPEG)
- Resolution support: 64x64 to 8192x8192 pixels (16-pixel step)
- Automatic format detection from JPEG header parsing
- No color space conversion (output format matches JPEG encoding)
- Interrupt-driven operation with input/output buffer queues
- Configurable output buffer pitch for flexible memory layouts

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-09-16 16:13:11 +01:00
Kate Wang
860aef9d6a drivers: video: introduce NXP MCUX FlexIO parallel camera driver
Add a new video driver for NXP FlexIO-based parallel camera
interface (DVP). The driver captures 8-bit parallel pixel data
via FlexIO shifters, with pixel clock (PCLK) gating and horizontal
sync (HREF) line synchronization. Pixel data is transferred to
memory using eDMA, with frame boundaries synchronized via VSYNC
GPIO interrupt. An optional XCLK output can be generated by a FlexIO
timer for camera sensor clock supply.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-09-10 10:18:47 +02:00
Benjamin Cabé
5b4278c695 drivers: use inclusive SPI terminology in remaining drivers
Use controller/peripheral and SDO/SDI terminology in the remaining
SPI-using drivers (audio, auxdisplay, bluetooth HCI, dac, eeprom,
ethernet, flash, fpga, gpio, haptics, hdlc_rcp_if, ieee802154,
input, led, led_strip, lora, mfd, misc, mux, rtc, sdhc, stepper,
video, watchdog, wifi) and the ec_host_cmd SPI STM32 backend,
following coding guideline rule A.2: switch to
SPI_OP_MODE_CONTROLLER/PERIPHERAL and SPI_SDO_OVERRUN_DT, rename
Zephyr-owned identifiers (the HCI SPI header buffers, the winc1500
bus wrapper transfer parameters), and update comments, log messages
and Kconfig help prose.

Vendor and out-of-scope identifiers keep their names: STM32
LL_SPI_MODE_SLAVE in the ec_host_cmd backend, the ATWINC1500 SDK I2C
SLAVE_ADDRESS definition, and the I2S codec clock-role variable in
tlv320aic26.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-01 21:04:50 -04:00
Daniel M'BOUYOU
9ee04727b3 drivers: video: fix Kconfig help reference to the region name option
The help text of VIDEO_BUFFER_POOL_ZEPHYR_REGION points the reader at
CONFIG_VIDEO_BUFFER_ZEPHYR_REGION_NAME, which does not exist. The option
is declared two lines below as VIDEO_BUFFER_POOL_ZEPHYR_REGION_NAME and
is the name used everywhere else: subsys/video/buffer.c and the board
defconfigs for stm32h7s78_dk and stm32n6570_dk.

Fix the name in the help text so it matches the declared option.

Signed-off-by: Daniel M'BOUYOU <danielmbouyou@gmail.com>
2026-08-18 17:28:43 -04:00
Roman Pustobaiev
dbeff96f4c drivers: video: ov2640 driver: Enhancing ov2640 driver
Enabling proper zoom/scaling for windowed resolutions;
e.g. smaller than uxga
That makes camera's ISP to downscale frame to a desired resolution

Signed-off-by: Roman Pustobaiev <romanpustobayev@gmail.com>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-18 19:05:41 +01:00
Alain Volmat
e8ea342dff drivers: video: ov5640: make window settings human readable
Reformat OV5640 window settings for each resolution in order
to make them human readable.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
649231bd3b drivers: video: ov5640: use common window setting in MIPI/DVP
Use same window settings for both MIPI and DVP mode, helping reducing
the code size of the driver as well.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
c13924c94c drivers: video: ov5640: add frmival support for DVP
Add frmival support for DVP based OV5640, making it common
with the MIPI related code.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
056aeb2233 drivers: video: ov5640: rename frmival struct into ov5640_frmrate_config
In preparation for making DVP frmrate handling common with the existing
MIPI one, rename the structure ov5640_mipi_frmrate_config into
ov5640_frmrate_config as well as associated tables.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
124a9ffc61 drivers: video: ov5640: avoid output format in init_common_dvp
Avoid setting the output format as part of init_common_dvp since
this is set via the ov5640_set_fmt function as well.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
4e13b6c0ba drivers: video: ov5640: allow dvp polarity configuration via dt
Add handling of polarity configuration via endpoint video bindings.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
0c85c19a41 drivers: video: ov5640: use available macros for registers
Use available register macros whenever possible.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
bca8cbdc40 drivers: video: ov5640: avoid duplicated dvp register settings
Remove from init_common_dvp registers which are set via the set_fmt.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
a3c6f8a0bd drivers: video: ov5640: avoid DVP specific HFLIP/VFLIP settings
HFLIP/VFLIP settings are already done as part of the common init
sequence so avoid changing them specifically in the dvp part as
this is also accessible via dedicated controls.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Alain Volmat
d1cc3b786e drivers: video: ov5640: perform ID check first at init
Perform the sensor ID register check first before doing anything
else after the reset of the sensor.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-08-08 16:30:30 -04:00
Kurt Eckhardt
0b794298bb video: stm32_dcmi: Snapshot mode
Add the ability to run cameras in a logical
snapshot mode instead of always running
in video mode.  In particular, the camera
starts when you ask for an image to be dequeued
and stops when it receives an image.

There are two ways to setup to run in this mode:

a) Tell it to do so in the overlay by giving the DCMI object
the property: snapshot-mode

b) At run time:  I added a video control: VIDEO_CID_SNAPSHOT_MODE
Which can have the values
    0 - normal - continuous video mode
    1 - snapshot - snapshot mode enabled.

As mentioned in the snapshot modes, the HAL DMA is stopped after each
image and restarted when the user asks for another image.  I added a
timeout default to 1 second, that handles the case where sometimes
the HAL is silently not successful in retrieving an image.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
2026-07-21 10:06:50 -04:00
Kurt Eckhardt
de02f6db73 video: stm32_dcmi: HAL_DCMI_Stop failures now DBG
When HAL_DCM_Stop return an error code, their failure does not
appear to be a real failure, but instead it is more like it
simply did not have to do anything.  As such changed from reporting
it from LOG_WRN to LOG_DBG

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
2026-07-21 10:06:50 -04:00
Josuah Demangeon
93511748ee video: import source content from drivers/video
Move most of the shared sources from drivers/video/ into subsys/video/.
The content left in drivers/video/ is now only used by drivers, or
drivers themselves.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-07-17 19:04:54 -04:00
Josuah Demangeon
a0666f3877 drivers: video: only use <zephyr/drivers/video.h> for API shims
Move all the content of <zephyr/drivers/video.h> to a separate include
file in <zephyr/video/video.h> except driver entry points, all with a
video_drivers_... prefix.

Video control IDs are now in <zephyr/video/controls.h> and included
from both <zephyr/drivers/video.h> and <zephyr/video/video.h>.

Video format FourCCs are now in <zephyr/video/formats.h> and included
from both <zephyr/drivers/video.h> and <zephyr/video/video.h>.

As a side effect, introduce a video subsystem in MAINTAINERS.yml

Signed-off-by: Josuah Demangeon <me@josuah.net>
2026-07-17 19:04:54 -04:00
Alain Volmat
22b33e9a25 drivers: video: ensure to enable GPIO when needed by modules
Ensure to select GPIO whenever a driver requires a gpios
line for reset or powerdown.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-07-13 10:23:19 +01:00
Phi Bang Nguyen
e8a80a3117 drivers: video: Improve video_import_buffer
Return the whole video_buffer structure instead of just the index.
This helps to make index transparent to application and also make the
buffer accessible from the application.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2026-07-13 10:22:19 +01:00
Hong Nguyen
1e0f27c933 drivers: video: mt9m114: fix uninitialized reg write for 1 byte
1-byte write in mt9m114_write_reg() was not assigned to `val` variable,
which caused uninitialized value to be written to the register, and
causing corrupted / invalid byte write.

Introduced from commit e3a7a32334

Signed-off-by: Hong Nguyen <hong.nguyen.k54@gmail.com>
2026-07-08 10:03:26 +02:00
Mohammad Massoudi
9189b14fd6 driver: video: sw_generator: Add H.264 support
Add optional H.264 test stream support to the video software generator.
Generate the Annex-B stream at build time with ffmpeg and copy one access
unit into each video buffer.

Signed-off-by: Mohammad Massoudi <m.massoudi32@gmail.com>
2026-06-23 09:10:47 -04:00
Alain Volmat
60dbbc9303 drivers: video: stm32-jpeg: adjust HAL select for all series
Depending on the series, the JPEG HAL requires either MDMA or
DMA HAL and for some series DMA_EX HAL is required as well.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-06-18 14:38:13 -04:00
Kate Wang
e954c173c6 drivers: video: fix ov7670 initialization and add PCLK configuration
- Add pclk-hb-disable DTS property to control PCLK toggling
during horizontal blank periods. Different camera receivers may
have different requirement on this configuration.
- Reorder initialization sequence to apply format settings after
the common initialization table. Different format may apply differnt
configurations and overwrite the default configurations.
- Change the input XCLK frequency from 6MHz to 24MHz. According to
the data sheet and software application note, the camera sensor
requires the clock to be within the range of 10~48 MHz and the
typical value is 24 MHz. It can work with 6MHz XCLK but the
performance is not ideal. For example it glitches with VGA resolution.
- Fix resolution-specific register tables for QCIF, CIF, and VGA modes
with corrected timing and gamma settings for OV7670. When the OV7670
driver was originally enabled with the camera receiver smartdma, only
the QVGA resolution is tested, since smartdma can only support this
resolution, the others are not tested.
- Fix comment typo: case 352 is CIF, not QCIF
- Fix array size bug in QVGA format selection

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-06-18 09:09:57 -05:00