aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-09-06media: atomisp: add missing wait_prepare/finish opsHans Verkuil1-0/+2
Without these ops the v4l2-compliance blocking wait test will fail. These ops are required to ensure that when VIDIOC_DQBUF has to wait for buffers to arrive, the queue lock is correctly released and retaken. Otherwise the wait for a buffer would block all other queue ioctls. Signed-off-by: Hans Verkuil <[email protected]> Link: https://lore.kernel.org/r/9f401f3732dd728e3d2ca508002c97b80a2eae30.1725265884.git.hverkuil-cisco@xs4all.nl Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Remove unused declarationZhang Zekun1-2/+0
v4l2_get_acpi_sensor_info() has been removed since commit d80be6a10cd3 ("media: atomisp: Drop v4l2_get_acpi_sensor_info() function"), remain the declaration untouched in the header file. So, let's remove this unused declartion. Signed-off-by: Zhang Zekun <[email protected]> Reviewed-by: Changhuang Liang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: use clamp() in compute_coring()Li Zetao1-6/+6
When it needs to get a value within a certain interval, using clamp() makes the code easier to understand than min(max()). Signed-off-by: Li Zetao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: use clamp() in ia_css_eed1_8_encode()Li Zetao1-1/+1
When it needs to get a value within a certain interval, using clamp() makes the code easier to understand than min(max()). Signed-off-by: Li Zetao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Simplify ia_css_pipe_create_cas_scaler_desc_single_output()Andy Shevchenko1-24/+20
Make ia_css_pipe_create_cas_scaler_desc_single_output() easier to read by shortening parameter names. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Replace rarely used macro from math_support.hAndy Shevchenko5-19/+16
Replace rarely used macro by generic ones from Linux kernel headers. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Remove duplicated leftover, i.e. sh_css_dvs_info.hAndy Shevchenko2-38/+0
The contents of sh_css_dvs_info.h are already included in the solely user of this header, drop the former for good. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: bnr: fix trailing statementKartik Kulkarni1-1/+2
Fix checkpatch error trailing statements should be on next line in ia_css_bnr.host.c:48 Signed-off-by: Kartik Kulkarni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: move trailing */ to separate linesSergio de Almeida Cipriano Junior1-2/+4
Fix checkpatch diagnostic "WARNING: Block comments use a trailing */ on a separate line" in assert_support.h file. Signed-off-by: Sergio de Almeida Cipriano Junior <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: move trailing statement to next line.Sakirnth Nagarasa1-1/+2
Fix checkpath error "ERROR: trailing statements should be on next line" in ia_css_fpn.host.c:46. Signed-off-by: Sakirnth Nagarasa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix trailing statement in ia_css_de.host.cKathara Sasikumar1-1/+2
Fix checkpatch diagostic of Error : Trailing statements should be on the next line Signed-off-by: Kathara Sasikumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix spelling mistakes in atomisp.hRoshan Khatri1-2/+2
codespell reported misspelled coefficients and vector in atomisp.h. This patch corrects the spellings to increase readability and searching. Signed-off-by: Roshan Khatri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix spelling mistakes in atomisp_platform.hRoshan Khatri1-2/+2
Codespell reported misspelled "streams" and "corresponding" in atomisp_platform.h. This patch fixes the misspellings. Signed-off-by: Roshan Khatri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-06media: atomisp: Fix spelling mistake in csi_rx_public.hRoshan Khatri1-2/+2
codespell reported misspelled "register" in csi_rx_public.h, fix misspellings. Signed-off-by: Roshan Khatri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-05media: cec: extron-da-hd-4k-plus: add the Extron DA HD 4K Plus CEC driverHans Verkuil10-0/+2780
Add support for the Extron DA HD 4K Plus series of 4K HDMI Distrubution Amplifiers (aka HDMI Splitters). These devices support CEC and this driver adds support for the CEC protocol for both the input and all outputs (2, 4 or 6 outputs, depending on the model). It also exports the EDID from the outputs and allows reading and setting the EDID of the input. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-05media: cec: move cec_get/put_device to headerHans Verkuil4-33/+33
Move cec_get/put_device to the media/cec.h header. This allows CEC drivers to use this. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-05media: input: serio.h: add SERIO_EXTRON_DA_HD_PLUSHans Verkuil1-0/+1
Add a new serio ID for the Extron DA HD 4K Plus series of 4K HDMI Distribution Amplifiers. These devices support CEC over the serial port, so a new serio ID is needed to be able to associate the CEC driver. Signed-off-by: Hans Verkuil <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-05media: docs: Add V4L2_CAP_EDIDErling Ljunggren3-0/+23
Add documentation for the new edid capability. Signed-off-by: Erling Ljunggren <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Sebastian Fricke <[email protected]> Reviewed-by: Ricardo Ribalda <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-05media: v4l2-dev: handle V4L2_CAP_EDIDErling Ljunggren1-0/+15
When the V4L2_CAP_EDID capability flag is set, ioctls for enum inputs/outputs and get/set edid are automatically set. Signed-off-by: Erling Ljunggren <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Sebastian Fricke <[email protected]> Reviewed-by: Ricardo Ribalda <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-09-05media: videodev2.h: add V4L2_CAP_EDIDErling Ljunggren1-0/+1
Add capability flag to indicate that the device is an EDID-only device. Signed-off-by: Erling Ljunggren <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Sebastian Fricke <[email protected]> Reviewed-by: Ricardo Ribalda <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-08-31media: MAINTAINERS: Add "qcom," substring for Qualcomm Camera SubsystemChanghuang Liang1-1/+1
Commit f5502cd25ac0 ("media: dt-bindings: Add JH7110 Camera Subsystem") adds the StarFive Camera Subsystem parts, also complies with Qualcomm's rules. Add "qcom," substring restrcting this condition. Signed-off-by: Changhuang Liang <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> [Sakari Ailus: Add media: prefix to the subject.] Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: mt9v111: Drop redundant commaLiao Chen1-1/+1
Drop the redundant comma from mt9v111_of_match array to make the code clean. Signed-off-by: Liao Chen <[email protected]> Reviewed-by: Biju Das <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: mt9v111: Enable module autoloadingLiao Chen1-0/+1
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: imx335: Fix reset-gpio handlingUmang Jain1-5/+4
Rectify the logical value of reset-gpio so that it is set to 0 (disabled) during power-on and to 1 (enabled) during power-off. Set the reset-gpio to GPIO_OUT_HIGH at initialization time to make sure it starts off in reset. Also drop the "Set XCLR" comment which is not-so-informative. The existing usage of imx335 had reset-gpios polarity inverted (GPIO_ACTIVE_HIGH) in their device-tree sources. With this patch included, those DTS will not be able to stream imx335 anymore. The reset-gpio polarity will need to be rectified in the device-tree sources as shown in [1] example, in order to get imx335 functional again (as it remains in reset prior to this fix). Cc: [email protected] Fixes: 45d19b5fb9ae ("media: i2c: Add imx335 camera sensor driver") Reviewed-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/linux-media/[email protected]/ Signed-off-by: Umang Jain <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31dt-bindings: media: imx335: Add reset-gpios to the DT exampleUmang Jain1-0/+4
It's easy to get the polarity of GPIOs in the device tree wrong, as shown by a recently fixed bug in the imx335 driver. To lower the chance of future mistakes, especially in new bindings that would take the imx335 binding as a starting point, add the reset-gpios property to the DT example. This showcases the correct polarity of the XCLR signal for Sony sensors in the most common case of the signal not being inverted on the board. Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Umang Jain <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: og01a1b: Add management of optional sensor supply linesVladimir Zapolskiy1-1/+80
Omnivision OG01A1B camera sensor is supplied by three power rails, if supplies are present as device properties, include them into sensor power up sequence. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: og01a1b: Add management of optional reset GPIOVladimir Zapolskiy1-1/+16
Omnivision OG01A1B camera sensor may have a connected active low GPIO to XSHUTDOWN pad, and if so, include it into sensor power up sequence. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: og01a1b: Add support of xvclk supply clock in power managementVladimir Zapolskiy1-6/+40
The OmniVision OG01A1B camera sensor has an xvclk supply clock, which could be described and then explicitly controlled on OF platforms. Signed-off-by: Vladimir Zapolskiy <[email protected]> [Sakari Ailus: Use UL specifier for power-up delay cycle value.] Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: og01a1b: Add stubs of runtime power management functionsVladimir Zapolskiy1-9/+33
Rearrange initializations and checks in probe before population of the power management functions. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: og01a1b: Add OF support to the image sensor driverVladimir Zapolskiy1-0/+7
The OmniVision OG01A1B image sensor driver currently supports probing only on ACPI platforms, the changes adds support of OF platforms to the driver. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: dt-bindings: Add OmniVision OG01A1B image sensorVladimir Zapolskiy2-0/+108
Add device tree bindings documentation for OmniVision OG01A1B image sensor. Signed-off-by: Vladimir Zapolskiy <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: siano: Remove unused declarationsYue Haibing1-6/+0
There is no caller and implementation in tree, so can remove them. Signed-off-by: Yue Haibing <[email protected]> Reviewed-by: Ricardo Ribalda <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: ccs: Remove unused declarationsYue Haibing1-3/+0
Commit 2989a457171d ("media: ccs: Refactor register reading a little") removed ccs_read_addr_no_quirk() but left declaration. Commit 529322112a3b ("media: ccs: Use V4L2 CCI for accessing sensor registers") removed ccs_write_addr_no_quirk() and ccs_reg_width() but leave their declarations. Signed-off-by: Yue Haibing <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: ar0521: Use cansleep version of gpiod_set_value()Alexander Shiyan1-2/+3
If we use GPIO reset from I2C port expander, we must use *_cansleep() variant of GPIO functions. This was not done in ar0521_power_on()/ar0521_power_off() functions. Let's fix that. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 11 at drivers/gpio/gpiolib.c:3496 gpiod_set_value+0x74/0x7c Modules linked in: CPU: 0 PID: 11 Comm: kworker/u16:0 Not tainted 6.10.0 #53 Hardware name: Diasom DS-RK3568-SOM-EVB (DT) Workqueue: events_unbound deferred_probe_work_func pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : gpiod_set_value+0x74/0x7c lr : ar0521_power_on+0xcc/0x290 sp : ffffff8001d7ab70 x29: ffffff8001d7ab70 x28: ffffff80027dcc90 x27: ffffff8003c82000 x26: ffffff8003ca9250 x25: ffffffc080a39c60 x24: ffffff8003ca9088 x23: ffffff8002402720 x22: ffffff8003ca9080 x21: ffffff8003ca9088 x20: 0000000000000000 x19: ffffff8001eb2a00 x18: ffffff80efeeac80 x17: 756d2d6332692f30 x16: 0000000000000000 x15: 0000000000000000 x14: ffffff8001d91d40 x13: 0000000000000016 x12: ffffffc080e98930 x11: ffffff8001eb2880 x10: 0000000000000890 x9 : ffffff8001d7a9f0 x8 : ffffff8001d92570 x7 : ffffff80efeeac80 x6 : 000000003fc6e780 x5 : ffffff8001d91c80 x4 : 0000000000000002 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: gpiod_set_value+0x74/0x7c ar0521_power_on+0xcc/0x290 ... Signed-off-by: Alexander Shiyan <[email protected]> Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver") Cc: [email protected] Acked-by: Krzysztof HaƂasa <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: intel/ipu6: make use of dev_err_cast_probe()Hongbo Li1-12/+8
Using dev_err_cast_probe() to simplify the code. No functional change. Signed-off-by: Hongbo Li <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: ov5675: Fix power on/off delay timingsBryan O'Donoghue1-6/+6
The ov5675 specification says that the gap between XSHUTDN deassert and the first I2C transaction should be a minimum of 8192 XVCLK cycles. Right now we use a usleep_rage() that gives a sleep time of between about 430 and 860 microseconds. On the Lenovo X13s we have observed that in about 1/20 cases the current timing is too tight and we start transacting before the ov5675's reset cycle completes, leading to I2C bus transaction failures. The reset racing is sometimes triggered at initial chip probe but, more usually on a subsequent power-off/power-on cycle e.g. [ 71.451662] ov5675 24-0010: failed to write reg 0x0103. error = -5 [ 71.451686] ov5675 24-0010: failed to set plls The current quiescence period we have is too tight. Instead of expressing the post reset delay in terms of the current XVCLK this patch converts the power-on and power-off delays to the maximum theoretical delay @ 6 MHz with an additional buffer. 1.365 milliseconds on the power-on path is 1.5 milliseconds with grace. 85.3 microseconds on the power-off path is 90 microseconds with grace. Fixes: 49d9ad719e89 ("media: ov5675: add device-tree support and support runtime PM") Cc: [email protected] Signed-off-by: Bryan O'Donoghue <[email protected]> Tested-by: Johan Hovold <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Tested-by: Quentin Schulz <[email protected]> # RK3399 Puma with Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: imx355: Parse and register propertiesRobert Mader1-1/+11
Analogous to e.g. the imx219 driver. This enables propagating the V4L2_CID_CAMERA_SENSOR_ROTATION and V4L2_CID_CAMERA_ORIENTATION values so that userspace - e.g. libcamera - can detect the correct rotation and orientation from the device tree. Signed-off-by: Robert Mader <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: max96714: coding style fixesJulien Massot1-9/+9
Coding style fixes suggested by Sakari during the driver review. Reviewed-by: Tommaso Merciai <[email protected]> Tested-by: Tommaso Merciai <[email protected]> Signed-off-by: Julien Massot <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: max96717: coding style fixesJulien Massot1-19/+12
Coding style fixes suggested by Sakari during the driver review. Signed-off-by: Julien Massot <[email protected]> Reviewed-by: Tommaso Merciai <[email protected]> Tested-by: Tommaso Merciai <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: max96717: add test pattern ctrlTommaso Merciai1-16/+197
Add v4l2 test pattern control. Signed-off-by: Tommaso Merciai <[email protected]> Reviewed-by: Julien Massot <[email protected]> Tested-by: Julien Massot <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: meson: vdec: hevc: Refactor vdec_hevc_start and vdec_hevc_stopRicardo Ribalda1-11/+32
Make a new function __vdec_hevc_start(), that does all the initialization, except the clock initialization for G12A and SM1. Factor out all the stop logic, except the clk_disable_unprepare(), to a new function __vdec_hevc_stop. This allows vdec_hevc_start() to explicitly celan-out the clock during the error-path. The following smatch warnings are fixed: drivers/staging/media/meson/vdec/vdec_hevc.c:227 vdec_hevc_start() warn: 'core->vdec_hevc_clk' from clk_prepare_enable() not released on lines: 227. drivers/staging/media/meson/vdec/vdec_hevc.c:227 vdec_hevc_start() warn: 'core->vdec_hevcf_clk' from clk_prepare_enable() not released on lines: 227. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: meson: vdec_1: Refactor vdec_1_stop()Ricardo Ribalda1-4/+12
Factor out all the power off logic, except the clk_disable_unprepare(), to a new function __vdec_1_stop(). This allows vdec_1_start() to explicitly clean-out the clock during the error-path. The following smatch warning is fixed: drivers/staging/media/meson/vdec/vdec_1.c:239 vdec_1_start() warn: 'core->vdec_1_clk' from clk_prepare_enable() not released on lines: 239. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: tc358746: Move clk_prepare to its own functionRicardo Ribalda1-1/+11
Smatch is very confused by a clk_prepare_enable() being called in an error-path. Fix this warning by moving the clk_prepare_enable() to its own function. drivers/media/i2c/tc358746.c:1631 tc358746_suspend() warn: 'tc358746->refclk' from clk_prepare_enable() not released on lines: 1631. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: s5c73m3: Move clk_prepare to its own functionRicardo Ribalda1-1/+12
Smatch is very confused by a clk_prepare_enable() being called in an error-path. Fix this warning by moving the clk_prepare_enable() to its own function. drivers/media/i2c/s5c73m3/s5c73m3-core.c:1425 __s5c73m3_power_off() warn: 'state->clock' from clk_prepare_enable() not released on lines: 1425. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: i2c: ov5645: Refactor ov5645_set_power_off()Ricardo Ribalda1-3/+12
Factor out all the power off logic, except clk_disable_unprepare(), to a new function __ov5645_set_power_off(). This allows ov5645_set_power_on() to excplicitly clean-out the clock during the error-path. The following smatch warning is fixed: drivers/media/i2c/ov5645.c:690 ov5645_set_power_on() warn: 'ov5645->xclk' from clk_prepare_enable() not released on lines: 690. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: ar0521: Refactor ar0521_power_off()Ricardo Ribalda1-4/+13
Factor out all the power off logic, except the clk_disable_unprepare(), to a new function __ar0521_power_off(). This allows ar0521_power_on() to explicitly clean-out the clock during the error-path. The following smatch warning is fixed: drivers/media/i2c/ar0521.c:912 ar0521_power_on() warn: 'sensor->extclk' from clk_prepare_enable() not released on lines: 912. Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31staging: media: ipu3: Stop streaming in inverse order of startingMax Staudt1-7/+29
imgu_vb2_stop_streaming() did not order shutdown items in the inverse order and count of what imgu_vb2_start_streaming() does. Consequently, v6.7's new WARN_ON in call_s_stream() started screaming because it was called multiple times on the entire pipe, yet it should only be called when the pipe is interrupted by any first node being taken offline. This reorders streamoff to be the inverse of streamon, and uses analogous conditions to decide when and how often to call additional teardown functions. v4l2_subdev_call(s_stream, 0) remains outside the streaming_lock, analogously to imgu_vb2_start_streaming(). Signed-off-by: Max Staudt <[email protected]> Reviewed-by: Bingbu Cao <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31staging: media: ipu3: Return buffers outside of needless lockingMax Staudt1-1/+1
In imgu_vb2_start_streaming()'s error path, imgu_return_all_buffers() is outside the streaming_lock and after the call to video_device_pipeline_stop(). Let's apply the same order in imgu_vb2_stop_streaming() as well. Signed-off-by: Max Staudt <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31staging: media: ipu3: Drop superfluous check in imgu_vb2_stop_streaming()Max Staudt1-1/+1
The check for imgu_all_nodes_streaming() seems superfluous, since imgu->streaming can only become true once imgu_all_nodes_streaming() has been true. Hence, checking for imgu->streaming == true should imply imgu_all_nodes_streaming(), and therefore suffice. Signed-off-by: Max Staudt <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-08-31media: imx283: Add 3/3 binning modeUmang Jain1-0/+33
IMX283 supports 12-bit 3/3 binning mode with 1824x1216 resolution. Introduce the mode config for the same. Signed-off-by: Umang Jain <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>