linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: lars@metafoo.de
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Steve Longerbeam" <slongerbeam@gmail.com>,
	"Steve Longerbeam" <steve_longerbeam@mentor.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: [PATCH v4 1/8] media: adv7180: fix field type
Date: Wed,  3 Aug 2016 11:03:43 -0700	[thread overview]
Message-ID: <1470247430-11168-2-git-send-email-steve_longerbeam@mentor.com> (raw)
In-Reply-To: <1470247430-11168-1-git-send-email-steve_longerbeam@mentor.com>

From: Steve Longerbeam <slongerbeam@gmail.com>

The ADV7180 and ADV7182 transmit whole fields, bottom field followed
by top (or vice-versa, depending on detected video standard). So
for chips that do not have support for explicitly setting the field
mode via I2P, set the field mode to V4L2_FIELD_ALTERNATE.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

---

v4:
- switch V4L2_FIELD_SEQ_TB/V4L2_FIELD_SEQ_BT to V4L2_FIELD_ALTERNATE.
  This is from Niklas Söderlund.
- remove checks for ADV7180_FLAG_I2P when setting field mode, since I2P
  support is planned to be removed.
- move init of state->curr_norm back to its original location, since
  state->field init is no longer dependent on state->curr_norm.

v3: no changes

v2:
- the init of state->curr_norm in probe needs to be moved up, ahead
  of the init of state->field.
---
 drivers/media/i2c/adv7180.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 95cbc85..192eeae 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -679,10 +679,10 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd,
 	switch (format->format.field) {
 	case V4L2_FIELD_NONE:
 		if (!(state->chip_info->flags & ADV7180_FLAG_I2P))
-			format->format.field = V4L2_FIELD_INTERLACED;
+			format->format.field = V4L2_FIELD_ALTERNATE;
 		break;
 	default:
-		format->format.field = V4L2_FIELD_INTERLACED;
+		format->format.field = V4L2_FIELD_ALTERNATE;
 		break;
 	}
 
@@ -1251,7 +1251,7 @@ static int adv7180_probe(struct i2c_client *client,
 		return -ENOMEM;
 
 	state->client = client;
-	state->field = V4L2_FIELD_INTERLACED;
+	state->field = V4L2_FIELD_ALTERNATE;
 	state->chip_info = (struct adv7180_chip_info *)id->driver_data;
 
 	if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) {
-- 
1.9.1


  reply	other threads:[~2016-08-03 18:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 18:03 [PATCH v4 0/8] adv7180 subdev fixes, v4 Steve Longerbeam
2016-08-03 18:03 ` Steve Longerbeam [this message]
2016-08-19 14:40   ` [PATCH v4 1/8] media: adv7180: fix field type Lars-Peter Clausen
2016-11-14 11:19   ` Hans Verkuil
2016-08-03 18:03 ` [PATCH v4 2/8] media: adv7180: define more registers Steve Longerbeam
2016-08-03 18:03 ` [PATCH v4 3/8] media: adv7180: add support for NEWAVMODE Steve Longerbeam
2016-10-16 12:18   ` Laurent Pinchart
2016-10-17 22:36     ` Steve Longerbeam
2016-10-18  8:31       ` Laurent Pinchart
2016-11-14 11:28   ` Hans Verkuil
2016-11-14 18:21     ` Steve Longerbeam
2016-08-03 18:03 ` [PATCH v4 4/8] media: adv7180: add power pin control Steve Longerbeam
2016-08-03 18:03 ` [PATCH v4 5/8] media: adv7180: implement g_parm Steve Longerbeam
2016-11-14 11:17   ` Hans Verkuil
2016-08-03 18:03 ` [PATCH v4 6/8] media: adv7180: change mbus format to UYVY Steve Longerbeam
2016-08-03 18:03 ` [PATCH v4 7/8] v4l: Add signal lock status to source change events Steve Longerbeam
2016-11-14 11:36   ` Hans Verkuil
2016-11-14 14:16     ` Devin Heitmueller
2016-11-14 19:19     ` Steve Longerbeam
2016-11-14 19:32       ` Steve Longerbeam
2016-08-03 18:03 ` [PATCH v4 8/8] media: adv7180: enable lock/unlock interrupts Steve Longerbeam
2016-09-19 14:19 ` [PATCH v4 0/8] adv7180 subdev fixes, v4 Jack Mitchell
2016-09-19 15:22   ` Hans Verkuil

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=1470247430-11168-2-git-send-email-steve_longerbeam@mentor.com \
    --to=slongerbeam@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=steve_longerbeam@mentor.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;
as well as URLs for NNTP newsgroup(s).