All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: mchehab@redhat.com, linux-media@vger.kernel.org,
	linux-sh@vger.kernel.org, matsu@igel.co.jp,
	vladimir.barinov@cogentembedded.com
Subject: Re: [PATCH 1/5] V4L2: I2C: ML86V7667 video decoder driver
Date: Sat, 20 Apr 2013 21:05:40 +0000	[thread overview]
Message-ID: <51730324.8090403@gmail.com> (raw)
In-Reply-To: <201304210016.33720.sergei.shtylyov@cogentembedded.com>

Hi,

On 04/20/2013 10:16 PM, Sergei Shtylyov wrote:
> From: Vladimir Barinov<vladimir.barinov@cogentembedded.com>
>
> Add OKI Semiconductor ML86V7667 video decoder driver.
>
> Signed-off-by: Vladimir Barinov<vladimir.barinov@cogentembedded.com>
> [Sergei: added v4l2_device_unregister_subdev() call to the error cleanup path of
> ml86v7667_probe(); some cleanup.]
> Signed-off-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>
> ---
>   drivers/media/i2c/Kconfig     |    9
>   drivers/media/i2c/Makefile    |    1
>   drivers/media/i2c/ml86v7667.c |  504 ++++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 514 insertions(+)

> +static int ml86v7667_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
> +{
> +	struct ml86v7667_priv *priv = to_ml86v7667(sd);
> +
> +	ml86v7667_querystd(sd,&priv->std);
> +
> +	a->bounds.left = 0;
> +	a->bounds.top = 0;
> +	a->bounds.width = 720;
> +	a->bounds.height = priv->std&  V4L2_STD_525_60 ? 480 : 576;
> +	a->defrect = a->bounds;
> +	a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> +	a->pixelaspect.numerator = 1;
> +	a->pixelaspect.denominator = 1;
> +
> +	return 0;
> +}

> +static struct v4l2_subdev_video_ops ml86v7667_subdev_video_ops = {
> +	.querystd = ml86v7667_querystd,
> +	.g_input_status = ml86v7667_g_input_status,
> +	.enum_mbus_fmt = ml86v7667_enum_mbus_fmt,
> +	.try_mbus_fmt = ml86v7667_try_mbus_fmt,
> +	.g_mbus_fmt = ml86v7667_g_mbus_fmt,
> +	.s_mbus_fmt = ml86v7667_s_mbus_fmt,
> +	.cropcap = ml86v7667_cropcap,
> +	.g_mbus_config = ml86v7667_g_mbus_config,
> +};

Why do you need .cropcap when there is no s_crop/g_crop ops ? Is it
only for pixel aspect ratio ?

Also, new drivers are supposed to use the selections API instead
(set/get_selection ops). However this requires pad level ops support
in your host driver, hence might be a bigger issue.

Regards,
Sylwester

WARNING: multiple messages have this Message-ID (diff)
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: mchehab@redhat.com, linux-media@vger.kernel.org,
	linux-sh@vger.kernel.org, matsu@igel.co.jp,
	vladimir.barinov@cogentembedded.com
Subject: Re: [PATCH 1/5] V4L2: I2C: ML86V7667 video decoder driver
Date: Sat, 20 Apr 2013 23:05:40 +0200	[thread overview]
Message-ID: <51730324.8090403@gmail.com> (raw)
In-Reply-To: <201304210016.33720.sergei.shtylyov@cogentembedded.com>

Hi,

On 04/20/2013 10:16 PM, Sergei Shtylyov wrote:
> From: Vladimir Barinov<vladimir.barinov@cogentembedded.com>
>
> Add OKI Semiconductor ML86V7667 video decoder driver.
>
> Signed-off-by: Vladimir Barinov<vladimir.barinov@cogentembedded.com>
> [Sergei: added v4l2_device_unregister_subdev() call to the error cleanup path of
> ml86v7667_probe(); some cleanup.]
> Signed-off-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>
> ---
>   drivers/media/i2c/Kconfig     |    9
>   drivers/media/i2c/Makefile    |    1
>   drivers/media/i2c/ml86v7667.c |  504 ++++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 514 insertions(+)

> +static int ml86v7667_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
> +{
> +	struct ml86v7667_priv *priv = to_ml86v7667(sd);
> +
> +	ml86v7667_querystd(sd,&priv->std);
> +
> +	a->bounds.left = 0;
> +	a->bounds.top = 0;
> +	a->bounds.width = 720;
> +	a->bounds.height = priv->std&  V4L2_STD_525_60 ? 480 : 576;
> +	a->defrect = a->bounds;
> +	a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> +	a->pixelaspect.numerator = 1;
> +	a->pixelaspect.denominator = 1;
> +
> +	return 0;
> +}

> +static struct v4l2_subdev_video_ops ml86v7667_subdev_video_ops = {
> +	.querystd = ml86v7667_querystd,
> +	.g_input_status = ml86v7667_g_input_status,
> +	.enum_mbus_fmt = ml86v7667_enum_mbus_fmt,
> +	.try_mbus_fmt = ml86v7667_try_mbus_fmt,
> +	.g_mbus_fmt = ml86v7667_g_mbus_fmt,
> +	.s_mbus_fmt = ml86v7667_s_mbus_fmt,
> +	.cropcap = ml86v7667_cropcap,
> +	.g_mbus_config = ml86v7667_g_mbus_config,
> +};

Why do you need .cropcap when there is no s_crop/g_crop ops ? Is it
only for pixel aspect ratio ?

Also, new drivers are supposed to use the selections API instead
(set/get_selection ops). However this requires pad level ops support
in your host driver, hence might be a bigger issue.

Regards,
Sylwester

  reply	other threads:[~2013-04-20 21:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20 20:13 [PATCH 0/5] OKI ML86V7667 driver and R8A7778/BOCK-W VIN support Sergei Shtylyov
2013-04-20 20:13 ` Sergei Shtylyov
2013-04-20 20:13 ` Sergei Shtylyov
2013-04-20 20:16 ` [PATCH 1/5] V4L2: I2C: ML86V7667 video decoder driver Sergei Shtylyov
2013-04-20 20:16   ` Sergei Shtylyov
2013-04-20 21:05   ` Sylwester Nawrocki [this message]
2013-04-20 21:05     ` Sylwester Nawrocki
2013-04-21 10:23     ` Vladimir Barinov
2013-04-21 10:23       ` Vladimir Barinov
2013-04-20 21:50   ` Hans Verkuil
2013-04-20 21:50     ` Hans Verkuil
2013-04-20 21:59   ` Sergei Shtylyov
2013-04-20 21:59     ` Sergei Shtylyov
2013-04-20 20:28 ` [PATCH 3/5] ARM: shmobile: r8a7778: add VIN support Sergei Shtylyov
2013-04-20 20:28   ` Sergei Shtylyov
2013-04-20 20:28   ` Sergei Shtylyov
2013-04-20 20:36 ` [PATCH 4/5] ARM: shmobile: BOCK-W: add VIN and ML86V7667 support Sergei Shtylyov
2013-04-20 20:36   ` Sergei Shtylyov
2013-04-20 20:36   ` Sergei Shtylyov
2013-04-20 20:38 ` [PATCH 5/5] ARM: shmobile: BOCK-W: enable VIN and ML86V7667 in defconfig Sergei Shtylyov
2013-04-20 20:38   ` Sergei Shtylyov
2013-04-20 20:38   ` Sergei Shtylyov
2013-04-20 20:43 ` [PATCH 0/5] OKI ML86V7667 driver and R8A7778/BOCK-W VIN support Sergei Shtylyov
2013-04-20 20:43   ` Sergei Shtylyov
2013-04-20 20:43   ` Sergei Shtylyov
2013-04-22  4:21 ` Simon Horman
2013-04-22  4:21   ` Simon Horman
2013-04-22  4:21   ` Simon Horman

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=51730324.8090403@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=matsu@igel.co.jp \
    --cc=mchehab@redhat.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=vladimir.barinov@cogentembedded.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.