mbox series

[v2,0/2] media: v4l2-subdev: Make .init_cfg() an internal operation

Message ID 20231114131512.24615-1-laurent.pinchart+renesas@ideasonboard.com
Headers show
Series media: v4l2-subdev: Make .init_cfg() an internal operation | expand

Message

Laurent Pinchart Nov. 14, 2023, 1:15 p.m. UTC
Hello,

This patch series addresses a historical issue in the V4L2 subdev
in-kernel API.

The subdev .init_cfg() pad operation used to initialize a
v4l2_subdev_pad_config structure. This was changed to initializing a
v4l2_subdev_state a while ago, but the operation wasn't renamed, and
stayed a pad operation. Not only is the name confusing for new
developers, it is also the only pad operation that doesn't operate on a
pad, leading to more confusion.

This series addresses those two issues by renaming the operation to
.init_cfg() and moving it to the subdev internal operations, in patch
2/2. Most of the preparatory patches from v1 have been applied by Sakari
already, leaving only 1/2 for a respin due to issues with the
first version.

The series is based on a merge oof Sakari's latest pull request for v6.8
([1]) and a v6.7 fix for the VSP1 driver ([2]).

[1] https://lore.kernel.org/linux-media/ZVEyCfzm4ninES6K@valkosipuli.retiisi.eu
[2] https://lore.kernel.org/linux-media/20231113020054.GA18039@pendragon.ideasonboard.com

The VSP1 driver has been tested on a Renesas R-Car M3-N Salvator-XS. The
rest of the series is compile-tested only.

Laurent Pinchart (2):
  media: renesas: vsp1: Fix references to pad config
  media: v4l2-subdev: Rename .init_cfg() operation to .init_state()

 drivers/media/i2c/adv7180.c                   |  10 +-
 drivers/media/i2c/ccs/ccs-core.c              |   6 +-
 drivers/media/i2c/ds90ub913.c                 |  10 +-
 drivers/media/i2c/ds90ub953.c                 |  10 +-
 drivers/media/i2c/ds90ub960.c                 |  11 +-
 drivers/media/i2c/hi846.c                     |  10 +-
 drivers/media/i2c/imx214.c                    |  12 +-
 drivers/media/i2c/imx219.c                    |   9 +-
 drivers/media/i2c/imx290.c                    |  10 +-
 drivers/media/i2c/imx296.c                    |  10 +-
 drivers/media/i2c/imx334.c                    |  12 +-
 drivers/media/i2c/imx335.c                    |  12 +-
 drivers/media/i2c/imx412.c                    |  12 +-
 drivers/media/i2c/imx415.c                    |  10 +-
 drivers/media/i2c/mt9m001.c                   |  10 +-
 drivers/media/i2c/mt9m111.c                   |  10 +-
 drivers/media/i2c/mt9m114.c                   |  16 ++-
 drivers/media/i2c/mt9p031.c                   |   8 +-
 drivers/media/i2c/mt9v111.c                   |  10 +-
 drivers/media/i2c/ov01a10.c                   |  10 +-
 drivers/media/i2c/ov02a10.c                   |  10 +-
 drivers/media/i2c/ov2640.c                    |  10 +-
 drivers/media/i2c/ov2680.c                    |  10 +-
 drivers/media/i2c/ov2740.c                    |  10 +-
 drivers/media/i2c/ov5640.c                    |  10 +-
 drivers/media/i2c/ov5645.c                    |  12 +-
 drivers/media/i2c/ov5670.c                    |  10 +-
 drivers/media/i2c/ov7251.c                    |  12 +-
 drivers/media/i2c/ov8858.c                    |  10 +-
 drivers/media/i2c/ov9282.c                    |  12 +-
 drivers/media/i2c/st-vgxy61.c                 |  10 +-
 drivers/media/i2c/tc358746.c                  |  10 +-
 drivers/media/i2c/tda1997x.c                  |  10 +-
 drivers/media/i2c/tvp5150.c                   |   6 +-
 drivers/media/pci/intel/ivsc/mei_csi.c        |  10 +-
 drivers/media/platform/cadence/cdns-csi2rx.c  |  10 +-
 .../platform/microchip/microchip-csi2dc.c     |  10 +-
 .../platform/microchip/microchip-isc-scaler.c |  10 +-
 drivers/media/platform/nxp/imx-mipi-csis.c    |  10 +-
 drivers/media/platform/nxp/imx7-media-csi.c   |   6 +-
 .../platform/nxp/imx8-isi/imx8-isi-crossbar.c |  10 +-
 .../platform/nxp/imx8-isi/imx8-isi-pipe.c     |  10 +-
 drivers/media/platform/nxp/imx8mq-mipi-csi2.c |  10 +-
 .../platform/renesas/rzg2l-cru/rzg2l-csi2.c   |  10 +-
 .../platform/renesas/rzg2l-cru/rzg2l-ip.c     |  10 +-
 .../media/platform/renesas/vsp1/vsp1_brx.c    |  41 +++---
 .../media/platform/renesas/vsp1/vsp1_clu.c    |   4 +-
 .../media/platform/renesas/vsp1/vsp1_entity.c | 130 +++++++++---------
 .../media/platform/renesas/vsp1/vsp1_entity.h |  12 +-
 .../media/platform/renesas/vsp1/vsp1_hgo.c    |   4 +-
 .../media/platform/renesas/vsp1/vsp1_hgt.c    |   4 +-
 .../media/platform/renesas/vsp1/vsp1_histo.c  |  24 ++--
 .../media/platform/renesas/vsp1/vsp1_hsit.c   |  12 +-
 .../media/platform/renesas/vsp1/vsp1_lif.c    |   3 +-
 .../media/platform/renesas/vsp1/vsp1_lut.c    |   1 -
 .../media/platform/renesas/vsp1/vsp1_rpf.c    |   8 +-
 .../media/platform/renesas/vsp1/vsp1_rwpf.c   |  38 +++--
 .../media/platform/renesas/vsp1/vsp1_sru.c    |  37 +++--
 .../media/platform/renesas/vsp1/vsp1_uds.c    |  40 +++---
 .../media/platform/renesas/vsp1/vsp1_uif.c    |  25 ++--
 .../media/platform/renesas/vsp1/vsp1_video.c  |   4 +-
 .../media/platform/renesas/vsp1/vsp1_wpf.c    |  10 +-
 .../platform/rockchip/rkisp1/rkisp1-csi.c     |  10 +-
 .../platform/rockchip/rkisp1/rkisp1-isp.c     |  10 +-
 .../platform/rockchip/rkisp1/rkisp1-resizer.c |  10 +-
 .../platform/sunxi/sun4i-csi/sun4i_csi.c      |   1 +
 .../platform/sunxi/sun4i-csi/sun4i_csi.h      |   1 +
 .../platform/sunxi/sun4i-csi/sun4i_v4l2.c     |   9 +-
 .../sunxi/sun6i-csi/sun6i_csi_bridge.c        |  10 +-
 .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c   |  10 +-
 .../sun8i_a83t_mipi_csi2.c                    |  10 +-
 drivers/media/platform/ti/cal/cal-camerarx.c  |  10 +-
 drivers/media/platform/video-mux.c            |  10 +-
 .../media/platform/xilinx/xilinx-csi2rxss.c   |  10 +-
 .../media/test-drivers/vimc/vimc-debayer.c    |  11 +-
 drivers/media/test-drivers/vimc/vimc-scaler.c |  11 +-
 drivers/media/test-drivers/vimc/vimc-sensor.c |  11 +-
 drivers/media/v4l2-core/v4l2-subdev.c         |   8 +-
 drivers/staging/media/imx/imx-ic-prp.c        |   2 +-
 drivers/staging/media/imx/imx-ic-prpencvf.c   |   2 +-
 drivers/staging/media/imx/imx-media-csi.c     |   2 +-
 drivers/staging/media/imx/imx-media-utils.c   |   8 +-
 drivers/staging/media/imx/imx-media-vdic.c    |   2 +-
 drivers/staging/media/imx/imx-media.h         |   4 +-
 drivers/staging/media/imx/imx6-mipi-csi2.c    |   2 +-
 .../media/sunxi/sun6i-isp/sun6i_isp_proc.c    |  10 +-
 include/media/v4l2-subdev.h                   |   7 +-
 87 files changed, 614 insertions(+), 420 deletions(-)

Comments

Shuah Khan Nov. 15, 2023, 3:37 p.m. UTC | #1
On 11/14/23 06:15, Laurent Pinchart wrote:
> Hello,
> 
> This patch series addresses a historical issue in the V4L2 subdev
> in-kernel API.
> 
> The subdev .init_cfg() pad operation used to initialize a
> v4l2_subdev_pad_config structure. This was changed to initializing a
> v4l2_subdev_state a while ago, but the operation wasn't renamed, and
> stayed a pad operation. Not only is the name confusing for new
> developers, it is also the only pad operation that doesn't operate on a
> pad, leading to more confusion.
> 
> This series addresses those two issues by renaming the operation to
> .init_cfg() and moving it to the subdev internal operations, in patch
> 2/2. Most of the preparatory patches from v1 have been applied by Sakari
> already, leaving only 1/2 for a respin due to issues with the
> first version.
> 
> The series is based on a merge oof Sakari's latest pull request for v6.8
> ([1]) and a v6.7 fix for the VSP1 driver ([2]).
> 
> [1] https://lore.kernel.org/linux-media/ZVEyCfzm4ninES6K@valkosipuli.retiisi.eu
> [2] https://lore.kernel.org/linux-media/20231113020054.GA18039@pendragon.ideasonboard.com
> 
> The VSP1 driver has been tested on a Renesas R-Car M3-N Salvator-XS. The
> rest of the series is compile-tested only.
> 
> Laurent Pinchart (2):
>    media: renesas: vsp1: Fix references to pad config
>    media: v4l2-subdev: Rename .init_cfg() operation to .init_state()
> 
>
>   .../media/test-drivers/vimc/vimc-debayer.c    |  11 +-
>   drivers/media/test-drivers/vimc/vimc-scaler.c |  11 +-
>   drivers/media/test-drivers/vimc/vimc-sensor.c |  11 +-

For vimc:

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah