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>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Prabhakar Lad <prabhakar.csengg@gmail.com>,
Kamil Debski <k.debski@samsung.com>,
Javier Martin <javier.martin@vista-silicon.com>
Subject: Re: [PATCH 2/7] v4l2: replace video op g_mbus_fmt by pad op get_fmt
Date: Mon, 15 Jun 2015 01:08:09 +0300 [thread overview]
Message-ID: <1988961.x4zUjgPhSL@avalon> (raw)
In-Reply-To: <1428574888-46407-3-git-send-email-hverkuil@xs4all.nl>
Hi Hans,
(CC'ing Javier Martin)
On Thursday 09 April 2015 12:21:23 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses
> by the get_fmt pad op and remove the video op.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
> Cc: Kamil Debski <k.debski@samsung.com>
[snip]
> diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
> index f2f87b7..e4fa074 100644
> --- a/drivers/media/i2c/tvp5150.c
> +++ b/drivers/media/i2c/tvp5150.c
> @@ -828,14 +828,18 @@ static int tvp5150_enum_mbus_code(struct v4l2_subdev
> *sd, return 0;
> }
>
> -static int tvp5150_mbus_fmt(struct v4l2_subdev *sd,
> - struct v4l2_mbus_framefmt *f)
> +static int tvp5150_fill_fmt(struct v4l2_subdev *sd,
> + struct v4l2_subdev_pad_config *cfg,
> + struct v4l2_subdev_format *format)
> {
> + struct v4l2_mbus_framefmt *f;
> struct tvp5150 *decoder = to_tvp5150(sd);
>
> - if (f == NULL)
> + if (!format || format->pad)
> return -EINVAL;
>
> + f = &format->format;
> +
> tvp5150_reset(sd, 0);
This resets the device every time a get or set format is issued, even for TRY
formats. I don't think that's right.
Do you have any idea why this is needed ? The code was introduced in commit
ec2c4f3f93cb ("[media] media: tvp5150: Add mbus_fmt callbacks"), with Javier
listed as the author but Mauro being the only SoB.
> f->width = decoder->rect.width;
> @@ -1069,9 +1073,6 @@ static const struct v4l2_subdev_tuner_ops
> tvp5150_tuner_ops = { static const struct v4l2_subdev_video_ops
> tvp5150_video_ops = {
> .s_std = tvp5150_s_std,
> .s_routing = tvp5150_s_routing,
> - .s_mbus_fmt = tvp5150_mbus_fmt,
> - .try_mbus_fmt = tvp5150_mbus_fmt,
> - .g_mbus_fmt = tvp5150_mbus_fmt,
> .s_crop = tvp5150_s_crop,
> .g_crop = tvp5150_g_crop,
> .cropcap = tvp5150_cropcap,
> @@ -1086,6 +1087,8 @@ static const struct v4l2_subdev_vbi_ops
> tvp5150_vbi_ops = {
>
> static const struct v4l2_subdev_pad_ops tvp5150_pad_ops = {
> .enum_mbus_code = tvp5150_enum_mbus_code,
> + .set_fmt = tvp5150_fill_fmt,
> + .get_fmt = tvp5150_fill_fmt,
> };
>
> static const struct v4l2_subdev_ops tvp5150_ops = {
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-06-14 22:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 10:21 [PATCH 0/7] v4l2: convert video ops to pad ops Hans Verkuil
2015-04-09 10:21 ` [PATCH 1/7] v4l2: replace enum_mbus_fmt by enum_mbus_code Hans Verkuil
2015-04-15 20:08 ` Guennadi Liakhovetski
2015-04-17 8:15 ` Hans Verkuil
2015-04-16 10:08 ` Scott Jiang
2015-04-16 20:44 ` Lad, Prabhakar
2015-04-09 10:21 ` [PATCH 2/7] v4l2: replace video op g_mbus_fmt by pad op get_fmt Hans Verkuil
2015-04-15 20:30 ` Guennadi Liakhovetski
2015-04-16 20:50 ` Lad, Prabhakar
2015-06-14 22:08 ` Laurent Pinchart [this message]
2015-06-15 10:25 ` Hans Verkuil
2015-06-16 15:53 ` Laurent Pinchart
2015-04-09 10:21 ` [PATCH 3/7] v4l2: replace try_mbus_fmt by set_fmt Hans Verkuil
2015-05-02 17:57 ` Guennadi Liakhovetski
2015-04-09 10:21 ` [PATCH 4/7] v4l2: replace s_mbus_fmt " Hans Verkuil
2015-04-09 10:21 ` [PATCH 5/7] v4l2: replace try_mbus_fmt by set_fmt in bridge drivers Hans Verkuil
2015-04-16 9:50 ` Scott Jiang
2015-04-09 10:21 ` [PATCH 6/7] v4l2: replace s_mbus_fmt " Hans Verkuil
2015-04-16 9:48 ` Scott Jiang
2015-04-16 20:54 ` Lad, Prabhakar
2015-04-09 10:21 ` [PATCH 7/7] v4l2: remove g/s_crop and cropcap from video ops Hans Verkuil
2015-04-12 13:03 ` 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=1988961.x4zUjgPhSL@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=g.liakhovetski@gmx.de \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=javier.martin@vista-silicon.com \
--cc=k.debski@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=prabhakar.csengg@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox