From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
Hans Verkuil <hans.verkuil@cisco.com>,
"Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [PATCH 5/7] v4l2-subdev: add support for the new enum_frame_size 'which' field.
Date: Mon, 23 Feb 2015 18:44:39 +0200 [thread overview]
Message-ID: <1477074.hT2BHRMHFc@avalon> (raw)
In-Reply-To: <1423827006-32878-6-git-send-email-hverkuil@xs4all.nl>
Hi Hans,
Thank you for the patch.
On Friday 13 February 2015 12:30:04 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> Support the new 'which' field in the enum_frame_size ops. Most drivers do
> not need to be changed since they always returns the same enumeration
> regardless of the 'which' field.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
For everything except s5c73m3,
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Please see below for a small note.
> ---
> drivers/media/i2c/s5c73m3/s5c73m3-core.c | 23 +++++++++++++++----
> drivers/media/platform/omap3isp/ispccdc.c | 4 ++--
> drivers/media/platform/omap3isp/ispccp2.c | 4 ++--
> drivers/media/platform/omap3isp/ispcsi2.c | 4 ++--
> drivers/media/platform/omap3isp/isppreview.c | 4 ++--
> drivers/media/platform/omap3isp/ispresizer.c | 4 ++--
> drivers/media/platform/vsp1/vsp1_hsit.c | 4 +++-
> drivers/media/platform/vsp1/vsp1_lif.c | 4 +++-
> drivers/media/platform/vsp1/vsp1_lut.c | 4 +++-
> drivers/media/platform/vsp1/vsp1_rwpf.c | 3 ++-
> drivers/media/platform/vsp1/vsp1_sru.c | 4 +++-
> drivers/media/platform/vsp1/vsp1_uds.c | 4 +++-
> drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 6 ++----
> drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 6 ++----
> drivers/staging/media/davinci_vpfe/dm365_isif.c | 4 ++--
> drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 ++----
> drivers/staging/media/omap4iss/iss_csi2.c | 4 ++--
> drivers/staging/media/omap4iss/iss_ipipe.c | 4 ++--
> drivers/staging/media/omap4iss/iss_ipipeif.c | 6 ++----
> drivers/staging/media/omap4iss/iss_resizer.c | 6 ++----
> 20 files changed, 62 insertions(+), 46 deletions(-)
[snip]
> diff --git a/drivers/media/platform/vsp1/vsp1_hsit.c
> b/drivers/media/platform/vsp1/vsp1_hsit.c index d226b3f..8ffb817 100644
> --- a/drivers/media/platform/vsp1/vsp1_hsit.c
> +++ b/drivers/media/platform/vsp1/vsp1_hsit.c
> @@ -76,9 +76,11 @@ static int hsit_enum_frame_size(struct v4l2_subdev
> *subdev, struct v4l2_subdev_pad_config *cfg,
> struct v4l2_subdev_frame_size_enum *fse)
> {
> + struct vsp1_hsit *hsit = to_hsit(subdev);
> struct v4l2_mbus_framefmt *format;
>
> - format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad);
> + format = vsp1_entity_get_pad_format(&hsit->entity, cfg, fse->pad,
> + fse->which);
You could also have used to_vsp1_entity(subdev) to cast to an entity pointer
directly, but both are fine with me. Same comment for the rest of the driver.
>
> if (fse->index || fse->code != format->code)
> return -EINVAL;
> diff --git a/drivers/media/platform/vsp1/vsp1_lif.c
> b/drivers/media/platform/vsp1/vsp1_lif.c index 60f1bd8..39fa5ef 100644
> --- a/drivers/media/platform/vsp1/vsp1_lif.c
> +++ b/drivers/media/platform/vsp1/vsp1_lif.c
> @@ -109,9 +109,11 @@ static int lif_enum_frame_size(struct v4l2_subdev
> *subdev, struct v4l2_subdev_pad_config *cfg,
> struct v4l2_subdev_frame_size_enum *fse)
> {
> + struct vsp1_lif *lif = to_lif(subdev);
> struct v4l2_mbus_framefmt *format;
>
> - format = v4l2_subdev_get_try_format(subdev, cfg, LIF_PAD_SINK);
> + format = vsp1_entity_get_pad_format(&lif->entity, cfg, LIF_PAD_SINK,
> + fse->which);
>
> if (fse->index || fse->code != format->code)
> return -EINVAL;
> diff --git a/drivers/media/platform/vsp1/vsp1_lut.c
> b/drivers/media/platform/vsp1/vsp1_lut.c index 8aa8c11..656ec27 100644
> --- a/drivers/media/platform/vsp1/vsp1_lut.c
> +++ b/drivers/media/platform/vsp1/vsp1_lut.c
> @@ -117,9 +117,11 @@ static int lut_enum_frame_size(struct v4l2_subdev
> *subdev, struct v4l2_subdev_pad_config *cfg,
> struct v4l2_subdev_frame_size_enum *fse)
> {
> + struct vsp1_lut *lut = to_lut(subdev);
> struct v4l2_mbus_framefmt *format;
>
> - format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad);
> + format = vsp1_entity_get_pad_format(&lut->entity, cfg,
> + fse->pad, fse->which);
>
> if (fse->index || fse->code != format->code)
> return -EINVAL;
> diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.c
> b/drivers/media/platform/vsp1/vsp1_rwpf.c index a083d85..fa71f46 100644
> --- a/drivers/media/platform/vsp1/vsp1_rwpf.c
> +++ b/drivers/media/platform/vsp1/vsp1_rwpf.c
> @@ -48,7 +48,8 @@ int vsp1_rwpf_enum_frame_size(struct v4l2_subdev *subdev,
> struct vsp1_rwpf *rwpf = to_rwpf(subdev);
> struct v4l2_mbus_framefmt *format;
>
> - format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad);
> + format = vsp1_entity_get_pad_format(&rwpf->entity, cfg, fse->pad,
> + fse->which);
>
> if (fse->index || fse->code != format->code)
> return -EINVAL;
> diff --git a/drivers/media/platform/vsp1/vsp1_sru.c
> b/drivers/media/platform/vsp1/vsp1_sru.c index 554340d..6310aca 100644
> --- a/drivers/media/platform/vsp1/vsp1_sru.c
> +++ b/drivers/media/platform/vsp1/vsp1_sru.c
> @@ -200,9 +200,11 @@ static int sru_enum_frame_size(struct v4l2_subdev
> *subdev, struct v4l2_subdev_pad_config *cfg,
> struct v4l2_subdev_frame_size_enum *fse)
> {
> + struct vsp1_sru *sru = to_sru(subdev);
> struct v4l2_mbus_framefmt *format;
>
> - format = v4l2_subdev_get_try_format(subdev, cfg, SRU_PAD_SINK);
> + format = vsp1_entity_get_pad_format(&sru->entity, cfg,
> + SRU_PAD_SINK, fse->which);
>
> if (fse->index || fse->code != format->code)
> return -EINVAL;
> diff --git a/drivers/media/platform/vsp1/vsp1_uds.c
> b/drivers/media/platform/vsp1/vsp1_uds.c index ef4d307..ccc8243 100644
> --- a/drivers/media/platform/vsp1/vsp1_uds.c
> +++ b/drivers/media/platform/vsp1/vsp1_uds.c
> @@ -204,9 +204,11 @@ static int uds_enum_frame_size(struct v4l2_subdev
> *subdev, struct v4l2_subdev_pad_config *cfg,
> struct v4l2_subdev_frame_size_enum *fse)
> {
> + struct vsp1_uds *uds = to_uds(subdev);
> struct v4l2_mbus_framefmt *format;
>
> - format = v4l2_subdev_get_try_format(subdev, cfg, UDS_PAD_SINK);
> + format = vsp1_entity_get_pad_format(&uds->entity, cfg,
> + UDS_PAD_SINK, fse->which);
>
> if (fse->index || fse->code != format->code)
> return -EINVAL;
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-02-23 16:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 11:29 v4l2-subdev: removal of duplicate video enum ops Hans Verkuil
2015-02-13 11:30 ` [PATCH 1/7] v4l2-subdev: replace v4l2_subdev_fh by v4l2_subdev_pad_config Hans Verkuil
2015-02-22 20:03 ` Lad, Prabhakar
2015-02-23 16:28 ` Laurent Pinchart
2015-03-02 9:40 ` Sakari Ailus
2015-02-13 11:30 ` [PATCH 2/7] v4l2-subdev.h: add 'which' field for the enum structs Hans Verkuil
2015-02-23 16:38 ` Laurent Pinchart
2015-02-13 11:30 ` [PATCH 3/7] v4l2-subdev.c: add 'which' checks for enum ops Hans Verkuil
2015-02-23 16:38 ` Laurent Pinchart
2015-02-13 11:30 ` [PATCH 4/7] v4l2-subdev: support new 'which' field in enum_mbus_code Hans Verkuil
2015-02-23 16:40 ` Laurent Pinchart
2015-02-13 11:30 ` [PATCH 5/7] v4l2-subdev: add support for the new enum_frame_size 'which' field Hans Verkuil
2015-02-23 16:44 ` Laurent Pinchart [this message]
2015-02-13 11:30 ` [PATCH 6/7] v4l2-subdev: remove enum_framesizes/intervals Hans Verkuil
2015-02-24 8:08 ` Hans Verkuil
2015-02-24 9:30 ` Laurent Pinchart
2015-03-04 8:47 ` Hans Verkuil
2015-03-04 14:31 ` Jonathan Corbet
2015-02-13 11:30 ` [PATCH 7/7] DocBook media: document the new 'which' field Hans Verkuil
2015-02-23 16:46 ` Laurent Pinchart
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=1477074.hT2BHRMHFc@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=s.nawrocki@samsung.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.