Marvin Lin [Fri, 22 Sep 2023 06:24:04 +0000 (14:24 +0800)]
media: uapi: Add controls for NPCM video driver
Create controls for Nuvoton NPCM video driver to support setting
capture mode of Video Capture/Differentiation (VCD) engine and getting
the count of HEXTILE rectangles that is compressed by Encoding
Compression Engine (ECE).
Signed-off-by: Marvin Lin <milkfafa@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Marvin Lin [Fri, 22 Sep 2023 06:24:03 +0000 (14:24 +0800)]
media: v4l2-ctrls: Add user control base for Nuvoton NPCM controls
Add a control base for Nuvoton NPCM driver controls, and reserve 16
controls.
Signed-off-by: Marvin Lin <milkfafa@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Marvin Lin [Fri, 22 Sep 2023 06:24:02 +0000 (14:24 +0800)]
media: v4l: Add HEXTILE compressed format
Add HEXTILE compressed format which is defined in Remote Framebuffer
Protocol (RFC 6143, chapter 7.7.4 Hextile Encoding) and is used by
Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs.
Signed-off-by: Marvin Lin <milkfafa@gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Marvin Lin [Fri, 22 Sep 2023 06:24:01 +0000 (14:24 +0800)]
dt-bindings: soc: nuvoton: Add NPCM GFXI
Add dt-bindings document for Graphics Core Information (GFXI) node. It
is used by NPCM video driver to retrieve Graphics core information.
Signed-off-by: Marvin Lin <milkfafa@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Marvin Lin [Fri, 22 Sep 2023 06:24:00 +0000 (14:24 +0800)]
media: dt-bindings: nuvoton: Add NPCM VCD and ECE engine
Add dt-bindings document for Video Capture/Differentiation Engine
(VCD) and Encoding Compression Engine (ECE) present on Nuvoton NPCM
SoCs.
Signed-off-by: Marvin Lin <milkfafa@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Hans Verkuil [Sun, 13 Aug 2023 08:22:54 +0000 (10:22 +0200)]
media: remove the old videobuf framework
The last driver that still used this old framework has been converted
to the videobuf2 framework. So it is now time to delete the old videobuf
code.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Hans Verkuil [Sun, 13 Aug 2023 08:20:49 +0000 (10:20 +0200)]
media: atomisp: remove left-over videobuf include
This source still included the media/videobuf-vmalloc.h
header, even though it is no longer used.
Since the old videobuf framework is about to be removed,
delete this include first.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Yue Haibing [Thu, 17 Aug 2023 13:43:54 +0000 (21:43 +0800)]
media: imx-jpeg: Remove unused declarations
These are never implemented, remove them.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Yu Liao [Wed, 16 Aug 2023 06:31:43 +0000 (14:31 +0800)]
media: use struct_size() helper
Prefer struct_size() over open-coded versions of idiom:
sizeof(struct-with-flex-array) + sizeof(typeof-flex-array-elements) * count
where count is the max number of items the flexible array is supposed to
contain.
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Colin Ian King [Tue, 15 Aug 2023 12:14:46 +0000 (13:14 +0100)]
media: mediatek: vcodec: fix spelling mistake "resonable" -> "reasonable"
There are a couple of spelling mistakes in pr_err error messages. Fix them.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Krzysztof Kozlowski [Tue, 15 Aug 2023 06:07:39 +0000 (08:07 +0200)]
media: exynos4-is: fimc-is: replace duplicate pmu node with phandle
Devicetree for the FIMC IS camera included duplicated PMU node as its
child like:
soc@0 {
system-controller@
10020000 { ... }; // Real PMU
camera@
11800000 {
fimc-is@
12000000 {
// FIMC IS camera node
pmu@
10020000 {
reg = <0x10020000 0x3000>; // Fake PMU node
};
};
};
};
This is not a correct representation of the hardware. Mapping the PMU
(Power Management Unit) IO memory should be via syscon-like phandle
(samsung,pmu-syscon, already used for other drivers), not by duplicating
"pmu" Devicetree node inside the FIMC IS. Backward compatibility is
preserved.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Krzysztof Kozlowski [Tue, 15 Aug 2023 06:07:38 +0000 (08:07 +0200)]
media: dt-bindings: samsung,fimc: correct unit addresses in DTS example
The camera node's ranges property and unit addresses of its children
were not correct. If camera is @
11800000, then its fimc child is @0.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Krzysztof Kozlowski [Tue, 15 Aug 2023 06:07:37 +0000 (08:07 +0200)]
media: dt-bindings: samsung,exynos4212-fimc-is: replace duplicate pmu node with phandle
The FIMC IS camera must access the PMU (Power Management Unit) IO memory
to control camera power. This was achieved by duplicating the PMU node
as its child like:
soc@0 {
system-controller@
10020000 { ... }; // Real PMU
camera@
11800000 {
fimc-is@
12000000 {
// FIMC IS camera node
pmu@
10020000 {
reg = <0x10020000 0x3000>; // Fake PMU node
};
};
};
};
This is not a correct representation of the hardware. Mapping the PMU
(Power Management Unit) IO memory should be via syscon-like phandle
(samsung,pmu-syscon, already used for other drivers), not by duplicating
"pmu" Devicetree node inside the FIMC IS.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Ruan Jinjie [Fri, 11 Aug 2023 02:49:45 +0000 (10:49 +0800)]
media: staging: media: sunxi: cedrus: Remove redundant of_match_ptr()
The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Li Zetao [Thu, 10 Aug 2023 11:52:20 +0000 (19:52 +0800)]
media: nxp: Use devm_kmemdup to replace devm_kmalloc + memcpy
Use the helper function devm_kmemdup() rather than duplicating its
implementation, which helps to enhance code readability.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Hans Verkuil [Thu, 3 Aug 2023 07:42:10 +0000 (09:42 +0200)]
media: cx25840: simplify cx23885_dif_setup()
Instead of creating a huge switch statement (that thoroughly confuses
smatch), create a table of coefficients and use that.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Wang Ming [Wed, 26 Jul 2023 11:51:58 +0000 (19:51 +0800)]
media: platform: Use dev_err_probe instead of dev_err
It is possible that dma_request_chan will return EPROBE_DEFER,
which means that dma->xdev->dev is not ready yet. In this case,
dev_err(dma->xdev->dev), there will be no output. This patch
fixes the bug.
Signed-off-by: Wang Ming <machel@vivo.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Colin Ian King [Tue, 27 Jun 2023 15:37:38 +0000 (16:37 +0100)]
media: bt8xx: make read-only arrays static
Don't populate the arrays on the stack, instead make them static const.
Also add spaces between values to clean up checkpatch style warnings.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Juerg Haefliger [Fri, 16 Jun 2023 12:04:06 +0000 (14:04 +0200)]
media: bttv: Add MODULE_FIRMWARE macro
The module loads firmware so add a MODULE_FIRMWARE macro to provide that
information via modinfo.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Zheng Wang [Thu, 13 Apr 2023 03:49:42 +0000 (11:49 +0800)]
media: bttv: fix use after free error due to btv->timeout timer
There may be some a race condition between timer function
bttv_irq_timeout and bttv_remove. The timer is setup in
probe and there is no timer_delete operation in remove
function. When it hit kfree btv, the function might still be
invoked, which will cause use after free bug.
This bug is found by static analysis, it may be false positive.
Fix it by adding del_timer_sync invoking to the remove function.
cpu0 cpu1
bttv_probe
->timer_setup
->bttv_set_dma
->mod_timer;
bttv_remove
->kfree(btv);
->bttv_irq_timeout
->USE btv
Fixes:
162e6376ac58 ("media: pci: Convert timers to use timer_setup()")
Signed-off-by: Zheng Wang <zyytlz.wz@163.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:17:04 +0000 (21:17 +0300)]
media: i2c: ov9734: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:17:03 +0000 (21:17 +0300)]
media: i2c: ov8856: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:17:02 +0000 (21:17 +0300)]
media: i2c: ov5675: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:17:01 +0000 (21:17 +0300)]
media: i2c: ov5670: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:17:00 +0000 (21:17 +0300)]
media: i2c: ov13b10: Drop stream handling in runtime PM handlers
The sensor is guaranteed not to be streaming when the runtime PM resume
handler is called, as the resume handler is only called from the
.s_stream() operation when starting streaming. Similarly, the sensor has
been stopped when the runtime PM suspend handler is called. There is
thus no need for manual stream start/stop from the runtime PM handlers.
Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:59 +0000 (21:16 +0300)]
media: i2c: ov2740: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:58 +0000 (21:16 +0300)]
media: i2c: ov13858: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:57 +0000 (21:16 +0300)]
media: i2c: ov08x40: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:56 +0000 (21:16 +0300)]
media: i2c: ov08d10: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:55 +0000 (21:16 +0300)]
media: i2c: ov02a10: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:54 +0000 (21:16 +0300)]
media: i2c: ov01a10: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:53 +0000 (21:16 +0300)]
media: i2c: og01a1b: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:52 +0000 (21:16 +0300)]
media: i2c: imx355: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:51 +0000 (21:16 +0300)]
media: i2c: imx319: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:50 +0000 (21:16 +0300)]
media: i2c: imx258: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:49 +0000 (21:16 +0300)]
media: i2c: imx219: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:48 +0000 (21:16 +0300)]
media: i2c: imx214: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:47 +0000 (21:16 +0300)]
media: i2c: imx208: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:46 +0000 (21:16 +0300)]
media: i2c: hi847: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:45 +0000 (21:16 +0300)]
media: i2c: hi846: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
Now that the runtime PM operations are not called from the system PM
handlers, the sensor is guaranteed not to be streaming when the runtime
PM resume handler is called, and to have been stopped already when the
runtime PM suspend handler is called. Drop the manual stream start/stop
from the runtime PM handlers.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:44 +0000 (21:16 +0300)]
media: i2c: hi556: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:43 +0000 (21:16 +0300)]
media: i2c: ccs: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:42 +0000 (21:16 +0300)]
media: i2c: ar0521: Drop system suspend and resume handlers
Stopping streaming on a camera pipeline at system suspend time, and
restarting it at system resume time, requires coordinated action between
the bridge driver and the camera sensor driver. This is handled by the
bridge driver calling the sensor's .s_stream() handler at system suspend
and resume time. There is thus no need for the sensor to independently
implement system sleep PM operations. Drop them.
The streaming field of the driver's private structure is now unused,
drop it as well.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:41 +0000 (21:16 +0300)]
Documentation: media: camera-sensor: Improve power management documentation
Camera sensor drivers are highly subject to cargo cult programming, with
back practices being copied from old to new drivers. In particular, many
drivers implement system and runtime PM incorrectly. As a first step
towards fixing this situation, refactor and expand the power management
documentation to detail correct usage of system and runtime PM.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:40 +0000 (21:16 +0300)]
Documentation: media: camera-sensor: Move power management section
Move the power management section up, just after clocks, as it relates
to internal system resources and not features exposed to applications.
The text itself is otherwise unchanged.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:39 +0000 (21:16 +0300)]
Documentation: media: camera-sensor: Use link to upstream DT bindings
The Documentation/devicetree/bindings/clock/clock-bindings.txt file is
deprecated and points to clock-bindings.yaml, which is not hosted in the
kernel source tree. Use an HTTPS link to refer to the YAML binding
document.
While at it, drop "currently" from the paragraph, as the whole file
refers to the current recommended practices except where explicitly
noted.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:38 +0000 (21:16 +0300)]
Documentation: media: camera-sensor: Fix typo and vocabulary selection
Drop an unneeded double colon, and use 'shall' instead of 'must' for
consistency with the rest of the file.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:37 +0000 (21:16 +0300)]
media: i2c: ov9734: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:36 +0000 (21:16 +0300)]
media: i2c: ov9282: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:35 +0000 (21:16 +0300)]
media: i2c: ov8856: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:34 +0000 (21:16 +0300)]
media: i2c: ov7740: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:33 +0000 (21:16 +0300)]
media: i2c: ov5695: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:32 +0000 (21:16 +0300)]
media: i2c: ov5675: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:31 +0000 (21:16 +0300)]
media: i2c: ov5670: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:30 +0000 (21:16 +0300)]
media: i2c: ov5647: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:29 +0000 (21:16 +0300)]
media: i2c: ov4689: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Mikhail Rudenko <mike.rudenko@gmail.com>
[Sakari Ailus: remove now-redundant "streaming" from comment.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:28 +0000 (21:16 +0300)]
media: i2c: ov2740: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:27 +0000 (21:16 +0300)]
media: i2c: ov2685: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:26 +0000 (21:16 +0300)]
media: i2c: ov13b10: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:25 +0000 (21:16 +0300)]
media: i2c: ov13858: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:24 +0000 (21:16 +0300)]
media: i2c: ov08x40: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:23 +0000 (21:16 +0300)]
media: i2c: ov08d10: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:22 +0000 (21:16 +0300)]
media: i2c: ov01a10: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:21 +0000 (21:16 +0300)]
media: i2c: og01a1b: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:20 +0000 (21:16 +0300)]
media: i2c: mt9m001: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:19 +0000 (21:16 +0300)]
media: i2c: imx412: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:18 +0000 (21:16 +0300)]
media: i2c: imx355: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:17 +0000 (21:16 +0300)]
media: i2c: imx335: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:16 +0000 (21:16 +0300)]
media: i2c: imx334: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
The streaming field of the driver's private structure is now unused,
drop it as well.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:15 +0000 (21:16 +0300)]
media: i2c: imx319: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:14 +0000 (21:16 +0300)]
media: i2c: imx258: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:13 +0000 (21:16 +0300)]
media: i2c: imx219: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:12 +0000 (21:16 +0300)]
media: i2c: imx214: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:11 +0000 (21:16 +0300)]
media: i2c: imx208: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:10 +0000 (21:16 +0300)]
media: i2c: hi846: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 18:16:09 +0000 (21:16 +0300)]
media: i2c: hi556: Drop check for reentrant .s_stream()
The subdev .s_stream() operation shall not be called to start streaming
on an already started subdev, or stop streaming on a stopped subdev.
Remove the check that guards against that condition.
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@xs4all.nl>
Laurent Pinchart [Mon, 18 Sep 2023 12:48:38 +0000 (15:48 +0300)]
media: v4l2-subdev: Document and enforce .s_stream() requirements
The subdev .s_stream() operation must not be called to start an already
started subdev, or stop an already stopped one. This requirement has
never been formally documented. Fix it, and catch possible offenders
with a WARN_ON() in the call_s_stream() wrapper.
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@xs4all.nl>
Hao Yao [Fri, 15 Sep 2023 08:45:27 +0000 (16:45 +0800)]
media: ov13b10: Add 1364x768 register settings
This commit adds support for:
- 1364x768 at 120 FPS
Signed-off-by: Hao Yao <hao.yao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fabio Estevam [Wed, 13 Sep 2023 19:28:11 +0000 (16:28 -0300)]
media: dt-bindings: Add OV5642
As explained in the description text from trivial-devices.yaml:
"This is a list of trivial I2C and SPI devices that have simple device tree
bindings, consisting only of a compatible field, an address and possibly an
interrupt line."
A camera device does not fall into this category as it needs other
properties such as regulators, reset and powerdown GPIOs, clocks,
media endpoint.
Remove the OV5642 entry from trivial-devices.yaml and add its own
ovti,ov5642.yaml.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Sakari Ailus [Thu, 14 Sep 2023 22:01:24 +0000 (01:01 +0300)]
media: Documentation: Mention CCS tools
CCS tools is a useful set of programs and libraries for working with CCS
static data. Do mention that in context of the CCS driver.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 17:46:47 +0000 (20:46 +0300)]
media: i2c: imx296: Replace streaming flag with runtime PM check
The streaming flag in the driver private structure is used for the sole
purpose of gating register writes when setting a V4L2 control. This is
better handled by checking if the sensor is powered up using the runtime
PM API. Do so and drop the streaming flag.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tommaso Merciai <tomm.merciai@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 17:46:00 +0000 (20:46 +0300)]
media: i2c: imx415: Replace streaming flag with runtime PM check
The streaming flag in the driver private structure is used for the sole
purpose of gating register writes when setting a V4L2 control. This is
better handled by checking if the sensor is powered up using the runtime
PM API. Do so and drop the streaming flag.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Sakari Ailus: Runtime PM put when setting analgue gain.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 17:45:08 +0000 (20:45 +0300)]
media: i2c: ov5693: Drop the unused streaming flag
The streaming flag in the driver's private structure is set but never
used. Drop it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Tommaso Merciai <tomm.merciai@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Thu, 14 Sep 2023 17:20:54 +0000 (20:20 +0300)]
media: i2c: Use pm_runtime_resume_and_get()
Simplify error handling by using pm_runtime_resume_and_get() instead of
pm_runtime_get_sync() with a put call in the error path.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> (st-vgxy61)
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Xiaolei Wang [Mon, 7 Aug 2023 09:05:35 +0000 (17:05 +0800)]
media: ov5640: Fix a memory leak when ov5640_probe fails
sensor->ctrls.handler is initialized in ov5640_init_controls(),
so when the sensor is not connected and ov5640_sensor_resume()
fails, sensor->ctrls.handler should be released, otherwise a
memory leak will be detected:
unreferenced object 0xc674ca80 (size 64):
comm "swapper/0", pid 1, jiffies
4294938337 (age 204.880s)
hex dump (first 32 bytes):
80 55 75 c6 80 54 75 c6 00 55 75 c6 80 52 75 c6 .Uu..Tu..Uu..Ru.
00 53 75 c6 00 00 00 00 00 00 00 00 00 00 00 00 .Su..........
Fixes:
85644a9b37ec ("media: ov5640: Use runtime PM")
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Shravan Chippa [Fri, 4 Aug 2023 15:15:41 +0000 (20:45 +0530)]
media: i2c: imx334: add support for test pattern generator
Add support for the imx334's test pattern generator.
By default the test pattern generator is disabled, so add support for
enabling and disabling horizontal and vertical colour bars.
Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com>
Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Biju Das [Sun, 10 Sep 2023 15:00:33 +0000 (16:00 +0100)]
media: i2c: ov7670: Drop CONFIG_OF ifdeffery
Drop of_match_ptr() from ov7670_driver and get rid of ugly CONFIG_OF
if check. This slightly increases the size of ov7670_driver on non-OF
system and shouldn't be an issue.
Add mod_devicetable.h include.
It also allows, in case if needed, to enumerate this device via ACPI with
PRP0001 magic.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Biju Das [Sun, 10 Sep 2023 15:00:32 +0000 (16:00 +0100)]
media: i2c: ov7670: Extend match support for OF tables
The driver has an OF match table, still, it uses an ID lookup table for
retrieving match data. Currently, the driver is working on the
assumption that an I2C device registered via OF will always match a
legacy I2C device ID. The correct approach is to have an OF device ID
table using i2c_get_match_data() if the devices are registered via OF/ID.
Unify the OF/ID table by using struct ov7670_devtype as match data for
both these tables and replace the ID lookup table for the match data by
i2c_get_match_data().
Split the array ov7670_devdata[] as individual variables, and
make lines shorter by referring to e.g. &ov7670_devdata instead of
&ov7670_devdata[MODEL_OV7670].
Drop enum ov7670_model as there is no user.
While at it, remove the trailing comma in the terminator entry for the OF
table making code robust against (theoretical) misrebases or other similar
things where the new entry goes _after_ the termination without the
compiler noticing.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Biju Das [Sun, 10 Sep 2023 16:54:32 +0000 (17:54 +0100)]
media: i2c: mt9v032: Drop CONFIG_OF ifdeffery
Drop of_match_ptr() from mt9v032_driver and get rid of ugly CONFIG_OF
if check. This slightly increases the size of mt9v032_driver on non-OF
system and shouldn't be an issue.
Add mod_devicetable.h include.
It also allows, in case if needed, to enumerate this device via ACPI with
PRP0001 magic.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.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@xs4all.nl>
Biju Das [Sun, 10 Sep 2023 16:54:31 +0000 (17:54 +0100)]
media: i2c: mt9v032: Extend match support for OF tables
The driver has an OF match table, still, it uses an ID lookup table for
retrieving match data. Currently, the driver is working on the
assumption that an I2C device registered via OF will always match a
legacy I2C device ID. The correct approach is to have an OF device ID
table using i2c_get_match_data() if the devices are registered via OF/ID.
Unify the OF/ID table by using mt9v032_model_info as match data for both
these tables and replace the ID lookup table for the match data by
i2c_get_match_data() and simplifly probe().
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Jacopo Mondi [Mon, 11 Sep 2023 14:56:36 +0000 (16:56 +0200)]
media: i2c: Drop ifdeffery from sensor drivers
Since commit
7d3c7d2a2914 ("media: i2c: Add a camera sensor top level
menu") the CONFIG_MEDIA_CONTROLLER and CONFIG_VIDEO_V4L2_SUBDEV_API are
selected by the top-level VIDEO_CAMERA_SENSOR menu.
Remove all ifdefferies from camera sensor drivers to simplify the code.
Compile-tested only.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
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@xs4all.nl>
Biju Das [Sun, 20 Aug 2023 07:58:46 +0000 (08:58 +0100)]
media: i2c: video-i2c: Convert enum->pointer for data in the match tables
Convert enum->pointer for data in the match tables, so that
device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c
bus type match support added to it.
Replace enum->struct *video_i2c_chip for data in the match table. Simplify
the probe() by replacing device_get_match_data() and ID lookup for
retrieving data by i2c_get_match_data().
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Krzysztof Kozlowski [Wed, 23 Aug 2023 08:56:10 +0000 (10:56 +0200)]
media: platform: use capital "OR" for multiple licenses in SPDX
Documentation/process/license-rules.rst and checkpatch expect the SPDX
identifier syntax for multiple licenses to use capital "OR". Correct it
to keep consistent format and avoid copy-paste issues.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Laurent Pinchart [Fri, 18 Aug 2023 15:55:18 +0000 (18:55 +0300)]
media: v4l2-subdev: Document that routing support depends on streams
Routing support, through the subdev .set_routing() operation, requires
the subdev to support streams. This is however not clearly documented
anywhere. Fix it by expanding the operation's documentation to indicate
that subdevs must set the V4L2_SUBDEV_FL_STREAMS flag.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Umang Jain [Wed, 30 Aug 2023 04:53:23 +0000 (10:23 +0530)]
media: i2c: imx415: Use v4l2_subdev_get_fmt()
The imx415 driver uses the subdev active state, there's
no need to implement the .get_fmt() operation manually. Use
the v4l2_subdev_get_fmt() helper instead.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
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@xs4all.nl>
Christophe JAILLET [Fri, 25 Aug 2023 22:13:40 +0000 (00:13 +0200)]
media: i2c: max9286: Fix some redundant of_node_put() calls
This is odd to have a of_node_put() just after a for_each_child_of_node()
or a for_each_endpoint_of_node() loop. It should already be called
during the last iteration.
Remove these calls.
Fixes:
66d8c9d2422d ("media: i2c: Add MAX9286 driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Wentong Wu [Tue, 29 Aug 2023 05:24:28 +0000 (13:24 +0800)]
media: ivsc: ace: probe ace device after IPU bridge is initialized.
During probe ivsc ace device, acpi_dev_clear_dependencies() will be
called to clear the consumer and supplier relationship between camera
sensor device and ivsc device. But IPU bridge will setup the connection
swnodes for ivsc device and camera sensor device based on this consumer
and supplier relationship. This patch defers ivsc ace's probe to make
sure IPU bridge is initialized before this consumer and supplier
relationship between camera sensor device and IVSC device is cleared.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Wentong Wu [Tue, 29 Aug 2023 05:24:27 +0000 (13:24 +0800)]
media: ivsc: ace: remove name identifier
Remove name identifier to match the device with the
defined UUID when load driver module.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Wentong Wu [Tue, 29 Aug 2023 05:24:26 +0000 (13:24 +0800)]
media: ivsc: csi: remove name identifier
Remove name identifier to match the device with the
defined UUID when load driver module.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Sakari Ailus [Wed, 23 Aug 2023 09:03:42 +0000 (12:03 +0300)]
media: v4l2-mc: Make v4l2_pipeline_pm_{get,put} deprecated
The v4l2_pipeline_pm_get() and v4l2_pipeline_pm_put() functions were
needed to control sub-devices' power states before runtime PM. These
functions should no longer be used, and instead sub-device drivers should
use runtime PM.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>