Commit Graph

1396831 Commits

Author SHA1 Message Date
Haotian Zhang
94de23a9aa media: videobuf2: Fix device reference leak in vb2_dc_alloc error path
In vb2_dc_alloc(), get_device() is called to increment the device
reference count. However, if subsequent DMA allocation fails
(vb2_dc_alloc_coherent or vb2_dc_alloc_non_coherent returns error),
the function returns without calling put_device(), causing a device
reference leak.

Add put_device() call in the error path before kfree() to properly
release the device reference acquired earlier.

Fixes: de27891f67 ("media: videobuf2: handle non-contiguous DMA allocations")
Cc: stable@vger.kernel.org
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Laurent Pinchart
ba92a96b1e media: saa7146: Replace saa7146_ext_vv.vbi_fops with write function
The vbi_fops stored in struct saa7146_ext_vv is a full
v4l2_file_operations, but only its .write field is used. Replace it with
a single vbi_write function pointer to save memory.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Hans Verkuil
bc22cd5e07 Documentation: media: fix VIDIOC_REMOVE_BUFS typo
Add missing `. The missing backtick messed up the documentation output.

Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Johan Hovold
dd15fedb67 media: exynos4-is: fimc-lite: drop unused module alias
The driver does not support anything but OF probing since
commit 47d1f33ff4 ("[media] exynos4-is: Drop drvdata handling in
fimc-lite for non-dt platforms") so drop the unused platform module alias.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Johan Hovold
c349eb64c2 media: exynos4-is: fimc-is: drop unused module alias
The driver has never supported anything but OF probing so drop the
unused platform module alias.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Johan Hovold
59ca64bf98 media: vpif_display: fix section mismatch
Platform drivers can be probed after their init sections have been
discarded (e.g. on probe deferral or manual rebind through sysfs) so the
probe function must not live in init.

Note that commit ffa1b391c6 ("V4L/DVB: vpif_cap/disp: Removed section
mismatch warning") incorrectly suppressed the modpost warning.

Fixes: ffa1b391c6 ("V4L/DVB: vpif_cap/disp: Removed section mismatch warning")
Fixes: e7332e3a55 ("V4L/DVB (12176): davinci/vpif_display: Add VPIF display driver")
Cc: stable@vger.kernel.org	# 2.6.32
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Johan Hovold
0ef8411137 media: vpif_capture: fix section mismatch
Platform drivers can be probed after their init sections have been
discarded (e.g. on probe deferral or manual rebind through sysfs) so the
probe function must not live in init.

Note that commit ffa1b391c6 ("V4L/DVB: vpif_cap/disp: Removed section
mismatch warning") incorrectly suppressed the modpost warning.

Fixes: ffa1b391c6 ("V4L/DVB: vpif_cap/disp: Removed section mismatch warning")
Fixes: 6ffefff5a9 ("V4L/DVB (12906c): V4L : vpif capture driver for DM6467")
Cc: stable@vger.kernel.org	# 2.6.32
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Brian Masney
f6be653b38 media: platform: ti: omap3isp: isp: convert from round_rate() to determine_rate()
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Brian Masney
a0df157faf media: i2c: tc358746: convert from round_rate() to determine_rate()
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Brian Masney
8b8173f4f5 media: i2c: max96717: convert from round_rate() to determine_rate()
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Brian Masney
8a9f914e2e media: i2c: ds90ub953: convert from round_rate() to determine_rate()
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:42 +01:00
Marek Szyprowski
17dc8ccd6d media: samsung: exynos4-is: fix potential ABBA deadlock on init
v4l2_device_register_subdev_nodes() must called without taking
media_dev->graph_mutex to avoid potential AB-BA deadlock on further
subdevice driver initialization.

Fixes: fa91f1056f ("[media] exynos4-is: Add support for asynchronous subdevices registration")
Cc: stable@vger.kernel.org
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Sakari Ailus
35f29b44ac media: mc: Make macros to obtain containers const-aware
Retain the constness of the graph objects and interfaces in macros to
obtain their containers, by switching to container_of_const().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Sakari Ailus
68871116f9 media: v4l2-dev: Make macros to obtain containers const-aware
Retain the constness of the object in media_entity_to_video_device() and
to_video_device(), by switching to container_of_const().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Sakari Ailus
f17d28968b media: v4l2-subdev: Make media_entity_to_v4l2_subdev() const-aware
Retain the constness of the object in media_entity_to_v4l2_subdev(), by
switching to container_of_const().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Xichao Zhao
bb10fdfe8d media: dvb_ca_en50221: fix "writen"->"written"
Trivial fix to spelling mistake in comment text.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Geert Uytterhoeven
ae0e4aa18f media: amphion: Remove dummy PM handling
Since commit 63d00be693 ("PM: runtime: Allow unassigned
->runtime_suspend|resume callbacks"), unassigned
.runtime_{suspend,resume}() callbacks are treated the same as dummy
callbacks that just return zero.
Unassigned system sleep callbacks were always treated the same as dummy
callbacks that just return zero.

As the driver has no other PM callbacks than dummy callbacks, all PM
handling can be removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ming Qian <ming.qian@oss.nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Geert Uytterhoeven
959d787979 media: rcar_jpu: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas JPEG Processing Unit driver from an open-coded
dev_pm_ops structure to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr().
This lets us drop the check for CONFIG_PM_SLEEP, and reduces kernel size
in case CONFIG_PM or CONFIG_PM_SLEEP is disabled, while increasing build
coverage.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Miaoqian Lin
445e165889 media: renesas: rcar_drif: fix device node reference leak in rcar_drif_bond_enabled
The function calls of_parse_phandle() which returns
a device node with an incremented reference count. When the bonded device
is not available, the function
returns NULL without releasing the reference, causing a reference leak.

Add of_node_put(np) to release the device node reference.
The of_node_put function handles NULL pointers.

Found through static analysis by reviewing the doc of of_parse_phandle()
and cross-checking its usage patterns across the codebase.

Fixes: 7625ee981a ("[media] media: platform: rcar_drif: Add DRIF support")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 15:58:41 +01:00
Johan Hovold
68ea577631 media: imx8mq-mipi-csi2: drop unused module alias
The driver has never supported anything but OF probing so drop the
unused platform module alias.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Martin Kepplinger-Novakovic <martink@posteo.de>
Link: https://patch.msgid.link/20251017060051.8204-3-johan@kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Johan Hovold
b54de0cc88 media: imx7-media-csi: drop unused module alias
The driver has never supported anything but OF probing so drop the
unused platform module alias.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20251017060051.8204-2-johan@kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Johan Hovold
27ca459535 media: imx-mipi-csis: drop unused module alias
The driver does not support anything but OF probe since commit
f0e7cfbb43 ("media: imx: imx7_mipi_csis: Add i.MX8MM support") so
drop the unused platform module alias.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20251017060051.8204-1-johan@kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Guoniu Zhou
5588447897 media: nxp: imx8-isi: Add ISI support for i.MX91
The ISI module on i.MX91 implements only one channel and one parallel
camera input. As no input source selection is required, gasket ops are
unnecessary.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20250905-isi_imx93-v2-5-37db5f768c57@nxp.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Guoniu Zhou
a85b8b47c8 media: nxp: imx8-isi: Reorder the platform data
Sort platform data in the order of compatible strings in of_match table
to make it more convenient to read.

No functions changed.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20250905-isi_imx93-v2-4-37db5f768c57@nxp.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Alice Yuan
b2cc5b4ca4 media: nxp: imx8-isi: Add parallel camera input support for i.MX93
The ISI module on i.MX93 implements one camera input which can be
connected to either of MIPI CSI-2 or parallel camera. The source
type can be selected by setting camera mux control register.

Signed-off-by: Alice Yuan <alice.yuan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20250905-isi_imx93-v2-3-37db5f768c57@nxp.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Guoniu Zhou
556e65b535 media: nxp: imx8-isi: Refine code by using helper macro
Make code more readable and easier to maintain by using the FIELD_PREP
and GENMASK() macros.

While at it, replace spaces with tabs for macro indentation.

No functional changes.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Link: https://patch.msgid.link/20250905-isi_imx93-v2-2-37db5f768c57@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>
2025-11-03 11:40:22 +01:00
Alice Yuan
014619ac2c media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
The ISI module on i.MX91 is reused from i.MX93 and implements one channel
and one camera input which only can be connected to parallel camera input.
So needn't to select camera source like i.MX93 in gasket ops.

Signed-off-by: Alice Yuan <alice.yuan@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20250905-isi_imx93-v2-1-37db5f768c57@nxp.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Stefan Klug
4a086f7a04 media: rkisp1: Improve frame sequence correctness on stats and params buffers
On the rkisp1 (in my case on a NXP i.MX8 M Plus) the ISP interrupt
handler is sometimes called with RKISP1_CIF_ISP_V_START (start of frame)
and RKISP1_CIF_ISP_FRAME (end of frame) being set at the same time. In
commit 8524fa22fd ("media: staging: rkisp1: isp: add a warning and
debugfs var for irq delay") a warning was added for that. There are two
cases where this condition can occur:

1. The v-sync and the frame-end belong to the same frame. This means,
   the irq was heavily delayed and the warning is likely appropriate.

2. The v-sync belongs to the next frame. This can happen if the vertical
   blanking between two frames is very short.

The current code always handles case 1 although case 2 is in my
experience the more common case and happens in regular usage. This leads
to incorrect sequence numbers on stats and params buffers which in turn
breaks the regulation in user space. Fix that by adding a frame_active
flag to distinguish between these cases and handle the start of frame
either at the beginning or at the end of the rkisp1_isp_isr().

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Link: https://patch.msgid.link/20250922182003.3712101-2-stefan.klug@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Frank Li
d907d211c3 MAINTAINERS: Add Frank Li as reviewer for NXP media drivers
Frank has been reviewing NXP media drivers for a while, and is
volunteering to continue. Add him as a reviewer for the IMX media
drivers.

Also add the NXP i.MX platform mailing list (imx@lists.linux.dev).

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20250904161720.514889-1-Frank.Li@nxp.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 11:40:22 +01:00
Jonas Karlman
e5aa561616 media: dt-bindings: rockchip,vdec: Add RK3288 compatible
Add a RK3288 compatible for a version of the Rockchip VDEC IP that only
support HEVC decoding.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Diederik de Haas <didi.debian@cknow.org>  # Rock64, RockPro64, Quartz64-B, NanoPi R5S
Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 08:37:15 +01:00
Alex Bee
664b42898d media: rkvdec: Disable QoS for HEVC and VP9 on RK3328
The RK3328 VDEC has a HW quirk that require QoS to be disabled when HEVC
or VP9 is decoded, otherwise the decoded picture may become corrupted.

Add a RK3328 variant with a quirk flag to disable QoS when before
decoding is started.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Diederik de Haas <didi.debian@cknow.org>  # Rock64, RockPro64, Quartz64-B, NanoPi R5S
Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 08:37:15 +01:00
Alex Bee
3dcfa3d127 media: rkvdec: Add RK3288 variant
Add a RK3288 variant, a version of the Rockchip VDEC IP that only
support HEVC decoding.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Diederik de Haas <didi.debian@cknow.org>  # Rock64, RockPro64, Quartz64-B, NanoPi R5S
Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 08:37:15 +01:00
Jonas Karlman
b26d95f9c6 media: rkvdec: Implement capability filtering
Add filtering of coded formats and controls depending on a variant
capabilities.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Diederik de Haas <didi.debian@cknow.org>  # Rock64, RockPro64, Quartz64-B, NanoPi R5S
Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 08:37:15 +01:00
Alex Bee
603bf462ad media: rkvdec: Add variants support
Different versions of the Rockchip VDEC IP exists and one way they can
differ is what decoding formats are supported.

Add a variant implementation in order to support flagging different
capabilities.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Diederik de Haas <didi.debian@cknow.org>  # Rock64, RockPro64, Quartz64-B, NanoPi R5S
Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 08:37:15 +01:00
Jonas Karlman
3595375c23 media: rkvdec: Add HEVC backend
The Rockchip VDEC supports the HEVC codec with the Main and Main10
Profile up to Level 5.1 High tier: 4096x2304@60 fps.

Add the backend for HEVC format to the decoder.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Diederik de Haas <didi.debian@cknow.org>  # Rock64, RockPro64, Quartz64-B, NanoPi R5S
Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03 08:37:14 +01:00
Daniel Scally
163917839c MAINTAINERS: Update Daniel Scally's email address
Update my email address in MAINTAINERS from my personal account to
my work one.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:02 +01:00
Elgin Perumbilly
f91b64dbe3 media: i2c: Fix vendor name typo in OV2735 Kconfig help text
Fix incorrect vendor name for OV2735 sensor (Sony -> OmniVision) in
Kconfig help text.

Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:02 +01:00
Laurent Pinchart
27aa2085c0 media: staging: ipu7: isys: Drop video_open() function
The video_open() function is just a wrapper around v4l2_fh_open().
Replace it by the latter in the v4l2_file_operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Laurent Pinchart
5d505becf7 media: ipu3-imgu: Drop struct imgu_device v4l2_file_ops field
The struct imgu_device v4l2_file_ops field is unused. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Sebastian Reichel
b7cd2ba3f6 media: ov02c10: Support hflip and vflip
Support horizontal and vertical flip, which is necessary to handle
upside-down mounted sensors.

Suggested-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Sebastian Reichel
d5ebe3f7d1 media: ov02c10: Fix default vertical flip
The driver right now defaults to setting the vertical flip bit. This
conflicts with proper handling of the rotation property defined in
ACPI or device tree, so drop the VFLIP bit. It should be handled via
V4L2_CID_VFLIP instead.

Reported-by: Frederic Stuyk <fstuyk@runbox.com>
Closes: https://lore.kernel.org/all/b6df9ae7-ea9f-4e5a-8065-5b130f534f37@runbox.com/
Fixes: 44f89010da ("media: i2c: Add Omnivision OV02C10 sensor driver")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Benjamin Mugnier
e138e7f000 media: i2c: vd55g1: Add support for vd65g4 RGB variant
The vd65g4 is the bayer version of the vd55g1.
As opposed to the vd55g1, the vd65g4 does not need any patch. Check the
sensor id at probe and choose to patch or not on power_on() according to
it.
It's bayer matrix's order is RGGB. This commit handles hflip and vflip
by switching the bayer pattern accordingly.

Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Benjamin Mugnier
5489abf663 media: dt-bindings: vd55g1: Add vd65g4 compatible
Switch compatible from a const to an enum to accommodate both the vd55g1
and the vd65g4, which is the color variant.

Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Frank Li
7890895df1 media: dt-bindings: video-interfaces: add video-interfaces.h information
Mention include/dt-bindings/media/video-interfaces.h in descriptions to
help avoid use hardcode in dts.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Adam J. Sypniewski
74e53de740 media: ov13b10: Add ACPI ID for ASUS Z13 Flow laptop
The ASUS ROG Flow Z13 2025 (GZ302) laptop uses an OV13B10 sensor with a
non-standard ACPI ID of OMNI13B1 instead of the expected OVTI13B1.

Add this ACPI ID to the driver to make the front-facing camera work on
these laptops.

Signed-off-by: Adam J. Sypniewski <ajsyp@syptech.net>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 14:07:01 +01:00
Jai Luthra
3dc9770bf2 media: i2c: imx219: Simplify imx219_get_binning() function
In imx219_set_pad_format() there is now a constraint to enforce hbin ==
vbin. So, simplify the logic in imx219_get_binning() function by
removing dead code that handles the case where hbin != vbin.

Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-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>
2025-10-29 14:07:01 +01:00
Dave Stevenson
9ef6e4db15 media: i2c: imx219: Fix 1920x1080 mode to use 1:1 pixel aspect ratio
Commit 0af46fbc33 ("media: i2c: imx219: Calculate crop rectangle
dynamically") meant that the 1920x1080 mode switched from using no
binning to using vertical binning but no horizontal binning, which
resulted in stretched pixels.

Until proper controls are available to independently select horizontal
and vertical binning, restore the original 1:1 pixel aspect ratio by
forcing binning to be uniform in both directions.

Cc: stable@vger.kernel.org
Fixes: 0af46fbc33 ("media: i2c: imx219: Calculate crop rectangle dynamically")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
[Add comment & reword commit message]
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
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>
2025-10-29 14:07:01 +01:00
Frank Li
c423487bf6 dt-bindings: media: convert nxp,tda1997x.txt to yaml format
Convert nxp,tda1997x.txt to yaml format

Additional changes:
- update audio width to 8, 16, 24, 32.
- keep one example only.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 13:47:16 +01:00
Frank Li
577242cdcb dt-bindings: media: Convert ti,tvp5150.txt to yaml format.
Convert ti,tvp5150.txt to yaml format.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
[Sakari Ailus: Align the endpoint properties to the right column.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 13:47:16 +01:00
Griffin Kroah-Hartman
083f7f0dce media: i2c: dw9719: Add DW9800K support
The DW9800K is a similar part to the DW9719. The method for operation is
the same as the DW9719, but the register set is different. Add support
for this part to the existing dw9719 driver.

Tested on the Fairphone 5 smartphone.

Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-10-29 13:47:16 +01:00