summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-07-08media: atomisp: gc0310: Limit max exposure value to mode-height + vblankHans de Goede
When an exposure value > (mode-height + vblank) gets set the sensor will automatically increase vblank, lowering the framerate. This is not desirable, limit exposure the maximum exposure to mode-height + vblank to avoid the unwanted framerate slowdown. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-11-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Add camera orientation and sensor rotation controlsHans de Goede
Add camera orientation and sensor rotation controls using the v4l2_fwnode_device_parse() and v4l2_ctrl_new_fwnode_properties() helpers. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-10-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Add vblank and hblank controlsHans de Goede
Add support for the vblank and hblank controls, these controls are mandatory for using the sensor driver with libcamera. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-9-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Add link-frequency and pixelrate controlsHans de Goede
Add support for the pixelrate control as expected by libcamera, while at it also add the link-frequency control. Signed-off-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-8-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Add selection API supportHans de Goede
Add support for the selection API as expected by libcamera. Note the driver only supports a single fixed resolution and no cropping, so this is a simple read-only implementation. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-7-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Use V4L2_CID_ANALOGUE_GAIN for gain controlHans de Goede
Use V4L2_CID_ANALOGUE_GAIN for gain control, as expected by userspace. Signed-off-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-6-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Switch to CCI register access helpersHans de Goede
Switch the GC0310 driver over to the CCI register access helpers. While at it also add a _REG prefix to all register address defines to make clear they are register addresses and group register value defines together with the address definition. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-5-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Modify vblank value to run at 30 fpsHans de Goede
Currently the sensor is running 30.9 fps, increase vblank to have it actually run at 30.0 fps. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-4-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Drop unused GC0310_FOCAL_LENGTH_NUM defineHans de Goede
Drop the unused GC0310_FOCAL_LENGTH_NUM define, the focal-length is a property of the sensor-module, not of the raw sensor itself. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-3-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: gc0310: Rename "dev" function variable to "sensor"Hans de Goede
Many functions on the gc0310 driver use a function local variable called "dev" but these variable's type is not "struct device *" type as one would expect based on the name. Instead they point to the gc0310 driver data struct. Rename these variables to sensor to make their purpose more clear. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250517114106.43494-2-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: Fix ia_css_vf.host.c coding stylePablo
Fix a coding style: "ERROR: that open brace { should be on the previous line" issue reported in ia_css_vf.host.c:94. Signed-off-by: Pablo <pablo@pablo.ct.ws> Link: https://lore.kernel.org/r/20250503200030.5982-1-pablo@pablo.ct.ws Signed-off-by: Hans de Goede <hansg@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: Switch to int3472 driver sensor GPIO mapping codeHans de Goede
Replace the duplicate code for calling the special Intel camera sensor GPIO type _DSM (79234640-9e10-4fea-a5c1-b5aa8b19756f) and mapping GPIOs to the sensor with a call to int3472_discrete_parse_crs() from the int3472 driver. Besides avoiding code duplication the int3472 version of the code also supports more features, like mapping the powerdown GPIO to a regulator on the mt9m114 which is necessary to make the camera on the Asus T100TA work. Signed-off-by: Hans de Goede <hansg@kernel.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Link: https://lore.kernel.org/r/20250507184737.154747-7-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: Fix "stop stream timeout." errorHans de Goede
Commit c7194b21809e ("media: atomisp: On streamoff wait for buffers owned by the CSS to be given back") added draining of the CSS buffer queue to the beginning of atomisp_stop_stream(). But it turns out that when telling the CSS to stop streaming it needs at least 1 buffer queued, because the CSS firmware waits for a frame to be completed before stopping and without buffers it cannot complete a frame. At the end of atomisp_stop_stream() it is always safe to return buffer ownership to the videobuf2-core. Either atomisp_css_stop() has successfully stopped the stream; or the atomisp_reset() later on which power-cycles the ISP will definitely have stopped the stream. Drop the draining of the CSS buffer queue to fix the "stop stream timeout." error and move the atomisp_flush_video_pipe() call after atomisp_reset(), passing false for the warn_on_css_frames flag since some buffers still being marked as owned by the CSS expected on stream off. Also increase the timeout in destroy_stream(), since this waits for the last frame to be completed this can take longer then 40 ms. When e.g. using a framerate of 15 fps, this could take 66ms, make the timeout 200 ms to be on the safe side. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250505210008.152659-6-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: Always free MIPI / CSI-receiver buffers from ia_css_uninit()Hans de Goede
The atomisp interrupt handling will free the MIPI / CSI-receiver buffers when processing a frame-completion event if the stop_requested flag is set, but only in the ISP2400 / BYT, not in the ISP2401 / CHT case. There are 2 problems with this: 1. Since this is only done in the BYT case the "mipi frames are not freed." warning always triggers on CHT devices. 2. There are 2 stop_requested flags, ia_css_pipe.stop_requested and ia_css_pipeline.stop_requested. The ISR checks the ia_css_pipe flag, but atomisp_css_stop() sets the ia_css_pipeline.stop_requested flag. So even on BYT freeing the buffers from the ISR never happens. This likely is a good thing since the buffers get freed on the first frame completion event and there might be multiple frames queued up. Fix things by completely dropping the freeing of the MIPI buffers from the ISR as well as the stop_requested flag always freeing the buffers from ia_css_uninit(). Also drop the warning since this now always is expected behavior. Note that ia_css_uninit() get called whenever streaming is stopped through atomisp_stop_stream() calling atomisp_reset() so the buffers are still freed whenever streaming is stopped. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250505210008.152659-5-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: Stop pipeline on atomisp_css_start() failureHans de Goede
atomisp_start_streaming() starts the media pipeline before calling atomisp_css_start(). On atomisp_css_start() failures stop the pipeline before returning the error. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250505210008.152659-4-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: Properly stop the ISP stream on sensor streamon errorsHans de Goede
When v4l2_subdev_call(sensor, s_stream, 1) fails atomisp_start_streaming() was not properly returning the buffer ownership back to the videobuf2-core code, resulting in: [ 1318.153447] ------------[ cut here ]------------ [ 1318.153499] WARNING: CPU: 0 PID: 4856 at drivers/media/common/videobuf2/videobuf2-core.c:1803 vb2_start_streaming+0xcb/0x160 [videobuf2_common] ... [ 1318.154551] Call Trace: [ 1318.154560] <TASK> [ 1318.154571] ? __warn.cold+0xb7/0x14a [ 1318.154591] ? vb2_start_streaming+0xcb/0x160 [videobuf2_common] [ 1318.154617] ? report_bug+0xe0/0x180 [ 1318.154640] ? handle_bug+0x5e/0xa0 [ 1318.154652] ? exc_invalid_op+0x14/0x70 [ 1318.154665] ? asm_exc_invalid_op+0x16/0x20 [ 1318.154697] ? vb2_start_streaming+0xcb/0x160 [videobuf2_common] [ 1318.154723] ? vb2_start_streaming+0x70/0x160 [videobuf2_common] [ 1318.154748] vb2_core_streamon+0xa2/0x100 [videobuf2_common] The sensor streamon call is the last thing that atomisp_start_streaming() does and it was failing to undo all of the previous steps in general. Refactor atomisp_stop_streaming() into an atomisp_stop_stream() helper and call that on sensor streamon failure to properly clean things up. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250505210008.152659-3-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: atomisp: Move atomisp_stop_streaming() above atomisp_start_streaming()Hans de Goede
Move atomisp_stop_streaming() above atomisp_start_streaming(), this is a preparation patch for making atomisp_start_streaming() properly cleanup if starting the sensor stream fails. No functional change, only moving a block of code up. Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://lore.kernel.org/r/20250505210008.152659-2-hdegoede@redhat.com Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: cec: cec-gpio: reading hpd/5v is allowed to sleepHans Verkuil
Reading the hpd or 5v gpios is something that can sleep, so rework the code to allow this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: cec: cec-gpio: rename functionsHans Verkuil
Ensure that the interrupt function names clearly state for which gpio they are (cec/hpd/5v). No functional changes. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08Documentation: media: cec: update error inj docHans Verkuil
Document rx-no-low-drive and the new support to inject glitches. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: cec: core: add rx-no-low-drive settingHans Verkuil
If rx-no-low-drive is set, then the CEC pin framework will disable the detection of situations where a Low Drive has to be generated. So if this is set, then we will never generate Low Drives. This helps testing whether other CEC devices generate Low Drive pulses by ensuring it is not us that is generating them. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: cec: core: add glitch error injectionHans Verkuil
This adds support for inserting 'glitches' after a falling and/or rising edge. This tests what happens when there are little voltage spikes after falling or rising edges, which can be caused due to noise or reflections on the CEC line. A proper CEC implementation will deglitch this, but a poor implementation can create a Low Drive pulse in response, effectively making CEC unusable. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-08media: i2c: adv7604/tc358743/tda1997x: HPD low for HZ / 7Hans Verkuil
When the EDID is updated, the hotplug detect signal must remain low for 100 ms minimum. Currently these three drivers use that exact minimum, but some HDMI transmitters need the HPD to be low for a bit longer before they detect that they need to read the EDID again. Experience shows that HZ / 7 (= 143 ms) is a good value. So change HZ / 10 to HZ / 7. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2025-07-04media: ipu7: Drop IPU8 PCI ID for nowSakari Ailus
This driver is intended for IPU7 at the moment so drop the IPU8 PCI ID. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: staging/ipu7: add Makefile, Kconfig and to-do file for IPU7Bingbu Cao
Add Kconfig and Makefile for IPU7 driver and also update the Makefile to build the IPU7 driver. Also add a to-do file to list the TODOs. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03MAINTAINERS: add maintainers for Intel IPU7 input system driverBingbu Cao
Update MAINTAINERS file for Intel IPU7 input system staging driver. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: staging/ipu7: add IPU7 input system device driverBingbu Cao
The main input system driver mainly cover the basic hardware setup, v4l2 devices registration, firmware stream interfaces and interrupt handling. Input system CSI2 receiver is exposed as a v4l2 sub-device. Each CSI2 sub-device represent one single CSI2 hardware port which be linked with external sub-device such camera sensor by linked with ISYS CSI2's sink pad. The CSI2 source pad is linked to the sink pad of video capture device. Register V4L2 video device and setup the VB2 queues to support video capture. Video streaming callback will trigger the input system driver to construct a input system stream configuration for firmware based on data type and stream ID and then queue buffers to firmware to do capture. IPU7 CSI-2 D-PHY hardware is a Synopsys DWC MIPI CSI2 Rx IP, the driver program the DPHY to receive MIPI data from camera sensors. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: staging/ipu7: add IPU7 firmware ABI headersBingbu Cao
IPU7 firmware defines the ABIs between firmware and software, this patch adds a series of ABI headers. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: staging/ipu7: add firmware parse, syscom interface and bootBingbu Cao
IPU7 irmware is generated and released as signed Code Partition Directory (CPD) format file which is aligned with the SPI flash code partition definition. The driver parses the CPD based on the layout. Syscom is an inter-process(or) communication mechanism between an IPU and host. Syscom uses message queues for message exchange between IPU and host. Each message queue has its consumer and producer, host queue messages to firmware as the producer and then firmware to dequeue the messages as consumer and vice versa. IPU and host use shared registers or memory to reside the read and write indices which are updated by consumer and producer. IPU7 firmware defined its boot sequence, driver setup the boot configuration and program the boot parameters to start and run the firmware. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: staging/ipu7: add IPU7 DMA APIs and MMU mappingBingbu Cao
The Intel IPU7 has internal microprocessor which runs the firmware The microprocessor accesses system DRAM by its internal 32-bit virtual address space. Driver should setup the MMU table and expose the DMA APIs for memory buffer mapping. This patch adds the IPU MMU and a DMA mapping implementation to setup the internal MMU hardware. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: staging/ipu7: add Intel IPU7 PCI device driverBingbu Cao
Intel Image Processing Unit 7th Gen includes input and processing systems and the hardware presents itself as a single PCI device in system same as IPU6. The IPU7 PCI device driver basically does PCI configurations, basic hardware configuration by its buttress interfaces, loads the firmware binary, register the auxiliary device which serve for the ISYS device driver. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: qcom: camss: Remove extraneous -supply postfix on supply namesBryan O'Donoghue
The -supply postfix is wrong but wasn't noticed on the CRD devices or indeed the Dell devices, however on Lenovo devices the error comes up. Fixes: 1830cf0f56c3 ("media: qcom: camss: Add x1e80100 specific support") Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> [bod: reworded commit log per Konrad's feedback] Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03MAINTAINERS: add myself as a CAMSS patch reviewerVladimir Zapolskiy
Add myself as a review of Qualcomm CAMSS subsystem patches. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: qcom: camss: simplify camss_subdev_notifier_complete() functionVladimir Zapolskiy
For sake of code simplicity and readability reduce the function code by one level of indentation, the change is non-functional. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> [bod: Fixed indentation error] Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: qcom: camss: register camss media device before subdevicesVladimir Zapolskiy
A media device can and at least for sake of simplicity should be registered before V4L2 devices including the ones added on async completion. The change removes the second and out of camss_probe() media device registration path, and it allows to get a working ISP media device independently from connected or not sensor devices. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: qcom: camss: remove duplicated csiphy_formats_sc7280 dataVladimir Zapolskiy
It's sufficient to have just one previously set csiphy_formats_sdm845 data. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: qcom: camss: cleanup media device allocated resource on error pathVladimir Zapolskiy
A call to media_device_init() requires media_device_cleanup() counterpart to complete cleanup and release any allocated resources. This has been done in the driver .remove() right from the beginning, but error paths on .probe() shall also be fixed. Fixes: a1d7c116fcf7 ("media: camms: Add core files") Cc: stable@vger.kernel.org Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: qcom: camss: csiphy-3ph: Fix inadvertent dropping of SDM660/SDM670 ↵Bryan O'Donoghue
phy init The moving of init sequence hook from gen2() to subdev_init() doesn't account for gen1 devices such as SDM660 and SDM670. The switch should find the right offset for gen2 PHYs only, not reject gen1. Remove the default error case to restore gen1 CSIPHY support. Cc: stable@vger.kernel.org Fixes: fbce0ca24c3a ("media: qcom: camss: csiphy-3ph: Move CSIPHY variables to data field inside csiphy struct") Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: qcom: camss: Power pipeline only when streamingRichard Acayan
The libcamera plugin for Pipewire may keep an open file descriptor to the video device, even while streaming. This simplifies its operation, as it only needs to keep track of a number instead of a file path. When the video device is open but not streaming, the pipeline can be powered off. Move the pipeline power management to the prepare_streaming and unprepare_streaming functions. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03dt-bindings: media: qcom,x1e80100-camss: Fix isp unit addressVladimir Zapolskiy
According to the devicetree specification a unit address shall match the first address value of the reg property. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03dt-bindings: media: qcom,x1e80100-camss: Remove clock-lanes port propertyVladimir Zapolskiy
Since clock lanes under CSIPHY are hard-wired and non-selectable, it makes sense to remove this port property. The change follows the same logic as found in commit 336136e197e2 ("media: dt-bindings: media: camss: Remove clock-lane property"). Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03dt-bindings: media: qcom,x1e80100-camss: Add optional bus-type propertyVladimir Zapolskiy
Since CSIPHY IP on modern Qualcomm SoCs supports D-PHY and C-PHY interfaces, it might be necessary to specify it explicitly for some particular devices. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03dt-bindings: media: qcom,x1e80100-camss: Tighten the property regex patternVladimir Zapolskiy
There are 4 CSIPHY ports on X1E80100, it'd be preferred to tinker a too loose the regexp, which covers all these port names. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: iris: Fix opp scaling of power domainsAkhil P Oommen
Pass PD_FLAG_REQUIRED_OPP flag to allow opp framework to scale the rpmpd power domains. Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com> Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: iris: Add codec specific check for VP9 decoder drain handlingDikshita Agarwal
Add a codec specific for the VP9 decoder to ensure that a non-null buffer is sent to the firmware during drain. The firmware enforces a check for VP9 decoder that the number of buffers queued and dequeued on the output plane should match. When a null buffer is sent, the firmware does not return a response for it, leading to a count mismatch and an assertion failure from the firmware. Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: iris: Add internal buffer calculation for HEVC and VP9 decodersDikshita Agarwal
Add internal buffer count and size calculations for HEVC and VP9 decoders. Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: add __maybe_unused to size_mp2d_lb_fe_top_data]
2025-07-03media: iris: Set mandatory properties for HEVC and VP9 decoders.Dikshita Agarwal
Subscribe and set mandatory properties to the firmware for HEVC and VP9 decoders. Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: iris: Add platform capabilities for HEVC and VP9 decodersDikshita Agarwal
Add platform capabilities for HEVC and VP9 codecs in decoder driver with related hooks. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: iris: Add HEVC and VP9 formats for decoderDikshita Agarwal
Extend the decoder driver's supported formats to include HEVC (H.265) and VP9. This change updates the format enumeration (VIDIOC_ENUM_FMT) and allows setting these formats via VIDIOC_S_FMT. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-07-03media: iris: Add a comment to explain usage of MBPSDikshita Agarwal
Add a comment to explain usage of MBPS and define a macro for 8K resolution for better readability Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>