mbox series

[00/11] media: renesas: rcar-csi2: Use the subdev active state

Message ID 20240503155127.105235-1-jacopo.mondi@ideasonboard.com (mailing list archive)
Headers show
Series media: renesas: rcar-csi2: Use the subdev active state | expand

Message

Jacopo Mondi May 3, 2024, 3:51 p.m. UTC
As a follow-up to the recently sent
"media: renesas: rcar-csi2: Support multiple streams" series, this smaller
version collects some fixes and implement usage of the subdev active state
to simplify the R-Car CSI-2, ADV748x and MAX9286 drivers implementations.

Below the possibly more controversial points:

- R-Car CSI-2

There's a user-visible change here, as in the past it was possible to set
format on all pads, and the vin-test scripts do that. In this version I decided
to make the format configurable on the sink and propagate to sources. I'm not
sure if this can be considered a user visible change and we need to maintain
backward compatibility

- ADV748x

Add a list of supported formats and validated them in s_fmt. The ADV748x driver
configures the chip to automatically detect the output format based on what the
front-end uses, so setting a format doesn't actually modify the output image
formats. Regardless I presume making sure the format is actually supported is a
good thing.

- MAX9286

The driver uses frame_interval = 0/0 to detect if automatic frame sync detection
should be used. For this reason I initialized the frame interval of the active
state to 0/0 which might sound weird.

Tested with GMSL on Eagle V3M
Tested with HDMI on Salvator-X

Jacopo Mondi (11):
  media: rcar-vin: Fix YUYV8_1X16 handling for CSI-2
  media: rcar-csi2: Disable runtime_pm in probe error
  media: rcar-csi2: Cleanup subdevice in remove()
  media: rcar-csi2: Use the subdev active state
  media: adv748x-csi2: Initialize subdev format
  media: adv748x-csi2: Implement enum_mbus_codes
  media: adv748x-csi2: Validate the image format
  media: adv748x-csi2: Use the subdev active state
  media: max9286: Fix enum_mbus_code
  media: max9286: Use the subdev active state
  media: max9286: Use frame interval from subdev state

 drivers/media/i2c/adv748x/adv748x-csi2.c      | 141 ++++++++-----
 drivers/media/i2c/adv748x/adv748x.h           |   1 -
 drivers/media/i2c/max9286.c                   | 185 +++++++-----------
 drivers/media/platform/renesas/rcar-csi2.c    | 141 +++++++------
 .../platform/renesas/rcar-vin/rcar-dma.c      |  16 +-
 5 files changed, 251 insertions(+), 233 deletions(-)

--
2.44.0