]> git.ipfire.org Git - thirdparty/kernel/stable.git/log
thirdparty/kernel/stable.git
6 weeks agodt-bindings: media: imx274: Make clocks property required
Laurent Pinchart [Tue, 12 Aug 2025 21:45:12 +0000 (00:45 +0300)] 
dt-bindings: media: imx274: Make clocks property required

The sensor requires an external clock, and drivers need to access the
clock to retrieve its frequency in order to configure the sensor. This
makes usage of the clocks property mandatory for a system to work
properly. Mark the clocks and clock-names properties as required, and
update the example accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: imx258: Make clocks property required
Laurent Pinchart [Tue, 12 Aug 2025 21:45:11 +0000 (00:45 +0300)] 
dt-bindings: media: imx258: Make clocks property required

The sensor requires an external clock, and drivers need to access the
clock to retrieve its frequency in order to configure the sensor. This
makes usage of the clocks property mandatory for a system to work
properly. Mark the property as required.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: et8ek8: Deprecate clock-frequency property
Laurent Pinchart [Tue, 12 Aug 2025 21:45:10 +0000 (00:45 +0300)] 
dt-bindings: media: et8ek8: Deprecate clock-frequency property

Usage of the clock-frequency property for camera sensors is discouraged
in favour of using assigned-clock-rates (and assigned-clock-parents
where needed). Drop the property, and update the example accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: Deprecate clock-frequency property for camera sensors
Laurent Pinchart [Wed, 13 Aug 2025 09:49:23 +0000 (12:49 +0300)] 
dt-bindings: media: Deprecate clock-frequency property for camera sensors

Usage of the clock-frequency property for camera sensors is discouraged
in favour of using assigned-clock-rates (and assigned-clock-parents
where needed). Mark the property as deprecated.

Update the examples accordingly. In DT examples where the sensor input
clock appears to come from a programmable clock generator, replace
clock-frequency by the assigned-clocks and assigned-clock-rates
properties. Otherwise, just drop clock-frequency.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: add ov2735 image sensor driver
Hardevsinh Palaniya [Fri, 29 Aug 2025 09:09:51 +0000 (14:39 +0530)] 
media: i2c: add ov2735 image sensor driver

Add a v4l2 subdevice driver for the Omnivision OV2735 sensor.

The Omnivision OV2735 is a 1/2.7-Inch CMOS image sensor with an
active array size of 1920 x 1080.

The following features are supported:
- Manual exposure an gain control support
- vblank/hblank control support
- Test pattern support control
- Supported resolution: 1920 x 1080 @ 30fps (SGRBG10)

Co-developed-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
[Sakari Ailus: Use container_of_const(), fix enum_bus_code condition.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: i2c: Add ov2735 sensor
Himanshu Bhavani [Fri, 29 Aug 2025 09:09:50 +0000 (14:39 +0530)] 
dt-bindings: media: i2c: Add ov2735 sensor

Add bindings for Omnivision OV2735 sensor.

Add MAINTAINERS entry for Omnivision OV2735 binding documentation

Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: Add OmniVision OG0VE1B camera sensor
Vladimir Zapolskiy [Fri, 29 Aug 2025 14:42:42 +0000 (17:42 +0300)] 
media: i2c: Add OmniVision OG0VE1B camera sensor

OmniVision OG0VE1B is a monochrome image sensor, which produces frames in
8/10-bit raw output format and supports 640x480, 400x400, 200x200 and
100x100 output image resolution modes.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: i2c: Add OmniVision OG0VE1B camera sensor
Vladimir Zapolskiy [Fri, 29 Aug 2025 14:42:41 +0000 (17:42 +0300)] 
dt-bindings: media: i2c: Add OmniVision OG0VE1B camera sensor

Add device tree bindings documentation for OmniVision OG0VE1B camera
sensor.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: Add OmniVision OV6211 image sensor driver
Vladimir Zapolskiy [Fri, 29 Aug 2025 14:42:32 +0000 (17:42 +0300)] 
media: i2c: Add OmniVision OV6211 image sensor driver

OmniVision OV6211 is a monochrome image sensor, which produces frames in
8/10-bit raw output format and supports 400x400, 200x200 and 100x100
output image resolution modes.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: i2c: Add OmniVision OV6211 image sensor
Vladimir Zapolskiy [Fri, 29 Aug 2025 14:42:31 +0000 (17:42 +0300)] 
dt-bindings: media: i2c: Add OmniVision OV6211 image sensor

Add device tree bindings documentation for OmniVision OV6211 image
sensor.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: ov08x40: Fix the horizontal flip control
Hao Yao [Fri, 25 Apr 2025 04:33:25 +0000 (12:33 +0800)] 
media: ov08x40: Fix the horizontal flip control

The datasheet of ov08x40 doesn't match the hardware behavior.
0x3821[2] == 1 is the original state and 0 the horizontal flip enabled.

Signed-off-by: Hao Yao <hao.yao@intel.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Tested-by: Hans de Goede <hansg@kernel.org> # ThinkPad X1 Carbon Gen 12 & Gen 13
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: og01a1b: Specify monochrome media bus format instead of Bayer
Vladimir Zapolskiy [Sat, 23 Aug 2025 13:22:06 +0000 (16:22 +0300)] 
media: i2c: og01a1b: Specify monochrome media bus format instead of Bayer

The OmniVision OG01A1B image sensor is a monochrome sensor, it supports
8-bit and 10-bit RAW output formats only.

That said the planar greyscale Y8/Y10 media formats are more appropriate
for the sensor instead of the originally and arbitrary selected SGRBG one,
since there is no red, green or blue color components.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: ov02e10: Remove Jingjing's e-mail address
Sakari Ailus [Fri, 29 Aug 2025 06:04:41 +0000 (09:04 +0300)] 
media: ov02e10: Remove Jingjing's e-mail address

Jingjing's e-mail address no longer works, remove it from the driver.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: ti: j721e-csi2rx: Fix NULL vs IS_ERR() bug in ti_csi2rx_request_max_ppc()
Dan Carpenter [Wed, 27 Aug 2025 13:02:57 +0000 (16:02 +0300)] 
media: ti: j721e-csi2rx: Fix NULL vs IS_ERR() bug in ti_csi2rx_request_max_ppc()

The media_entity_remote_source_pad_unique() function never returns NULL,
it returns error pointers.  Change this check from a NULL check to an
IS_ERR() check.

Fixes: 31f91c5224cd ("media: ti: j721e-csi2rx: Support multiple pixels per clock")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: stm32-dcmi: use int type to store negative error codes
Qianfeng Rong [Wed, 27 Aug 2025 12:39:12 +0000 (20:39 +0800)] 
media: stm32-dcmi: use int type to store negative error codes

Change "ret" from unsigned int to int type in dcmi_framesizes_init()
and dcmi_graph_notify_bound() to store negative error codes or zero
returned by v4l2_subdev_call() and media_create_pad_link() - this
better aligns with the coding standards and maintains code consistency.

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: raspberrypi: use int type to store negative error codes
Qianfeng Rong [Wed, 27 Aug 2025 12:39:11 +0000 (20:39 +0800)] 
media: raspberrypi: use int type to store negative error codes

Use int instead of unsigned int for the 'ret' variable in csi2_init() to
store negative error codes or zero returned by media_entity_pads_init().

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: mt9v111: fix incorrect type for ret
Qianfeng Rong [Wed, 27 Aug 2025 12:39:10 +0000 (20:39 +0800)] 
media: i2c: mt9v111: fix incorrect type for ret

Change "ret" from unsigned int to int type in mt9v111_calc_frame_rate()
to store negative error codes or zero returned by __mt9v111_hw_reset()
and other functions.

Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants.

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Fixes: aab7ed1c3927 ("media: i2c: Add driver for Aptina MT9V111")
Cc: stable@vger.kernel.org
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: ov8865: move mode_configure out of state_configure
Allen Ballway [Wed, 23 Jul 2025 19:57:35 +0000 (12:57 -0700)] 
media: ov8865: move mode_configure out of state_configure

ov8865_mode_configure() only needs to be called on sensor init, but it can
be called multiple times from ov8865_state_configure(). Move
ov8865_mode_configure() to ov8865_sensor_init().

Signed-off-by: Allen Ballway <ballway@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: mt9p031: fix mbus code initialization
Hans Verkuil [Thu, 24 Apr 2025 09:27:30 +0000 (11:27 +0200)] 
media: i2c: mt9p031: fix mbus code initialization

The mediabus code is device dependent, but the probe() function
thought that device_get_match_data() would return the code directly,
when in fact it returned a pointer to a struct mt9p031_model_info.

As a result, the initial mbus code was garbage.

Tested with a BeagleBoard xM and a Leopard Imaging LI-5M03 sensor board.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Tested-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Fixes: a80b1bbff88b ("media: mt9p031: Refactor format handling for different sensor models")
Cc: stable@vger.kernel.org
6 weeks agomedia: staging: ipu7: Don't include linux/version.h
Sakari Ailus [Sat, 28 Jun 2025 14:18:01 +0000 (17:18 +0300)] 
media: staging: ipu7: Don't include linux/version.h

linux/version.h isn't needed by the driver, don't include it.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: mc: Clear minor number reservation at unregistration time
Sakari Ailus [Mon, 11 Mar 2024 11:13:08 +0000 (13:13 +0200)] 
media: mc: Clear minor number reservation at unregistration time

Clear the media device's minor number reservation at unregister time as
there's no need to keep it reserved for longer. This makes it possible to
reserve the same minor right after unregistration.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: venus: core: Add qcm2290 DT compatible and resource data
Jorge Ramirez-Ortiz [Thu, 14 Aug 2025 08:52:46 +0000 (10:52 +0200)] 
media: venus: core: Add qcm2290 DT compatible and resource data

Add a qcm2290 compatible binding to the Venus core.

The maximum concurrency is video decode at 1920x1080 (FullHD) with video
encode at 1280x720 (HD).

The driver is not available to firmware versions below 6.0.55 due to an
internal requirement for secure buffers.

The bandwidth tables incorporate a conservative safety margin to ensure
stability under peak DDR and interconnect load conditions.

Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: venus: core: Sort dt_match alphabetically.
Jorge Ramirez-Ortiz [Thu, 14 Aug 2025 08:52:45 +0000 (10:52 +0200)] 
media: venus: core: Sort dt_match alphabetically.

Correctly sort the array of venus_dt_match entries.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: venus: hfi_plat_v4: Add capabilities for the 4XX lite core
Jorge Ramirez-Ortiz [Thu, 14 Aug 2025 08:52:44 +0000 (10:52 +0200)] 
media: venus: hfi_plat_v4: Add capabilities for the 4XX lite core

Populate the HFI v4 lite capability set used by the AR50_LITE video
core.

These capabilities define the supported codec formats and operational
limits specific to this streamlined VPU variant.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: venus: Add framework support for AR50_LITE video core
Jorge Ramirez-Ortiz [Thu, 14 Aug 2025 08:52:43 +0000 (10:52 +0200)] 
media: venus: Add framework support for AR50_LITE video core

The AR50_LITE is a simplified variant of the AR50 video core, designed for
power and cost-efficient platforms.

It supports hardware-accelerated decoding of H.264, HEVC, and VP9 formats,
and provides encoding support for H.264 and HEVC.

This commit prepares the framework to enable the AR50_LITE (it does not
enable it).

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: venus: Define minimum valid firmware version
Jorge Ramirez-Ortiz [Thu, 14 Aug 2025 08:52:42 +0000 (10:52 +0200)] 
media: venus: Define minimum valid firmware version

Add support for specifying the minimum firmware version required for
correct operation.

When set, the driver compares this value against the version reported by
the firmware: if the firmware is older than required, driver
initialization will fail.

The version check is performed before creating dynamic device tree
nodes, to avoid the need for reverting nodes on failure.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: venus: firmware: Use correct reset sequence for IRIS2
Stephan Gerhold [Wed, 20 Aug 2025 15:16:39 +0000 (17:16 +0200)] 
media: venus: firmware: Use correct reset sequence for IRIS2

When starting venus with the "no_tz" code path, IRIS2 needs the same
boot/reset sequence as IRIS2_1. This is because most of the registers were
moved to the "wrapper_tz_base", which is already defined for both IRIS2 and
IRIS2_1 inside core.c. Add IRIS2 to the checks inside firmware.c as well to
make sure that it uses the correct reset sequence.

Both IRIS2 and IRIS2_1 are HFI v6 variants, so the correct sequence was
used before commit c38610f8981e ("media: venus: firmware: Sanitize
per-VPU-version").

Fixes: c38610f8981e ("media: venus: firmware: Sanitize per-VPU-version")
Cc: stable@vger.kernel.org
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[bod: Fixed commit log IRIS -> IRIS2]
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: dt-bindings: venus: Add qcm2290 dt schema
Jorge Ramirez-Ortiz [Thu, 14 Aug 2025 08:52:41 +0000 (10:52 +0200)] 
media: dt-bindings: venus: Add qcm2290 dt schema

Add a schema for the venus video encoder/decoder on the qcm2290.

The order of the IOMMU list is strict: the first two entries correspond
to non-secure IOMMUs, and the remaining three to secure IOMMUs.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agogpu: drm: display: drm_dp_cec: update Hans' email address
Hans Verkuil [Tue, 24 Jun 2025 06:47:15 +0000 (08:47 +0200)] 
gpu: drm: display: drm_dp_cec: update Hans' email address

Replace hverkuil@xs4all.nl by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agomedia: update Hans Verkuil's email address
Hans Verkuil [Tue, 24 Jun 2025 06:46:18 +0000 (08:46 +0200)] 
media: update Hans Verkuil's email address

Replace hverkuil@xs4all.nl by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agomedia: include: update Hans Verkuil's email address
Hans Verkuil [Tue, 24 Jun 2025 06:41:15 +0000 (08:41 +0200)] 
media: include: update Hans Verkuil's email address

Replace hverkuil@xs4all.nl by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agoDocumentation: update Hans Verkuil's email address
Hans Verkuil [Tue, 24 Jun 2025 06:39:35 +0000 (08:39 +0200)] 
Documentation: update Hans Verkuil's email address

Replace hverkuil@xs4all.nl by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agomedia: update Hans Verkuil's email address
Hans Verkuil [Tue, 24 Jun 2025 06:36:16 +0000 (08:36 +0200)] 
media: update Hans Verkuil's email address

Replace hansverk@cisco.com by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agomedia: v4l2-core: update Hans Verkuil's email address
Hans Verkuil [Tue, 24 Jun 2025 06:34:49 +0000 (08:34 +0200)] 
media: v4l2-core: update Hans Verkuil's email address

Replace hverkuil-cisco@xs4all.nl by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agoDocumentation: media: update Hans Verkuil's email address
Hans Verkuil [Tue, 24 Jun 2025 06:34:03 +0000 (08:34 +0200)] 
Documentation: media: update Hans Verkuil's email address

Replace hverkuil-cisco@xs4all.nl by hverkuil@kernel.org.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agoMAINTAINERS: update Hans Verkuil's email addresses
Hans Verkuil [Tue, 24 Jun 2025 06:31:11 +0000 (08:31 +0200)] 
MAINTAINERS: update Hans Verkuil's email addresses

Use hverkuil@kernel.org as the main address for kernel work.

Signed-off-by: Hans Verkuil <hverkuil@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agomedia: i2c: tc358743: add support for more infoframe types
Hans Verkuil [Tue, 22 Jul 2025 07:34:36 +0000 (09:34 +0200)] 
media: i2c: tc358743: add support for more infoframe types

Add support for SPD, AUDIO, DRM and HDMI InfoFrames.

Also add support for ISRC1 and ISRC2 Packet Types and a programmable
type for both Packet and InfoFrames.

The tc358743 HDMI-to-CSI2 bridge is widely available, and it has quite
flexible InfoFrame/Packet Type support, so this makes it a very nice
device to capture such data.

The ACP (Audio Content Protection) Packet capture data is chosen as the
programmable type. ACP is typically only used for protected audio, which
is quite rare, so instead it is reprogrammed to capture DRM InfoFrames
by default. This can be changed by using the packet_type module option to
anything you want, and you can change it on the fly as well. It will be
updated whenever VIDIOC_LOG_STATUS is called (it's really a debug feature).

Tested on my Raspberry Pi 5.

Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
6 weeks agomedia: v4l2-core: v4l2-dv-timings: support DRM IFs
Hans Verkuil [Tue, 22 Jul 2025 07:34:35 +0000 (09:34 +0200)] 
media: v4l2-core: v4l2-dv-timings: support DRM IFs

Add support for DRM (Dynamic Range and Mastering) InfoFrames.

Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
7 weeks agomedia: uapi: v4l2-controls: Cleanup codec definitions
Paul Kocialkowski [Sun, 24 Aug 2025 18:07:34 +0000 (20:07 +0200)] 
media: uapi: v4l2-controls: Cleanup codec definitions

Move some fields closer to where they are used, add missing tabs
and remove an extra newline.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: chips-media: wave5: Remove redundant ternary operators
Liao Yuanhong [Tue, 26 Aug 2025 14:52:43 +0000 (22:52 +0800)] 
media: chips-media: wave5: Remove redundant ternary operators

For ternary operators in the form of a ? true : false, if a itself returns
a boolean result, the ternary operator can be omitted. Remove redundant
ternary operators to clean up the code.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: verisilicon: Explicitly disable selection api ioctls for decoders
Paul Kocialkowski [Thu, 28 Aug 2025 13:49:18 +0000 (15:49 +0200)] 
media: verisilicon: Explicitly disable selection api ioctls for decoders

Call the dedicated v4l2_disable_ioctl helper instead of manually
checking whether the current context is an encoder for the selection
api ioctls.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: verisilicon: imx8m: Use the default Hantro G1 irq handler
Paul Kocialkowski [Thu, 28 Aug 2025 13:58:20 +0000 (15:58 +0200)] 
media: verisilicon: imx8m: Use the default Hantro G1 irq handler

The existing imx8m_vpu_g1_irq implementation is an exact copy of the
default hantro_g1_irq one. Switch over to it instead of keeping a
duplicated implementation.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agoMAINTAINERS: merge sections for ROCKCHIP VIDEO DECODER DRIVER
Lukas Bulwahn [Tue, 15 Jul 2025 06:31:34 +0000 (08:31 +0200)] 
MAINTAINERS: merge sections for ROCKCHIP VIDEO DECODER DRIVER

Commit d968e50b5c26 ("media: rkvdec: Unstage the driver") moves the driver
from staging/media/ to media/platform/rockchip/ and adds a new section
ROCKCHIP RKVDEC VIDEO DECODER DRIVER in MAINTAINERS. It seems that it was
overlooked that the section ROCKCHIP VIDEO DECODER DRIVER in MAINTAINERS
already existed, referring to the same files before the driver was moved
as the new section refers to after the driver was moved.

So, merge the information from the two sections for ROCKCHIP (RKVDEC) VIDEO
DECODER DRIVER into one. This essentially results in adding the maintainer
of the previously existing section in the new section and then removing
that previously existing section.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: platform: mtk-mdp3: Add missing MT8188 compatible to comp_dt_ids
Nícolas F. R. A. Prado [Fri, 6 Jun 2025 13:14:22 +0000 (09:14 -0400)] 
media: platform: mtk-mdp3: Add missing MT8188 compatible to comp_dt_ids

Commit 4a81656c8eaa ("arm64: dts: mediatek: mt8188: Address binding
warnings for MDP3 nodes") caused a regression on the MDP functionality
when it removed the MT8195 compatibles from the MDP3 nodes, since the
MT8188 compatible was not yet listed as a possible MDP component
compatible in mdp_comp_dt_ids. This resulted in an empty output
bitstream when using the MDP from userspace, as well as the following
errors:

  mtk-mdp3 14001000.dma-controller: Uninit component inner id 4
  mtk-mdp3 14001000.dma-controller: mdp_path_ctx_init error 0
  mtk-mdp3 14001000.dma-controller: CMDQ sendtask failed: -22

Add the missing compatible to the array to restore functionality.

Fixes: 4a81656c8eaa ("arm64: dts: mediatek: mt8188: Address binding warnings for MDP3 nodes")
Cc: stable@vger.kernel.org
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Only validate format in querystd
Niklas Söderlund [Thu, 28 Aug 2025 16:06:54 +0000 (18:06 +0200)] 
media: adv7180: Only validate format in querystd

The .querystd callback should not program the device with the detected
standard, it should only report the standard to user-space. User-space
may then use .s_std to set the standard, if it wants to use it.

All that is required of .querystd is to setup the auto detection of
standards and report its findings.

While at it add some documentation on why this can't happen while
streaming and improve the error handling using a scoped guard.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Only validate format in s_std
Niklas Söderlund [Thu, 28 Aug 2025 16:06:53 +0000 (18:06 +0200)] 
media: adv7180: Only validate format in s_std

The .s_std callback should not write the new format directly do the
device, it should only store it and have it applied by .s_stream.

As .s_stream already calls adv7180_program_std() all that is needed
is to check the standard is valid, and store it for .s_stream to
program.

While at it add a scoped guard to simplify the error handling.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Do not write format to device in set_fmt
Niklas Söderlund [Thu, 28 Aug 2025 16:06:52 +0000 (18:06 +0200)] 
media: adv7180: Do not write format to device in set_fmt

The .set_fmt callback should not write the new format directly do the
device, it should only store it and have it applied by .s_stream.

The .s_stream callback already calls adv7180_set_field_mode() so it's
safe to remove programming of the device and just store the format and
have .s_stream apply it.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Remove the s_power callback
Niklas Söderlund [Thu, 28 Aug 2025 16:06:51 +0000 (18:06 +0200)] 
media: adv7180: Remove the s_power callback

The s_power callback is used a bit oddly in adv7180, the callback
adv7180_set_power() do not control power to the chip itself, but
rather the power to the chips decoder.

When the decoder is powered the chip process video data, or if no video
source is available freeruns. When the decoder is off the device i2c
registers are still powered and the device can be configured.

In the current s_power implementation the device starts to transmit
video data as soon as it's powered, and the s_stream operation only
tracks if s_stream have been called or not.

The actual configuration of the device happens when the configuration
IOCTLs are called. Sometimes with very odd implementations where the
decoder have to first be power off, the device configured, and then
unconditionally power on, see adv7180_set_pad_format() for an example.

As a first step to remedy this remove the s_power callback altogether
and instead completely initialize the device from s_stream. Future work
will clean up the IOCTL callbacks that directly configures the device
that is also done by init_device().

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Split device initialization and reset
Niklas Söderlund [Thu, 28 Aug 2025 16:06:50 +0000 (18:06 +0200)] 
media: adv7180: Split device initialization and reset

The two different tasks of resetting and initializing the devices, and
configured the video formats are grouped lumped together in a single
function. These two tasks are then only performed at probe time, or when
resuming from suspend. Configuration of formats are then done directly
by the IOCTL callbacks, such as .set_fmt.

Prepare for reworking the driver to only reset the device at probe and
resume, and configuring all video formats in .s_stream instead of in
each IOCTL callback by splitting the two tasks in two different
functions.

At this point there is no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Power down decoder when configuring the device
Niklas Söderlund [Thu, 28 Aug 2025 16:06:49 +0000 (18:06 +0200)] 
media: adv7180: Power down decoder when configuring the device

Some variants of the chip (ADV7180) have it's decoder powered up after
reset, while others (ADV7280, ADV7281, ADV7282, ADV7283) have it powered
down.

This is tracked by the feature flag ADV7180_FLAG_RESET_POWERED. At probe
this flag is used to initialize the state variable powered which keeps
track of if the decoder is powered on, or off, for the resume callback.

This however misses that the decoder needs to be powered off for some
configuration of the device to take hold. So for devices where it's left
on (ADV7180) the format configuration at probe time have little effect.
This worked as the .set_fmt callback powers down the decoder, updates
the format, and powers back on the decoder.

Before moving all configuration to .s_stream this needs to be fixed.
Instead of tracking if the decoder is powered on or off, use the
flag to determine if needs to be powered down after a reset to do the
configuration.

To keep the behavior consistent with the currents implementation switch
the decoder back on for devices where this is the reset behavior. The
primary reason for this is that if not done the first 35+ frames or so
of the capture session is garbage.

To keep the support of starting the decoder when resuming from sleep on
devices where the reset behavior is to start with the decoder powered
off, use the state variable streaming. If it is set the decoder was
powered on when the system suspended so we know to start it again when
resuming.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
[hverkuil: fix typo in comment: where -> were]

7 weeks agomedia: adv7180: Setup controls every time the device is reset
Niklas Söderlund [Thu, 28 Aug 2025 16:06:48 +0000 (18:06 +0200)] 
media: adv7180: Setup controls every time the device is reset

The device initialization code resets the whole device, thus the initial
controls set at probe are lost as adv7180_init_controls() are called
before init_device(). Additionally the controls were never restored
after the device where reset coming back from suspend.

Solve this by separate the setup of the controls from the creation of
them, and always set them up when the device is reset.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Use v4l2-ctrls core to handle s_ctrl locking
Niklas Söderlund [Thu, 28 Aug 2025 16:06:47 +0000 (18:06 +0200)] 
media: adv7180: Use v4l2-ctrls core to handle s_ctrl locking

Instead of handling the state lock ourself in .s_ctrl use the v4l2-ctrls
core to handle it for us. This will allow us later to use the unlocked
__v4l2_ctrl_handler_setup() in initialization code where the state lock
is already held.

Add a lockdep assert to demonstrate the mutex must be held when setting
controls.

There is no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Move state mutex handling outside init_device()
Niklas Söderlund [Thu, 28 Aug 2025 16:06:46 +0000 (18:06 +0200)] 
media: adv7180: Move state mutex handling outside init_device()

Future rework to get rid of .s_power requires the state mutex to be
held for multiple operations where initializing the device is one of
them.

Move lock handling outside init_device() but enforce the lock is held
with a lockdep_assert_held().

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Add missing lock in suspend callback
Niklas Söderlund [Thu, 28 Aug 2025 16:06:45 +0000 (18:06 +0200)] 
media: adv7180: Add missing lock in suspend callback

The adv7180_set_power() utilizes adv7180_write() which in turn requires
the state mutex to be held, take it before calling adv7180_set_power()
to avoid tripping a lockdep_assert_held().

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: adv7180: Move adv7180_set_power() and init_device()
Niklas Söderlund [Thu, 28 Aug 2025 16:06:44 +0000 (18:06 +0200)] 
media: adv7180: Move adv7180_set_power() and init_device()

Move the two functions adv7180_set_power() and init_device() earlier in
the file so they in future changes can be used from .querystd and
.s_stream as the driver is reworked to drop the usage of .s_power.

While at it fix two style issues in init_device() that checkpatch
complains about.

  - Two cases of indentation issues for function arguments split over
    multiple lines.

  - The repetition of the word 'interrupts' in a comment.

Apart from these style fixes the functions are moved verbatim and there
are no functional changes.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: rkisp1: Add support for multiple power domains
Laurent Pinchart [Mon, 16 Jun 2025 01:11:14 +0000 (04:11 +0300)] 
media: rkisp1: Add support for multiple power domains

The ISP instances in the NXP i.MX8MP need two power domains. While
single power domains are managed automatically by the device core,
support for multiple power domains requires manually attaching to the
power domains. Do so based on platform data.

Link: https://lore.kernel.org/r/20250616011115.19515-6-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: rkisp1: Acquire pclk clock on i.MX8MP
Laurent Pinchart [Mon, 16 Jun 2025 01:11:13 +0000 (04:11 +0300)] 
media: rkisp1: Acquire pclk clock on i.MX8MP

The ISP instances in the NXP i.MX8MP need the input pixel clock to be
enabled in order to access the HDR stitching registers. The clock should
ideally be mandatory, but that would break backward compatibility with
old DT. Try to acquire it as an optional clock instead.

Link: https://lore.kernel.org/r/20250616011115.19515-5-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: rkisp1: Refactor clocks initialization
Laurent Pinchart [Mon, 16 Jun 2025 01:11:12 +0000 (04:11 +0300)] 
media: rkisp1: Refactor clocks initialization

ISP instances in different SoCs differ in the number of clocks they use,
but not in the clock names. Refactor clocks initialization to avoid
duplicating the clock names per platform, and lower the total number of
clocks from 8 to 4 as no platform uses more than 4 clocks. Use a static
assert to ensure at build time that the size of the arrays match.

Link: https://lore.kernel.org/r/20250616011115.19515-4-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agodt-bindings: media: rkisp1: Add second power domain on i.MX8MP
Laurent Pinchart [Mon, 16 Jun 2025 01:11:11 +0000 (04:11 +0300)] 
dt-bindings: media: rkisp1: Add second power domain on i.MX8MP

In the NXP i.MX8MP, the pclk clock required by the ISP is gated by the
MIPI CSI-2 power domain. Add it to the power-domains property, and
require specifying power-domain-names accordingly.

Link: https://lore.kernel.org/r/20250616011115.19515-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agodt-bindings: media: rkisp1: Require pclk clock on i.MX8MP variant
Laurent Pinchart [Mon, 16 Jun 2025 01:11:10 +0000 (04:11 +0300)] 
dt-bindings: media: rkisp1: Require pclk clock on i.MX8MP variant

The ISP integrated in the NXP i.MX8MP requires the pclk clock to access
the HDR stitching registers. Make it mandatory in the DT binding.

Link: https://lore.kernel.org/r/20250616011115.19515-2-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: nxp: imx8-isi: m2m: Delay power up until streamon
Laurent Pinchart [Thu, 21 Aug 2025 13:51:23 +0000 (16:51 +0300)] 
media: nxp: imx8-isi: m2m: Delay power up until streamon

There's no need to power up the device when userspace opens it. Delay
the operation until streamon.

Link: https://lore.kernel.org/r/20250821135123.29462-2-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Tested-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: nxp: imx8-isi: m2m: Fix streaming cleanup on release
Guoniu Zhou [Thu, 21 Aug 2025 13:51:22 +0000 (16:51 +0300)] 
media: nxp: imx8-isi: m2m: Fix streaming cleanup on release

If streamon/streamoff calls are imbalanced, such as when exiting an
application with Ctrl+C when streaming, the m2m usage_count will never
reach zero and the ISI channel won't be freed. Besides from that, if the
input line width is more than 2K, it will trigger a WARN_ON():

[ 59.222120] ------------[ cut here ]------------
[ 59.226758] WARNING: drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c:631 at mxc_isi_channel_chain+0xa4/0x120, CPU#4: v4l2-ctl/654
[ 59.238569] Modules linked in: ap1302
[ 59.242231] CPU: 4 UID: 0 PID: 654 Comm: v4l2-ctl Not tainted 6.16.0-rc4-next-20250704-06511-gff0e002d480a-dirty #258 PREEMPT
[ 59.253597] Hardware name: NXP i.MX95 15X15 board (DT)
[ 59.258720] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 59.265669] pc : mxc_isi_channel_chain+0xa4/0x120
[ 59.270358] lr : mxc_isi_channel_chain+0x44/0x120
[ 59.275047] sp : ffff8000848c3b40
[ 59.278348] x29: ffff8000848c3b40 x28: ffff0000859b4c98 x27: ffff800081939f00
[ 59.285472] x26: 000000000000000a x25: ffff0000859b4cb8 x24: 0000000000000001
[ 59.292597] x23: ffff0000816f4760 x22: ffff0000816f4258 x21: ffff000084ceb780
[ 59.299720] x20: ffff000084342ff8 x19: ffff000084340000 x18: 0000000000000000
[ 59.306845] x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffdb369e1c
[ 59.313969] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[ 59.321093] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[ 59.328217] x8 : ffff8000848c3d48 x7 : ffff800081930b30 x6 : ffff800081930b30
[ 59.335340] x5 : ffff0000859b6000 x4 : ffff80008193ae80 x3 : ffff800081022420
[ 59.342464] x2 : ffff0000852f6900 x1 : 0000000000000001 x0 : ffff000084341000
[ 59.349590] Call trace:
[ 59.352025]  mxc_isi_channel_chain+0xa4/0x120 (P)
[ 59.356722]  mxc_isi_m2m_streamon+0x160/0x20c
[ 59.361072]  v4l_streamon+0x24/0x30
[ 59.364556]  __video_do_ioctl+0x40c/0x4a0
[ 59.368560]  video_usercopy+0x2bc/0x690
[ 59.372382]  video_ioctl2+0x18/0x24
[ 59.375857]  v4l2_ioctl+0x40/0x60
[ 59.379168]  __arm64_sys_ioctl+0xac/0x104
[ 59.383172]  invoke_syscall+0x48/0x104
[ 59.386916]  el0_svc_common.constprop.0+0xc0/0xe0
[ 59.391613]  do_el0_svc+0x1c/0x28
[ 59.394915]  el0_svc+0x34/0xf4
[ 59.397966]  el0t_64_sync_handler+0xa0/0xe4
[ 59.402143]  el0t_64_sync+0x198/0x19c
[ 59.405801] ---[ end trace 0000000000000000 ]---

Address this issue by moving the streaming preparation and cleanup to
the vb2 .prepare_streaming() and .unprepare_streaming() operations. This
also simplifies the driver by allowing direct usage of the
v4l2_m2m_ioctl_streamon() and v4l2_m2m_ioctl_streamoff() helpers.

Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250821135123.29462-1-laurent.pinchart@ideasonboard.com
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Co-developed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: nxp: imx8-isi: Add suspend/resume support for ISI mem2mem
Guoniu Zhou [Fri, 15 Aug 2025 09:28:51 +0000 (17:28 +0800)] 
media: nxp: imx8-isi: Add suspend/resume support for ISI mem2mem

Add suspend/resume support for ISI when work at memory to memory mode.

Link: https://lore.kernel.org/r/20250815-isi_m2m-v2-1-32e3720880cc@nxp.com
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: nxp: imx8-isi: Drop unused argument to mxc_isi_channel_chain()
Laurent Pinchart [Wed, 13 Aug 2025 22:55:01 +0000 (01:55 +0300)] 
media: nxp: imx8-isi: Drop unused argument to mxc_isi_channel_chain()

The bypass argument to the mxc_isi_channel_chain() function is unused.
Drop it.

Link: https://lore.kernel.org/r/20250813225501.20762-1-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: nxp: imx8-isi: Drop mxc_isi_video.is_streaming field
Laurent Pinchart [Wed, 13 Aug 2025 21:24:51 +0000 (00:24 +0300)] 
media: nxp: imx8-isi: Drop mxc_isi_video.is_streaming field

The mxc_isi_video.is_streaming field is used to track the streaming
status of the video device. The same information is also tracked by the
videobuf2 queue. Drop the is_streaming field, and check the queue
streaming status instead.

Link: https://lore.kernel.org/r/20250813212451.22140-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Richard Leitner <richard.leitner@linux.dev> # i.MX8MP
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: nxp: imx8-isi: Fix streaming cleanup on release
Richard Leitner [Wed, 13 Aug 2025 21:24:50 +0000 (00:24 +0300)] 
media: nxp: imx8-isi: Fix streaming cleanup on release

The current implementation unconditionally calls
mxc_isi_video_cleanup_streaming() in mxc_isi_video_release(). This can
lead to situations where any release call (like from a simple
"v4l2-ctl -l") may release a currently streaming queue when called on
such a device.

This is reproducible on an i.MX8MP board by streaming from an ISI
capture device using gstreamer:

gst-launch-1.0 -v v4l2src device=/dev/videoX ! \
    video/x-raw,format=GRAY8,width=1280,height=800,framerate=1/120 ! \
    fakesink

While this stream is running, querying the caps of the same device
provokes the error state:

v4l2-ctl -l -d /dev/videoX

This results in the following trace:

[  155.452152] ------------[ cut here ]------------
[  155.452163] WARNING: CPU: 0 PID: 1708 at drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c:713 mxc_isi_pipe_irq_handler+0x19c/0x1b0 [imx8_isi]
[  157.004248] Modules linked in: cfg80211 rpmsg_ctrl rpmsg_char rpmsg_tty virtio_rpmsg_bus rpmsg_ns rpmsg_core rfkill nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables mcp251x6
[  157.053499] CPU: 0 UID: 0 PID: 1708 Comm: python3 Not tainted 6.15.4-00114-g1f61ca5cad76 #1 PREEMPT
[  157.064369] Hardware name: imx8mp_board_01 (DT)
[  157.068205] pstate: 400000c5 (nZcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  157.075169] pc : mxc_isi_pipe_irq_handler+0x19c/0x1b0 [imx8_isi]
[  157.081195] lr : mxc_isi_pipe_irq_handler+0x38/0x1b0 [imx8_isi]
[  157.087126] sp : ffff800080003ee0
[  157.090438] x29: ffff800080003ee0 x28: ffff0000c3688000 x27: 0000000000000000
[  157.097580] x26: 0000000000000000 x25: ffff0000c1e7ac00 x24: ffff800081b5ad50
[  157.104723] x23: 00000000000000d1 x22: 0000000000000000 x21: ffff0000c25e4000
[  157.111866] x20: 0000000060000200 x19: ffff80007a0608d0 x18: 0000000000000000
[  157.119008] x17: ffff80006a4e3000 x16: ffff800080000000 x15: 0000000000000000
[  157.126146] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  157.133287] x11: 0000000000000040 x10: ffff0000c01445f0 x9 : ffff80007a053a38
[  157.140425] x8 : ffff0000c04004b8 x7 : 0000000000000000 x6 : 0000000000000000
[  157.147567] x5 : ffff0000c0400490 x4 : ffff80006a4e3000 x3 : ffff0000c25e4000
[  157.154706] x2 : 0000000000000000 x1 : ffff8000825c0014 x0 : 0000000060000200
[  157.161850] Call trace:
[  157.164296]  mxc_isi_pipe_irq_handler+0x19c/0x1b0 [imx8_isi] (P)
[  157.170319]  __handle_irq_event_percpu+0x58/0x218
[  157.175029]  handle_irq_event+0x54/0xb8
[  157.178867]  handle_fasteoi_irq+0xac/0x248
[  157.182968]  handle_irq_desc+0x48/0x68
[  157.186723]  generic_handle_domain_irq+0x24/0x38
[  157.191346]  gic_handle_irq+0x54/0x120
[  157.195098]  call_on_irq_stack+0x24/0x30
[  157.199027]  do_interrupt_handler+0x88/0x98
[  157.203212]  el0_interrupt+0x44/0xc0
[  157.206792]  __el0_irq_handler_common+0x18/0x28
[  157.211328]  el0t_64_irq_handler+0x10/0x20
[  157.215429]  el0t_64_irq+0x198/0x1a0
[  157.219009] ---[ end trace 0000000000000000 ]---

Address this issue by moving the streaming preparation and cleanup to
the vb2 .prepare_streaming() and .unprepare_streaming() operations. This
also simplifies the driver by allowing direct usage of the
vb2_ioctl_streamon() and vb2_ioctl_streamoff() helpers, and removal of
the manual cleanup from mxc_isi_video_release().

Link: https://lore.kernel.org/r/20250813212451.22140-2-laurent.pinchart@ideasonboard.com
Signed-off-by: Richard Leitner <richard.leitner@linux.dev>
Co-developed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Richard Leitner <richard.leitner@linux.dev> # i.MX8MP
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Initial support for multiple output channels
Laurent Pinchart [Fri, 22 Aug 2025 00:27:32 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Initial support for multiple output channels

Some CSIS instances feature more than one output channel. Update
register macros accordingly, parse the number of channels from the
device tree, and update register dumps and event counters to log
per-channel data.

Support for routing virtual channels and data types to output channels
through the subdev internal routing API will come later.

Link: https://lore.kernel.org/r/20250822002734.23516-13-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agodt-bindings: media: nxp,imx-mipi-csi2: Add fsl,num-channels property
Laurent Pinchart [Fri, 22 Aug 2025 00:27:31 +0000 (03:27 +0300)] 
dt-bindings: media: nxp,imx-mipi-csi2: Add fsl,num-channels property

The CSI-2 receiver can be instantiated with up to four output channels.
This is an integration-specific property, specify the number of
instantiated channels through a new fsl,num-channels property. The
property is optional, and defaults to 1 as only one channel is currently
supported by drivers.

Using the compatible string to infer the number of channels has been
considered, but multiple instances of the same CSIS in the same SoC
could conceptually be synthesized with a different number of channels.
An explicit property is therefore more appropriate.

The only known SoC to have more than one channel is the i.MX8MP. As the
binding examples do not cover that SoC, don't update them.

Link: https://lore.kernel.org/r/20250822002734.23516-12-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agodt-bindings: media: nxp,imx-mipi-csi2: Mark clock-frequency as deprecated
Laurent Pinchart [Fri, 22 Aug 2025 00:27:30 +0000 (03:27 +0300)] 
dt-bindings: media: nxp,imx-mipi-csi2: Mark clock-frequency as deprecated

Usage of the clock-frequency property, which is already optional, is
discouraged in favour of using assigned-clock-rates (and
assigned-clock-parents where needed). Mark the property as deprecated,
and update the examples accordingly.

Link: https://lore.kernel.org/r/20250822002734.23516-11-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Only set clock rate when specified in DT
Laurent Pinchart [Fri, 22 Aug 2025 00:27:29 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Only set clock rate when specified in DT

The imx-mipi-csis driver sets the rate of the wrap clock to the value
specified in the device tree's "clock-frequency" property, and defaults
to 166 MHz otherwise. This is a historical mistake, as clock rate
selection should have been left to the assigned-clock-rates property.

Honouring the clock-frequency property can't be removed without breaking
backwards compatibility, and the corresponding code isn't very
intrusive. The 166 MHz default, on the other hand, prevents
configuration of the clock rate through assigned-clock-rates, as the
driver immediately overwrites the rate. This behaviour is confusing and
has cost debugging time.

There is little value in a 166 MHz default. All mainline device tree
sources that enable the CSIS specify a clock-frequency explicitly, and
the default wrap clock configuration on supported platforms is at least
as high as 166 MHz. Drop the default, and only set the clock rate
manually when the clock-frequency property is specified.

Link: https://lore.kernel.org/r/20250822002734.23516-10-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Log per-lane start of transmission errors
Laurent Pinchart [Fri, 22 Aug 2025 00:27:28 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Log per-lane start of transmission errors

The CSIS has per-line start of transmission error interrupts. Log them
all, instead of only the first data lane.

Link: https://lore.kernel.org/r/20250822002734.23516-9-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Fix field alignment in register dump
Laurent Pinchart [Fri, 22 Aug 2025 00:27:27 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Fix field alignment in register dump

Commit 95a1379004cb ("media: staging: media: imx: imx7-mipi-csis: Dump
MIPI_CSIS_FRAME_COUNTER_CH0 register") forgot to increase the maximum
register name length, resulting in misalignment of names printed in the
kernel log. Fix it.

Link: https://lore.kernel.org/r/20250822002734.23516-8-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Use GENMASK for all register field masks
Laurent Pinchart [Fri, 22 Aug 2025 00:27:26 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Use GENMASK for all register field masks

Multiple register field mask macros use GENMASK, while other define the
mask value manually. Standardize on GENMASK everywhere, as well as on
the _MASK suffix to name the macros. This improves consistency and helps
with readability.

No functional change is intended.

Link: https://lore.kernel.org/r/20250822002734.23516-7-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Rename register macros to match reference manual
Laurent Pinchart [Fri, 22 Aug 2025 00:27:25 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Rename register macros to match reference manual

The CSIS driver uses register macro names that do not match the
reference manual of the i.MX7[DS] and i.MX8M[MNP] SoCs in which the CSIS
is integrated. Rename them to match the documentation, making the code
easier to read alongside the reference manuals.

One of the misnamed register fields is MIPI_CSIS_INT_SRC_ERR_UNKNOWN,
which led to the corresponding event being logged as "Unknown Error".
The correct register field name is MIPI_CSIS_INT_SRC_ERR_ID, documented
as "Unknown ID error". Update the event description accordingly.

While at it, also replace a few *_OFFSET macros with parametric macros
for consistency, and add the missing MIPI_CSIS_ISP_RESOL_VRESOL and
MIPI_CSIS_ISP_RESOL_HRESOL register field macros.

No functional change intended.

Link: https://lore.kernel.org/r/20250822002734.23516-6-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Shorten name of subdev state variables
Laurent Pinchart [Fri, 22 Aug 2025 00:27:24 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Shorten name of subdev state variables

Rename sd_state to state to standardize the naming of the subdev state
variables and help shortening lines.

No functional change is intended.

Link: https://lore.kernel.org/r/20250822002734.23516-5-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Standardize const keyword placement
Laurent Pinchart [Fri, 22 Aug 2025 00:27:23 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Standardize const keyword placement

The const keyword for pointer variables is placed before the type
everywhere except in one location. Change it to improve consistency.

No functional change is intended.

Link: https://lore.kernel.org/r/20250822002734.23516-4-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: imx-mipi-csis: Simplify access to source pad
Laurent Pinchart [Fri, 22 Aug 2025 00:27:22 +0000 (03:27 +0300)] 
media: imx-mipi-csis: Simplify access to source pad

The mipi_csis_calculate_params() function needs to access the pad of the
connected source. The pad is already available in csis->source.pad, but
the function takes a convoluted path by getting the pad index and
indexing the source subdev's pads array. Simplify it.

No functional change is intended.

Link: https://lore.kernel.org/r/20250822002734.23516-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: v4l2-common: Constify media_pad argument to v4l2_get_link_freq()
Laurent Pinchart [Fri, 22 Aug 2025 00:27:21 +0000 (03:27 +0300)] 
media: v4l2-common: Constify media_pad argument to v4l2_get_link_freq()

The v4l2_get_link_freq() macro doesn't modify the pad argument. Make it
possible to call it with a const media_pad pointer.

Link: https://lore.kernel.org/r/20250822002734.23516-2-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: pci: mgb4: Fix timings comparison in VIDIOC_S_DV_TIMINGS
Martin Tůma [Tue, 26 Aug 2025 16:28:29 +0000 (18:28 +0200)] 
media: pci: mgb4: Fix timings comparison in VIDIOC_S_DV_TIMINGS

Compare the whole v4l2_bt_timings struct, not just the width/height when
setting new timings. Timings with the same resolution and different
pixelclock can now be properly set.

Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: aspeed: Allow to capture from SoC display (GFX)
Jammy Huang [Tue, 26 Aug 2025 02:25:01 +0000 (10:25 +0800)] 
media: aspeed: Allow to capture from SoC display (GFX)

ASPEED BMC IC has 2 different display engines. Please find AST2600's
datasheet to get detailed information.

1. VGA on PCIe
2. SoC Display (GFX)

By default, video engine (VE) will capture video from VGA. This patch
adds an option to capture video from GFX with standard ioctl,
vidioc_s_input.

An enum, aspeed_video_input, is added for this purpose.
enum aspeed_video_input {
VIDEO_INPUT_VGA = 0,
VIDEO_INPUT_GFX,
VIDEO_INPUT_MAX
};

To test this feature, you will need to enable GFX first. Please refer to
ASPEED's SDK_User_Guide, 6.3.x Soc Display driver, for more information.
In your application, you will need to use v4l2 ioctl, VIDIOC_S_INPUT, as
below to select before start streaming.

int rc;
struct v4l2_input input;

input.index = VIDEO_INPUT_GFX;
rc = ioctl(fd, VIDIOC_S_INPUT, &input);
if (rc < 0)
{
...
}

Link: https://github.com/AspeedTech-BMC/openbmc/releases
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
[hverkuil: split up three overly long lines]

7 weeks agomedia: remove unneeded 'fast_io' parameter in regmap_config
Wolfram Sang [Wed, 13 Aug 2025 16:14:54 +0000 (18:14 +0200)] 
media: remove unneeded 'fast_io' parameter in regmap_config

When using MMIO with regmap, fast_io is implied. No need to set it
again.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: platform: mtk-mdp3: don't use %pK through printk
Thomas Weißschuh [Mon, 11 Aug 2025 07:46:49 +0000 (09:46 +0200)] 
media: platform: mtk-mdp3: don't use %pK through printk

In the past %pK was preferable to %p as it would not leak raw pointer
values into the kernel log.
Since commit ad67b74d2469 ("printk: hash addresses printed with %p")
the regular %p has been improved to avoid this issue.
Furthermore, restricted pointers ("%pK") were never meant to be used
through printk(). They can still unintentionally leak raw pointers or
acquire sleeping locks in atomic contexts.

Switch to the regular pointer formatting which is safer and
easier to reason about.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: em28xx: add special case for legacy gpiolib interface
Arnd Bergmann [Fri, 8 Aug 2025 15:17:55 +0000 (17:17 +0200)] 
media: em28xx: add special case for legacy gpiolib interface

The em28xx driver uses the old-style gpio_request_one() interface to
switch the lna on the PCTV 290E card.

This interface is becoming optional and should no longer be called by
portable drivers. As I could not figure out an obvious replacement,
select the new GPIOLIB_LEGACY symbol as a workaround.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: s5p-mfc: remove an unused/uninitialized variable
Arnd Bergmann [Thu, 7 Aug 2025 20:54:15 +0000 (22:54 +0200)] 
media: s5p-mfc: remove an unused/uninitialized variable

The s5p_mfc_cmd_args structure in the v6 driver is never used, not
initialized to anything other than zero, but as of clang-21 this
causes a warning:

drivers/media/platform/samsung/s5p-mfc/s5p_mfc_cmd_v6.c:45:7: error: variable 'h2r_args' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
   45 |                                         &h2r_args);
      |                                          ^~~~~~~~

Just remove this for simplicity. Since the function is also called
through a callback, this does require adding a trivial wrapper with
the correct prototype.

Fixes: f96f3cfa0bb8 ("[media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: fix uninitialized symbol warnings
Chelsy Ratnawat [Thu, 7 Aug 2025 06:09:36 +0000 (23:09 -0700)] 
media: fix uninitialized symbol warnings

Initialize variables to fix these smatch warnings
drivers/media/i2c/ir-kbd-i2c.c:339 ir_key_poll() error: uninitialized
symbol 'protocol'.
drivers/media/i2c/ir-kbd-i2c.c:339 ir_key_poll() error: uninitialized
symbol 'scancode'.
drivers/media/i2c/ir-kbd-i2c.c:339 ir_key_poll() error: uninitialized
symbol 'toggle'.
drivers/media/tuners/xc4000.c:1102 xc_debug_dump() error: uninitialized
symbol 'adc_envelope'.
drivers/media/tuners/xc4000.c:1108 xc_debug_dump() error: uninitialized
symbol 'lock_status'.
drivers/media/tuners/xc4000.c:1123 xc_debug_dump() error: uninitialized
symbol 'frame_lines'.
drivers/media/tuners/xc4000.c:1127 xc_debug_dump() error: uninitialized
symbol 'quality'.
drivers/media/tuners/xc5000.c:645 xc_debug_dump() error: uninitialized
symbol 'adc_envelope'.
drivers/media/tuners/xc5000.c:651 xc_debug_dump() error: uninitialized
symbol 'lock_status'.
drivers/media/tuners/xc5000.c:665 xc_debug_dump() error: uninitialized
symbol 'frame_lines'.
drivers/media/tuners/xc5000.c:668 xc_debug_dump() error: uninitialized
symbol 'quality'.
drivers/media/tuners/xc5000.c:671 xc_debug_dump() error: uninitialized
symbol 'snr'.
drivers/media/tuners/xc5000.c:674 xc_debug_dump() error: uninitialized
symbol 'totalgain'.

Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
[hverkuil: dropped ' = 0' from rc in ir-kbd-i2c.c, not needed]

7 weeks agomedia: uapi: Cleanup tab after define in headers
Paul Kocialkowski [Tue, 5 Aug 2025 20:47:18 +0000 (22:47 +0200)] 
media: uapi: Cleanup tab after define in headers

Some definitions use a tab after the define keyword instead of the
usual single space. Replace it for better consistency.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: uapi: Move colorimetry controls at the end of the file
Paul Kocialkowski [Tue, 5 Aug 2025 20:47:17 +0000 (22:47 +0200)] 
media: uapi: Move colorimetry controls at the end of the file

The colorimetry controls class is defined after the stateless codec
class at the top of the controls header. It is currently defined in
the middle of stateless codec controls.

Move the colorimetry controls after the stateless codec controls,
at the end of the file.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: b2c2: Remove space before newline
Colin Ian King [Fri, 1 Aug 2025 16:49:26 +0000 (17:49 +0100)] 
media: b2c2: Remove space before newline

There is an extraneous space before a newline in a dprintk message.
Remove the space.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: atomisp: Fix incorrect snprintf format specifiers for signed integers
Colin Ian King [Fri, 1 Aug 2025 16:00:23 +0000 (17:00 +0100)] 
media: atomisp: Fix incorrect snprintf format specifiers for signed integers

There are incorrect %u format specifiers being used to for signed integers,
fix this by using %d instead.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: pci/ivtv: Replace GPLv2 boilerplate text with SPDX
Thomas Huth [Fri, 1 Aug 2025 14:29:10 +0000 (16:29 +0200)] 
media: pci/ivtv: Replace GPLv2 boilerplate text with SPDX

The FSF does not reside in 59 Temple Place anymore, so we should
not ask the people to write to that address in case they need a
copy of the GPL.

Anyway, all other files in this directory already had their boilerplate
text replaced by a proper SPDX tag in the earlier commit 1a59d1b8e05ea
("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156"),
so let's do the same in the remaining files now, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: Kconfig: Fix spelling mistake "Tehnology" -> "Technology"
Colin Ian King [Thu, 24 Jul 2025 11:03:18 +0000 (12:03 +0100)] 
media: Kconfig: Fix spelling mistake "Tehnology" -> "Technology"

There are spelling mistakes in the DVB_DS3000 and DVB_TS2020
config. Fix them.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agostaging: media: tegra-video: use BIT() macro instead of shift
A.T. Jefferies [Wed, 23 Jul 2025 23:17:57 +0000 (23:17 +0000)] 
staging: media: tegra-video: use BIT() macro instead of shift

Replace two instances of (1 << X) with BIT(X) in tegra20.c to follow
kernel coding style guidelines and improve clarity. The BIT() macro
also ensures proper type handling for larger shifts.

Signed-off-by: A.T. Jefferies <alextjefferies@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: cec: extron-da-hd-4k-plus: drop external-module make commands
Randy Dunlap [Wed, 23 Jul 2025 00:12:00 +0000 (17:12 -0700)] 
media: cec: extron-da-hd-4k-plus: drop external-module make commands

Delete the external-module style Makefile commands. They are not needed
for in-tree modules.

This is the only Makefile in the kernel tree (aside from tools/ and
samples/) that uses this Makefile style.

The same files are built with or without this patch.

Fixes: 056f2821b631 ("media: cec: extron-da-hd-4k-plus: add the Extron DA HD 4K Plus CEC driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: pci: mg4b: fix uninitialized iio scan data
David Lechner [Tue, 22 Jul 2025 22:05:46 +0000 (17:05 -0500)] 
media: pci: mg4b: fix uninitialized iio scan data

Fix potential leak of uninitialized stack data to userspace by ensuring
that the `scan` structure is zeroed before use.

Fixes: 0ab13674a9bd ("media: pci: mgb4: Added Digiteq Automotive MGB4 driver")
Cc: stable@vger.kernel.org
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: b2c2: flexcop: Fix coding style issues
Darshan Rathod [Fri, 18 Jul 2025 14:34:20 +0000 (14:34 +0000)] 
media: b2c2: flexcop: Fix coding style issues

The code in flexcop.c has several instances where spaces are missing
after commas in function call arguments. This violates the Linux
kernel coding style guidelines.

This patch cleans up these minor style issues by adding the required
spaces. This is a purely stylistic change with no functional impact
and improves overall code readability and consistency.

Signed-off-by: Darshan Rathod <darshanrathod475@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: pci: ivtv: Add missing check after DMA map
Thomas Fourier [Wed, 16 Jul 2025 13:26:30 +0000 (15:26 +0200)] 
media: pci: ivtv: Add missing check after DMA map

The DMA map functions can fail and should be tested for errors.
If the mapping fails, free blanking_ptr and set it to 0.  As 0 is a
valid DMA address, use blanking_ptr to test if the DMA address
is set.

Fixes: 1a0adaf37c30 ("V4L/DVB (5345): ivtv driver for Conexant cx23416/cx23415 MPEG encoder/decoder")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agoMAINTAINERS: Update maintainers of TI VPE and CAL
Yemike Abhilash Chandra [Wed, 16 Jul 2025 11:19:09 +0000 (16:49 +0530)] 
MAINTAINERS: Update maintainers of TI VPE and CAL

Benoit has moved to work in other technical areas, and Yemike Abhilash will
maintain these modules instead of him.

Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: stk1160: Restore deleted comment in stk1160_fill_urb()
Dan Carpenter [Tue, 15 Jul 2025 23:00:32 +0000 (18:00 -0500)] 
media: stk1160: Restore deleted comment in stk1160_fill_urb()

This comment explains why we return success when usb_alloc_noncoherent()
fails and I think it's helpful.  It was deleted during a recent refactor,
but let's add it back.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Xu Yang <xu.yang_2@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: vim2m: remove unused CLIP macro
Yunseong Kim [Mon, 14 Jul 2025 13:33:11 +0000 (22:33 +0900)] 
media: vim2m: remove unused CLIP macro

The CLIP macro, which was used to clamp color component values to the
[0, 255] range, is no longer used anywhere in the vim2m driver. Remove it
to clean up the code and avoid confusion.

The following issues were reported by checkpatch:
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Yunseong Kim <ysk@kzalloc.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: pci: zoran: Remove unused debug parameter
Dr. David Alan Gilbert [Sun, 13 Jul 2025 17:33:01 +0000 (18:33 +0100)] 
media: pci: zoran: Remove unused debug parameter

Nothing has checked the zr36067_debug variable since 2021 after
commit efdd0d42e276 ("media: staging: media: zoran: remove
detect_guest_activity")

It's set as a module parameter, remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>