summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
29 hoursMerge branch 'headers' of git://git.infradead.org/users/willy/pagecache.gitMark Brown
# Conflicts: # net/ceph/osd_client.c
31 hoursMerge branch 'next' of git://linuxtv.org/media-ci/media-pending.gitMark Brown
31 hoursMerge branch 'i2c/i2c-next' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
31 hoursMerge branch 'mm-nonmm-unstable' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
36 hoursdrivers/media/v4l2-core/v4l2-vp9.c: reduce inliningAndrew Morton
csky allmodconfig, gcc-15.2.0: drivers/media/v4l2-core/v4l2-vp9.c: In function 'v4l2_vp9_adapt_noncoef_probs': drivers/media/v4l2-core/v4l2-vp9.c:1834:1: error: the frame size of 1436 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] The amount of inlining in there is simply nuts. This patch semi-randomly uninlines various things and fixes the above. Ad the .text size reduction is tremendous: ts:/usr/src/25> size drivers/media/v4l2-core/v4l2-vp9.o text data bss dec hex filename 22450 36 0 22486 57d6 drivers/media/v4l2-core/v4l2-vp9.o-before 16144 36 0 16180 3f34 drivers/media/v4l2-core/v4l2-vp9.o-after Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
46 hoursmedia: qcom: camss: use fwnode_graph_for_each_endpoint_scoped() to simplify codeFrank Li
Use fwnode_graph_for_each_endpoint_scoped() to simplify code. No functional changes. Reviewed-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com> Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
46 hoursmedia: rkisp1: use fwnode_graph_for_each_endpoint_scoped() to simplify codeFrank Li
Use fwnode_graph_for_each_endpoint_scoped() to simplify code. No functional changes. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
46 hoursmedia: mc: use fwnode_graph_for_each_endpoint_scoped() to simpilfy codeFrank Li
Use cleanup helper fwnode_graph_for_each_endpoint_scoped() to simpilfy code. Reviewed-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
45 hoursmedia: ipu-bridge: Add upside-down quirk for Surface Pro 11Sergey Lebedev
The Microsoft Surface Pro for Business 11th Edition with Intel mounts its OV13858 rear sensor rotated 180 degrees, but reports a rotation of 0 in its SSDB and has no matching _PLD, so without a DMI quirk the image is presented upside down. Add a DMI quirk entry for this model so that a rotation of 180 degrees is reported for its OVTID858 sensor. Tested on the affected machine: camera_sensor_rotation reads 180 and libcamera reports Rotation = 180. Confirmed independently on a second machine of the same model, where GNOME Snapshot and Firefox present the image the right way up once the quirk is applied; qcam, which talks to libcamera directly, does not. Signed-off-by: Sergey Lebedev <lsa.uz@pm.me> Tested-by: German Pablo Lindo <germanpapulindez@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
46 hoursmedia: i2c: it6625: select CONFIG_HDMIArnd Bergmann
Without HDMI support, the driver fails to link: arm-linux-gnueabi-ld: drivers/media/i2c/it6625.o: in function `it6625_show_avi_infoframe': it6625.c:(.text.it6625_show_avi_infoframe+0x94): undefined reference to `hdmi_infoframe_unpack' Select the option like the other similar drivers do. Fixes: 142e5f00bd57 ("media: i2c: add driver for ITE IT6625/IT6626") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
46 hoursmedia: ivsc: Fix csi_dev use-after-free in mei_ace_setup_dev_link()Wentao Liang
device_link_add() only takes a reference to the supplier when the link is created successfully. When it fails it returns NULL without taking one, so the put_device(csi_dev) before the error check can drop the last reference to csi_dev and dev_name(csi_dev) then dereferences a freed device. Move the put_device() below the error check and release the reference through the existing err_put label on the failure path so that csi_dev is no longer touched after it has been put. Fixes: 765abb76f51f ("media: ivsc: Release csi_dev reference early in mei_ace_setup_dev_link()") Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: v4l2-subdev: Add struct v4l2_subdev_client_info pointer to pad opsSakari Ailus
Add a pointer to const struct v4l2_subdev_client_info to the get_fmt, set_fmt, get_selection and set_selection sub-device pad ops. The client info struct will soon be used to differentiate UAPI based on client capabilities. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: cvs: Drop comments on sub-device operationsSakari Ailus
The sub-device operations are well documented in the V4L2 sub-device framework already. Drop them from the CVS driver. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: mt9m001: Pass sub-device state to set_selection() callbackSakari Ailus
When the set_selection() pad operation is called from mt9m001_s_fmt(), it receives a NULL pointer for the state argument. As the function does not use the state this does not cause any issue in practice, but it could cause NULL pointer dereferences if the mt9m001_set_selection() implementation is modified. Avoid future issues by passing the subdev state. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: v4l2-subdev: Don't assign set_fmt where it's equivalent to get_fmtSakari Ailus
Do not assign the set_fmt() pad op where it is the same as get_fmt(). The get_fmt() pad op is called by the framework now in absence of set_fmt() op. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2 daysmedia: v4l2-subdev: Always call get_fmt() if set_fmt() is unavailableSakari Ailus
Many drivers implement set_fmt() pad op that simply returns the format just as get_fmt() would do, usually because the driver only supports a single one. As a driver should always implement set_fmt() either on its own or via get_fmt(), call get_fmt() in case set_fmt() isn't implemented by the driver. This allows removing a fair amount of boilerplate code as well as ensures that set_fmt() works whenever get_fmt() does. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Hans Verkuil <hverkuil+cisco@kernel.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: v4l2-subdev: Move op check to sub-device op wrappersSakari Ailus
In anticipation of performing work for sub-device operation when the driver doesn't implement one, move the check of operation existence to the wrapper itself. No functional change intended. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: v4l2-subdev: Move subdev client capabilities into a new structSakari Ailus
Add struct v4l2_subdev_client_info to hold sub-device client capability bits that used to be stored in the client_caps field of struct v4l2_subdev_fh. The intent is to enable passing this struct to sub-device pad operation callbacks for capability information. The main reason why this is a new struct instead of a u64 field is that modifying the callback arguments requires touching almost every sub-device driver and that is desirable to avoid in the future, should more than the client capability bits need to be known to the callbacks. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: imx219: Rename "binning" as "bin_hv" in imx219_set_pad_formatSakari Ailus
Rename "binning" as "bin_hv" in anticipation of having a variable called "binning" for another purpose. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2 daysmedia: imx219: The horizontal blanking step is 8Sakari Ailus
The step for the LINE_LENGTH_A register on imx219 is 8. Take this into account in creating and modifying the horizontal blanking control. The minimum line length in pixels as well as the horizontal blanking values are already divisible by 8. Fixes: cd5e2fd89923 ("media: i2c: imx219: make HBLANK r/w to allow longer exposures") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: imx219: Account for rate_factor in control stepsSakari Ailus
The controls that are divided by the rate_factor before writing them to the registers have the step of the value of the rate_factor. Take this into account when the control's range is modified. The controls are created in a configuration where rate_factor is always 1, hence there's no need to change the code adding new controls. Fixes: f513997119f4 ("media: i2c: imx219: Scale the pixel rate for analog binning") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: imx219: Account rate_factor in setting upper exposure limitSakari Ailus
The rate_factor multiplier is used to multiply a few values in the sensor's timing configuration and the exposure time is one of them. This also needs to be taken into account in exposure time margin: multiply it by rate_factor so that sensor's exposure time margin is respected. Fixes: f513997119f4 ("media: i2c: imx219: Scale the pixel rate for analog binning") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2 daysmedia: v4l2-common: add Y12 to v4l2_format_info()Tomi Valkeinen
Add the V4L2_PIX_FMT_Y12 (12-bit greyscale stored in 16 bit container) to the v4l2_format_info table. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: i2c: cvs: Get the wake IRQ without claiming the GPIOJunjie Cao
The wake line is only used as an IRQ source, yet the driver requests it with devm_gpiod_get(). On the Dell XPS 14 DA14260 (Panther Lake) that request lands on the pin the four CS35L57 amplifiers read their speaker ID from. Each amplifier's _CRS carries GpioIo (Shared, PullNone, 0, 0, IoRestrictionInputOnly, "\_SB.GPI1", 0, ResourceConsumer,,) {20} and INTC10E1 builds its _CRS at runtime from pad numbers kept in NVS: a GpioInt (Edge, ActiveLow, Shared) first, then an Exclusive output-only GpioIo for reset and two lines on the USB GPIO expander. The driver maps index 0 to "wake". While it holds the line, cs35l56 fails and does not retry: cs35l56 sdw:0:2:01fa:3557:01:2: error -EBUSY: Failed to get spk-id-gpios All four fail and no card is registered. Fedora 7.1.13 is the first Fedora kernel with the driver enabled; 7.1.12 on the same board creates the card, and 7.2.4 creates it again with intel_cvs blacklisted. Where ipu-bridge does not expose the CSI endpoints, CSI init returns -EPROBE_DEFER and every retry claims the line again for the length of the handshake, which is how 7.1 fails as well. Take the IRQ from the GpioInt entry with acpi_dev_gpio_irq_get_by(), as the I2C core does for client->irq; this also applies the trigger type from _CRS. The vendor driver in intel/vision-drivers does the same. The driver binds as a platform device too, hence the explicit lookup. A DKMS build of the patched driver on a DA14260 running 7.2.4 binds with all four amplifiers probing and the camera working (third link). Fixes: 8e2b43d2c10b ("media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS)") Cc: stable@vger.kernel.org Reported-by: jan p. springer <regnirpsj@gmail.com> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2529031 Link: https://github.com/thesofproject/sof/issues/11152 Link: https://github.com/omacom/omarchy-pkgs/pull/419 Signed-off-by: Junjie Cao <junjie.cao@intel.com> Tested-by: Manuel Knitza <manuel.knitza@googlemail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-isp: Add full streams supportTomi Valkeinen
Add the missing pieces to enable full streams support: - Add set_routing - Drop the explicit uses of a single stream, and instead use the streams mask. Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-csi2: Add full streams supportTomi Valkeinen
Add the missing pieces to enable full streams support: - Add set_routing - Drop the explicit uses of a single stream, and instead use the streams mask - Track enabled sink streams so that in rcsi2_irq_thread() we can disable and enable all currently enabled streams Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-csi2: Call get_frame_desc to find out VC & DT (Gen3)Tomi Valkeinen
Call get_frame_desc to find out VC & DT, for Gen3 platforms, instead of hardcoding the VC routing and deducing the DT based on the mbus format. If the source subdevice doesn't implement .get_frame_desc, we use a fallback case where we assume there's a single stream with VC = 0 and DT based on the mbus format. Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-isp: Call get_frame_desc to find out VC & DTTomi Valkeinen
Call get_frame_desc to find out VC & DT, instead of hardcoding the VC routing and deducing the DT based on the mbus format. Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-csi2: Add .get_frame_desc opTomi Valkeinen
Add v4l2_subdev_pad_ops.get_frame_desc() implementation. We also implement a fallback for the case where the upstream subdevice does not implement .get_frame_desc. It assumes a single stream with VC = 0 and DT based on the configured stream mbus format. Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-isp: Switch to Streams APITomi Valkeinen
Switch to Streams API with a single hardcoded route. For single-stream use case there should be no change in behavior. Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-csi2: Switch to Streams APITomi Valkeinen
Switch to Streams API with a single hardcoded route. For single-stream use case there should be no change in behavior. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-csi2: Move {enable|disable}_streams() callsTomi Valkeinen
With multiple streams the operation to enable the CSI-2 hardware and to call {enable|disable}_streams() on upstream subdev will need to be handled separately. Prepare for that by moving {enable|disable}_streams() calls out from rcsi2_start() and rcsi2_stop(). As the error recovery in rcsi2_irq_thread() relies on rcsi2_start() and rcsi2_stop(), we need to modify rcsi2_irq_thread() accordingly. On Gen3, a side effect of this change is that if the sink side devices call .enable_streams() on rcar-csi2 multiple times, the second call will fail. This is because we always use stream ID 0, so the second call would attempt to enable the same stream again, leading to an error. In other words, a normal single-stream setup continues to work, but trying to use the current driver's custom VC based routing will fail. On Gen4, this doesn't matter as the rcar-isp behaves in a similar way as described above, and thus rcar-csi2 will only get a single .enable_streams() call. Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-isp: Move {enable|disable}_streams() callsTomi Valkeinen
With multiple streams the operation to enable the ISP hardware and to call {enable|disable}_streams() on upstream subdev will need to be handled separately. Prepare for that by moving {enable|disable}_streams() calls out from risp_start() and risp_stop(). On Gen4, a side effect of this change is that if the sink side devices call .enable_streams() on rcar-isp multiple times, the second call will fail. This is because we always use stream ID 0, so the second call would attempt to enable the same stream again, leading to an error. In other words, a normal single-stream setup continues to work, but trying to use the current driver's custom VC based routing will fail. Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-vin: Link VINs on Gen3 to a single channel on each CSI-2Tomi Valkeinen
The stream routing will be fully configurable when we add full streams support to the rcar pipeline. Thus there is no need for the user to be able to link VINs to different CSI-2 channels. In fact, allowing e.g. VIN0 to be connected to CSI-2 channel 3 would be wrong, as the hardware doesn't allow that. Change rvin_csi2_create_link() so that it creates media links only between matching VINs and CSI-2 channels (VIN0 - channel 0, VIN1 - channel 1, etc.). Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: rcar-vin: Fix comment related to stride handlingTomi Valkeinen
The comment says the stride has to be aligned to 16 bytes, but it should be 16 pixels, as VNIS_REG register is in pixels. Fixes: 40c6da8a9c0f ("media: renesas: vin: Fix RAW8 (again)") Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: ipu-bridge: Add sensor rotation quirk for Dell XPS 14 (Dell 14 ↵Kate Hsuan
Premium) DA14250 Add "Dell XPS 14 (Dell 14 Premium) DA14250" to the list of systems requiring a 180-degree sensor rotation quirk. This resolves an issue where the IPU camera stream is displayed upside-down. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2510889 Signed-off-by: Kate Hsuan <hpa@redhat.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2 daysmedia: i2c: cvs: Add Lattice device quirk for VID:0x2ac1 PID:0x20d1Kate Hsuan
On Dell laptops such as the XPS 14 (DA14250), the IPU6 camera fails to initialize due to a missing device quirk for the Lattice device. The kernel logs the following error during probe: [ 7.299665] intel_cvs i2c-INTC10E0:00: No quirks for device (VID:0x2ac1 PID:0x20d1) [ 7.299976] intel_cvs i2c-INTC10E0:00: error -EREMOTEIO: get caps failed [ 7.300026] intel_cvs i2c-INTC10E0:00: probe with driver intel_cvs failed with error -121 Add a matching quirk entry for VID 0x2ac1 and PID 0x20d1 to allow intel_cvs to configure the device properly and enable the camera. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2526246 Signed-off-by: Kate Hsuan <hpa@redhat.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
3 daysmedia: i2c: imx334: add new link frequency configurationShravan Chippa
Add 222 MHz link frequency support and refactor clock registers into per-frequency register lists. Introduce imx334_clk_params to map each link frequency to its register set and supported resolution range. Make the link frequency control writable so userspace can select the desired operating point. Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
4 daysMerge branch 'i2c/i2c-fixes' into i2c/i2c-nextAndi Shyti
4 daysmedia: i2c: t4ka3: drop unmatched runtime PM putGuangshuo Li
t4ka3_probe() marks the device runtime active and enables runtime PM, but does not increment the runtime PM usage counter. Nevertheless, the probe failure path calls pm_runtime_put_noidle(), which has no matching runtime PM get operation. pm_runtime_put_noidle() currently does not decrement usage_count when it is already zero, so the call is ineffective. Remove the unmatched put to keep the runtime PM reference handling balanced and avoid misleading cleanup code. This issue was found by manual code inspection. Fixes: fd55319692151 ("media: Add t4ka3 camera sensor driver") Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
4 daysmedia: i2c: ov2735: fix power cleanup on removeGuangshuo Li
ov2735_probe() explicitly powers on the sensor before enabling runtime PM. The probe failure paths call ov2735_power_off(), but the remove path does not perform the corresponding power-off operation. The managed runtime PM helpers only clean up the runtime PM state. devm_pm_runtime_set_active_enabled() disables runtime PM and restores the suspended state during device resource release, while devm_pm_runtime_get_noresume() drops the runtime PM usage reference. Neither helper invokes ov2735_power_off(). As a result, removing the driver after a successful probe can leave the sensor clock and regulators enabled and the GPIOs in the powered state. Call ov2735_power_off() from ov2735_remove() to match the successful ov2735_power_on() performed during probe. This issue was found by manual code inspection. Fixes: fa9e6df636fb ("media: i2c: add ov2735 image sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
4 daysmedia: i2c: og01a1b: power off sensor on removeGuangshuo Li
og01a1b_probe() powers the sensor on explicitly before identifying and initializing it. After a successful probe, runtime PM is enabled and pm_runtime_idle() is used to allow the runtime suspend callback to power the sensor off. The probe error path explicitly calls og01a1b_power_off(), but the normal remove path only disables runtime PM. pm_runtime_disable() does not guarantee that an active device is runtime suspended, so the sensor can remain powered when the driver is removed. This also leaves the xvclk enable performed by og01a1b_power_on() unbalanced. After disabling runtime PM, check whether the device is already suspended. If it is still active, power the sensor off explicitly and update the runtime PM state accordingly. Avoid powering it off again when runtime suspend has already done so. This issue was found by manual code inspection. Fixes: a95ffde28783 ("media: i2c: og01a1b: Add support of xvclk supply clock in power management") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
4 daysmedia: i2c: ar0521: remove duplicate media entity cleanupGuangshuo Li
The error path taken when ar0521_power_on() fails calls media_entity_cleanup() at the disable label and then falls through to the entity_cleanup label, where media_entity_cleanup() is called again. There is no need to clean up the media entity twice. Remove the first call and let all error paths converge on the common entity_cleanup label. This issue was found by manual code inspection. Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver") Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
4 daysmedia: i2c: alvium-csi2: balance runtime PM usage count on removeGuangshuo Li
alvium_probe() increments the runtime PM usage count with pm_runtime_get_noresume() before enabling runtime PM. The probe error path correctly balances this reference with pm_runtime_put_noidle(), but the normal remove path only disables runtime PM. pm_runtime_disable() does not decrement the usage count, so a successful probe followed by driver removal leaves the runtime PM usage count unbalanced. Add the missing pm_runtime_put_noidle() to the remove path, matching the existing probe error cleanup. This issue was found by manual code inspection. Fixes: 0a7af872915e ("media: i2c: Add support for alvium camera") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
3 daysmedia: sun6i-csi: bridge: Use V4L2 subdev active stateArash Golgol
Use the V4L2 subdev active state API to store the active format. This simplifies the driver not only by dropping the bridge mbus_format field, but it also allows dropping the bridge lock, replaced with the state lock. Previously, capture accessed bridge private state directly. After moving to framework-managed state, resolve the format through the subdev pad API. The sun6i-csi-bridge hardware does not perform any format conversion. Enforce identical formats on the sink and source pads in the set_fmt() and init_state() callbacks. Signed-off-by: Arash Golgol <arash.golgol@gmail.com> Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Tested-by: Paul Kocialkowski <paulk@sys-base.io> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
3 daysmedia: sun8i-a83t-mipi-csi2: Use V4L2 subdev active stateArash Golgol
Use the V4L2 subdev active state API to store the active format. This simplifies the driver not only by dropping the bridge mbus_format field, but it also allows dropping the bridge lock, replaced with the state lock. The sun8i-a83t-mipi-csi2 hardware does not perform any format conversion. Enforce identical formats on the sink and source pads in the set_fmt() and init_state() callbacks. Signed-off-by: Arash Golgol <arash.golgol@gmail.com> Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Tested-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
3 daysmedia: sun6i-mipi-csi2: Use V4L2 subdev active stateArash Golgol
Use the V4L2 subdev active state API to store the active format. This simplifies the driver not only by dropping the bridge mbus_format field, but it also allows dropping the bridge lock, replaced with the state lock. The sun6i-mipi-csi2 hardware does not perform any format conversion. Enforce identical formats on the sink and source pads in the set_fmt() and init_state() callbacks. Signed-off-by: Arash Golgol <arash.golgol@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Tested-by: Paul Kocialkowski <paulk@sys-base.io> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
6 daysmedia: ipu-bridge: do not use the CVS device lookup for IVSCSergey Zagursky
Since commit c6b1b34b5090 ("media: pci: intel: Add CVS support for IPU bridge driver") the internal camera no longer works on laptops where the sensor sits behind an IVSC, for example a Dell XPS 16 9640 (IPU6, INTC10CF, ov02c10): intel-ipu6 0000:00:05.0: Found supported sensor OVTI02C1:00 intel-ipu6 0000:00:05.0: Connected 1 cameras ivsc_csi intel_vsc-92335fcf-3203-4472-af93-7b4453ac29da: mei-csi probed without device fwnode! No sensor subdevice is registered, the media graph has no sensor entity and userspace finds no camera at all. ipu_bridge_get_ivsc_csi_dev() first looks for the platform device named "intel_vsc" and returns its mei-csi child. That device is created by mei_vsc, which on this machine only appears once the LJCA USB bridge and its SPI controller have probed, about a second after the IPU6 probe that runs the bridge: 07:59:29.297 platform INTC10CF:00 created (ACPI scan) 07:59:41 intel-ipu6 probe -> ipu_bridge_init() 07:59:42.391 platform intel_vsc created (mei_vsc) The commit above added two fallbacks for CVS which match on the ACPI companion alone. They are reached for every entry of ivsc_acpi_ids[], IVSC IDs included. The IVSC ACPI device has two physical nodes: INTC10CF:00/physical_node -> platform/INTC10CF:00 (no driver bound) INTC10CF:00/physical_node1 -> platform/intel_vsc (mei_vsc) so bus_find_device_by_acpi_dev(&platform_bus_type, adev) returns the bare platform device. ipu_bridge_instantiate_ivsc() then attaches the IVSC software node to that device instead of to the mei-csi client, the bridge reports success, and the probe is never retried. mei_csi later probes without a fwnode, the CSI-2 link is never described, and the sensor ACPI device, which has an honoured _DEP on the IVSC device, is never enumerated. Before those fallbacks existed the lookup returned NULL here, the bridge failed with -ENODEV and the probe was retried once the IVSC device had shown up. Skip those fallbacks for IVSC devices, keying on the IVSC IDs rather than the CVS ones: new CVS IDs keep being added, whereas the IVSC list is complete. CVS binds a driver to the ACPI device itself, so matching on the companion stays unambiguous there. Fixes: c6b1b34b5090 ("media: pci: intel: Add CVS support for IPU bridge driver") Link: https://lore.kernel.org/linux-media/20260901194526.6369-1-gvozdoder@gmail.com/ Cc: stable@vger.kernel.org Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Sergey Zagursky <gvozdoder@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 daysmedia: ipu6: Fix up missing IWYU issueMark Brown
In -next: /tmp/next/build/drivers/media/pci/intel/ipu6/ipu7-fw-isys.c:229:3: error: call to undeclared function 'clflush_cache_range'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 229 | clflush_cache_range(cpu_mapped_buf, size); | ^ Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Antti Laakso <antti.laakso@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
8 daysmedia: cadence: csi2rx: Support RAW12 bayer formatsJai Luthra
Add support for RAW12 bayer formats in the cadence csi2rx driver. Signed-off-by: Jai Luthra <j-luthra@ti.com> Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com> Reviewed-by: Rishikesh Donadkar <r-donadkar@ti.com> Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>