All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Daniel Scally <dan.scally@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Andy Shevchenko <andy@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Kate Hsuan <hpa@redhat.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH 26/28] media: ov2680: Add g_skip_frames op support
Date: Wed, 7 Jun 2023 20:04:55 +0300	[thread overview]
Message-ID: <20230607170455.GA5058@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230607164712.63579-27-hdegoede@redhat.com>

Hi Hans,

Thank you for the patch.

On Wed, Jun 07, 2023 at 06:47:10PM +0200, Hans de Goede wrote:
> Add support for v4l2_subdev_sensor_ops.g_skip_frames.

The .g_skip_frames() subdev operation was a mistake in hindsight, and
should probably not be used in new drivers (or existing drivers that
don't use it yet). Why do you need it ?

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/media/i2c/ov2680.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c
> index 867df602ee53..9e4f0bcbe979 100644
> --- a/drivers/media/i2c/ov2680.c
> +++ b/drivers/media/i2c/ov2680.c
> @@ -62,6 +62,8 @@
>  
>  #define OV2680_FRAME_RATE			30
>  
> +#define OV2680_SKIP_FRAMES			3
> +
>  #define OV2680_NATIVE_WIDTH			1616
>  #define OV2680_NATIVE_HEIGHT			1216
>  #define OV2680_NATIVE_START_LEFT		0
> @@ -759,6 +761,12 @@ static int ov2680_enum_frame_interval(struct v4l2_subdev *sd,
>  	return 0;
>  }
>  
> +static int ov2680_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
> +{
> +	*frames = OV2680_SKIP_FRAMES;
> +	return 0;
> +}
> +
>  static int ov2680_s_ctrl(struct v4l2_ctrl *ctrl)
>  {
>  	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
> @@ -806,6 +814,10 @@ static const struct v4l2_subdev_video_ops ov2680_video_ops = {
>  	.s_stream		= ov2680_s_stream,
>  };
>  
> +static const struct v4l2_subdev_sensor_ops ov2680_sensor_ops = {
> +	.g_skip_frames	= ov2680_g_skip_frames,
> +};
> +
>  static const struct v4l2_subdev_pad_ops ov2680_pad_ops = {
>  	.init_cfg		= ov2680_init_cfg,
>  	.enum_mbus_code		= ov2680_enum_mbus_code,
> @@ -820,6 +832,7 @@ static const struct v4l2_subdev_pad_ops ov2680_pad_ops = {
>  static const struct v4l2_subdev_ops ov2680_subdev_ops = {
>  	.video	= &ov2680_video_ops,
>  	.pad	= &ov2680_pad_ops,
> +	.sensor = &ov2680_sensor_ops,
>  };
>  
>  static int ov2680_mode_init(struct ov2680_dev *sensor)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-06-07 17:05 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 16:46 [PATCH 00/28] media: ov2680: Bugfixes + ACPI + selection(crop-tgt) API support Hans de Goede
2023-06-07 16:46 ` [PATCH 01/28] media: ov2680: Remove auto-gain and auto-exposure controls Hans de Goede
2023-06-08 12:41   ` Sakari Ailus
2023-06-12  6:53   ` Dan Scally
2023-06-12  7:44     ` Hans de Goede
2023-06-12  7:59       ` Dan Scally
2023-06-12  9:57         ` Andy Shevchenko
2023-06-12 11:30           ` Dan Scally
2023-06-07 16:46 ` [PATCH 02/28] media: ov2680: Fix ov2680_bayer_order() Hans de Goede
2023-06-12  7:22   ` Dan Scally
2023-06-07 16:46 ` [PATCH 03/28] media: ov2680: Fix vflip / hflip set functions Hans de Goede
2023-06-12  7:32   ` Dan Scally
2023-06-12  8:06     ` Hans de Goede
2023-06-12  9:00       ` Laurent Pinchart
2023-06-07 16:46 ` [PATCH 04/28] media: ov2680: Use select VIDEO_V4L2_SUBDEV_API Hans de Goede
2023-06-12  8:20   ` Dan Scally
2023-06-12  8:57     ` Hans de Goede
2023-06-07 16:46 ` [PATCH 05/28] media: ov2680: Don't take the lock for try_fmt calls Hans de Goede
2023-06-08 12:44   ` Sakari Ailus
2023-06-08 12:48     ` Laurent Pinchart
2023-06-08 13:15       ` Sakari Ailus
2023-06-08 13:17       ` Hans de Goede
2023-06-07 16:46 ` [PATCH 06/28] media: ov2680: Add ov2680_fill_format() helper function Hans de Goede
2023-06-07 16:46 ` [PATCH 07/28] media: ov2680: Fix ov2680_set_fmt() which == V4L2_SUBDEV_FORMAT_TRY not working Hans de Goede
2023-06-07 16:46 ` [PATCH 08/28] media: Add MIPI CCI register access helper functions Hans de Goede
2023-06-07 20:22   ` Andy Shevchenko
2023-06-07 20:23     ` Andy Shevchenko
2023-06-07 16:46 ` [PATCH 09/28] media: ov2680: Convert to new CCI register access helpers Hans de Goede
2023-06-07 16:46 ` [PATCH 10/28] media: ov2680: Store dev instead of i2c_client in ov2680_dev Hans de Goede
2023-06-07 20:43   ` Andy Shevchenko
2023-06-07 16:46 ` [PATCH 11/28] media: ov2680: Check for "powerdown" GPIO con-id before checking for "reset" GPIO con-id Hans de Goede
2023-06-07 16:46 ` [PATCH 12/28] media: ov2680: Add runtime-pm support Hans de Goede
2023-06-07 16:46 ` [PATCH 13/28] media: ov2680: Drop is_enabled flag Hans de Goede
2023-06-07 16:46 ` [PATCH 14/28] media: ov2680: Add support for more clk setups Hans de Goede
2023-06-07 20:51   ` Andy Shevchenko
2023-06-07 16:46 ` [PATCH 15/28] media: ov2680: Add support for 19.2 MHz clock Hans de Goede
2023-06-07 20:53   ` Andy Shevchenko
2023-06-07 16:47 ` [PATCH 16/28] media: ov2680: Add endpoint matching support Hans de Goede
2023-06-07 16:47 ` [PATCH 17/28] media: ov2680: Add support for ACPI enumeration Hans de Goede
2023-06-07 20:57   ` Andy Shevchenko
2023-06-07 16:47 ` [PATCH 18/28] media: ov2680: Fix ov2680_enum_frame_interval() Hans de Goede
2023-06-07 16:47 ` [PATCH 19/28] media: ov2680: Annotate the per mode register setting lists Hans de Goede
2023-06-07 16:47 ` [PATCH 20/28] media: ov2680: Add ov2680_mode struct Hans de Goede
2023-06-07 16:47 ` [PATCH 21/28] media: ov2680: Make setting the mode algorithm based Hans de Goede
2023-06-07 16:47 ` [PATCH 22/28] media: ov2680: Add an __ov2680_get_pad_format() helper function Hans de Goede
2023-06-07 16:47 ` [PATCH 23/28] media: ov2680: Implement selection support Hans de Goede
2023-06-07 21:01   ` Andy Shevchenko
2023-06-07 21:04   ` Andy Shevchenko
2023-06-07 16:47 ` [PATCH 24/28] media: ov2680: Fix exposure and gain ctrls range and default value Hans de Goede
2023-06-07 16:47 ` [PATCH 25/28] media: ov2680: Add a bunch of register tweaks Hans de Goede
2023-06-07 16:47 ` [PATCH 26/28] media: ov2680: Add g_skip_frames op support Hans de Goede
2023-06-07 17:04   ` Laurent Pinchart [this message]
2023-06-07 17:49     ` Hans de Goede
2023-06-07 16:47 ` [PATCH 27/28] media: ov2680: Drop unnecessary pad checks Hans de Goede
2023-06-07 16:47 ` [PATCH 28/28] media: ov2680: Read and log sensor revision during probe Hans de Goede
2023-06-09  9:37 ` [PATCH 00/28] media: ov2680: Bugfixes + ACPI + selection(crop-tgt) API support Sakari Ailus
2023-06-09 14:28   ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607170455.GA5058@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=andy@kernel.org \
    --cc=dan.scally@ideasonboard.com \
    --cc=hdegoede@redhat.com \
    --cc=hpa@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.