All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	slongerbeam@gmail.com
Cc: lars@metafoo.de, mchehab@kernel.org, hans.verkuil@cisco.com
Subject: Re: [PATCHv2 1/7] media: rcar-vin: make V4L2_FIELD_INTERLACED standard dependent
Date: Wed, 3 Aug 2016 16:58:50 +0300	[thread overview]
Message-ID: <c1fc233e-6ab6-7338-adab-5a32bc1f8e16@cogentembedded.com> (raw)
In-Reply-To: <20160802145107.24829-2-niklas.soderlund+renesas@ragnatech.se>

On 08/02/2016 05:51 PM, Niklas Söderlund wrote:

> The field V4L2_FIELD_INTERLACED is standard dependent and should not
> unconditionally be equivalent to V4L2_FIELD_INTERLACED_TB.
>
> This patch adds a check to see if the video standard can be obtained and
> if it's a 60 Hz format. If the condition is meet V4L2_FIELD_INTERLACED

    s/meet/met/.

> is treated as V4L2_FIELD_INTERLACED_BT if not as
> V4L2_FIELD_INTERLACED_TB.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  drivers/media/platform/rcar-vin/rcar-dma.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c
> index 496aa97..4063775 100644
> --- a/drivers/media/platform/rcar-vin/rcar-dma.c
> +++ b/drivers/media/platform/rcar-vin/rcar-dma.c
> @@ -131,6 +131,7 @@ static u32 rvin_read(struct rvin_dev *vin, u32 offset)
>  static int rvin_setup(struct rvin_dev *vin)
>  {
>  	u32 vnmc, dmr, dmr2, interrupts;
> +	v4l2_std_id std;
>  	bool progressive = false, output_is_yuv = false, input_is_yuv = false;
>
>  	switch (vin->format.field) {
> @@ -141,6 +142,13 @@ static int rvin_setup(struct rvin_dev *vin)
>  		vnmc = VNMC_IM_EVEN;
>  		break;
>  	case V4L2_FIELD_INTERLACED:
> +		/* Default to TB */
> +		vnmc = VNMC_IM_FULL;
> +		/* Use BT if video standard can be read and is 60 Hz format */
> +		if (!v4l2_subdev_call(vin_to_source(vin), video, g_std, &std))
> +			if (std & V4L2_STD_525_60)
> +				vnmc = VNMC_IM_FULL | VNMC_FOC;

    I think you either need to fold 2 *if* statements, or add {} in the 1st one.

[...]

MBR, Sergei


  reply	other threads:[~2016-08-03 14:22 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 14:51 [PATCHv2 0/7] Fix adv7180 and rcar-vin field handling Niklas Söderlund
2016-08-02 14:51 ` [PATCHv2 1/7] media: rcar-vin: make V4L2_FIELD_INTERLACED standard dependent Niklas Söderlund
2016-08-03 13:58   ` Sergei Shtylyov [this message]
2016-08-02 14:51 ` [PATCHv2 2/7] media: rcar-vin: allow field to be changed Niklas Söderlund
2016-08-02 14:51 ` [PATCHv2 3/7] media: rcar-vin: fix bug in scaling Niklas Söderlund
2016-08-02 14:51 ` [PATCHv2 4/7] media: rcar-vin: fix height for TOP and BOTTOM fields Niklas Söderlund
2016-08-03 16:54   ` Sergei Shtylyov
2016-08-02 14:51 ` [PATCHv2 5/7] media: rcar-vin: add support for V4L2_FIELD_ALTERNATE Niklas Söderlund
2016-08-03 13:22   ` Sergei Shtylyov
2016-08-03 13:36     ` Niklas Söderlund
2016-08-03 13:36       ` Niklas Söderlund
2016-08-02 14:51 ` [PATCHv2 6/7] media: adv7180: fill in mbus format in set_fmt Niklas Söderlund
2016-08-02 14:51 ` [PATCHv2 7/7] [PATCHv5] media: adv7180: fix field type Niklas Söderlund
2016-08-02 15:00   ` Lars-Peter Clausen
2016-08-03 13:21     ` Niklas Söderlund
2016-08-03 13:21       ` Niklas Söderlund
2016-08-03 14:11       ` Hans Verkuil
2016-08-03 14:11         ` Hans Verkuil
2016-08-03 14:23         ` Lars-Peter Clausen
2016-08-03 14:23           ` Lars-Peter Clausen
2016-08-03 14:29           ` Lars-Peter Clausen
2016-08-03 14:29             ` Lars-Peter Clausen
2016-08-03 14:30           ` Hans Verkuil
2016-08-03 14:30             ` Hans Verkuil
2016-08-03 14:42           ` Ian Arkver
2016-08-03 14:42             ` Ian Arkver
2016-08-03 14:45             ` Hans Verkuil
2016-08-03 14:45               ` Hans Verkuil
2016-08-03 14:48             ` Lars-Peter Clausen
2016-08-03 14:48               ` Lars-Peter Clausen
2016-08-03 16:55       ` Steve Longerbeam
2016-08-03 16:55         ` Steve Longerbeam
2016-08-03 16:58         ` Lars-Peter Clausen
2016-08-03 16:58           ` Lars-Peter Clausen
2016-08-03 17:14           ` Steve Longerbeam
2016-08-03 17:14             ` Steve Longerbeam
2016-08-03 17:19             ` Niklas Söderlund
2016-08-03 17:19               ` Niklas Söderlund

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=c1fc233e-6ab6-7338-adab-5a32bc1f8e16@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=hans.verkuil@cisco.com \
    --cc=lars@metafoo.de \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=slongerbeam@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 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.