linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Cc: linux-media@vger.kernel.org, linux-sh@vger.kernel.org,
	magnus.damm@gmail.com, hans.verkuil@cisco.com,
	ian.molton@codethink.co.uk, lars@metafoo.de,
	william.towle@codethink.co.uk
Subject: Re: [PATCH v2 1/2] media: adv7604: implement get_selection
Date: Thu, 24 Dec 2015 11:42:40 +0000	[thread overview]
Message-ID: <2927121.d0aWWCy6Wl@avalon> (raw)
In-Reply-To: <1450794122-31293-2-git-send-email-ulrich.hecht+renesas@gmail.com>

Hi Ulrich,

Thank you for the patch.

On Tuesday 22 December 2015 15:22:01 Ulrich Hecht wrote:
> The rcar_vin driver relies on this.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
>  drivers/media/i2c/adv7604.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index be5980c..8ad5c28 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -1885,6 +1885,26 @@ static int adv76xx_get_format(struct v4l2_subdev *sd,
> return 0;
>  }
> 
> +static int adv76xx_get_selection(struct v4l2_subdev *sd,
> +				 struct v4l2_subdev_pad_config *cfg,
> +				 struct v4l2_subdev_selection *sel)
> +{
> +	struct adv76xx_state *state = to_state(sd);
> +
> +	if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE)
> +		return -EINVAL;
> +	/* Only CROP, CROP_DEFAULT and CROP_BOUNDS are supported */
> +	if (sel->target > V4L2_SEL_TGT_CROP_BOUNDS)
> +		return -EINVAL;
> +
> +	sel->r.left	= 0;
> +	sel->r.top	= 0;
> +	sel->r.width	= state->timings.bt.width;
> +	sel->r.height	= state->timings.bt.height;

This probably requires locking, but as the driver lacks locking support 
completely I can't blame you.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +	return 0;
> +}
> +
>  static int adv76xx_set_format(struct v4l2_subdev *sd,
>  			      struct v4l2_subdev_pad_config *cfg,
>  			      struct v4l2_subdev_format *format)
> @@ -2415,6 +2435,7 @@ static const struct v4l2_subdev_video_ops
> adv76xx_video_ops = {
> 
>  static const struct v4l2_subdev_pad_ops adv76xx_pad_ops = {
>  	.enum_mbus_code = adv76xx_enum_mbus_code,
> +	.get_selection = adv76xx_get_selection,
>  	.get_fmt = adv76xx_get_format,
>  	.set_fmt = adv76xx_set_format,
>  	.get_edid = adv76xx_get_edid,

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2015-12-24 11:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 14:22 [PATCH v2 0/2] adv7604: .get_selection support Ulrich Hecht
2015-12-22 14:22 ` [PATCH v2 1/2] media: adv7604: implement get_selection Ulrich Hecht
2015-12-24 11:42   ` Laurent Pinchart [this message]
2015-12-22 14:22 ` [PATCH v2 2/2] media: adv7604: update timings on change of input signal Ulrich Hecht
2015-12-24 11:47   ` Laurent Pinchart
2015-12-24 12:59     ` hverkuil
2016-01-11 10:22   ` Hans Verkuil
2016-01-11 17:04     ` Ulrich Hecht

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=2927121.d0aWWCy6Wl@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hans.verkuil@cisco.com \
    --cc=ian.molton@codethink.co.uk \
    --cc=lars@metafoo.de \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=ulrich.hecht+renesas@gmail.com \
    --cc=william.towle@codethink.co.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).