Message ID | 1470247430-11168-2-git-send-email-steve_longerbeam@mentor.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Hans Verkuil |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from <linux-media-owner@vger.kernel.org>) id 1bV0XR-0004vY-Vy; Wed, 03 Aug 2016 18:05:06 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-8) with esmtp id 1bV0XP-0007De-lo; Wed, 03 Aug 2016 20:05:05 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932490AbcHCSEN (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 3 Aug 2016 14:04:13 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:35297 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932378AbcHCSEF (ORCPT <rfc822; linux-media@vger.kernel.org>); Wed, 3 Aug 2016 14:04:05 -0400 Received: by mail-pa0-f67.google.com with SMTP id cf3so14370745pad.2; Wed, 03 Aug 2016 11:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nreA9AzN/CxUDeEHtlGZWCmVJxa0yc9yXa6Fcqax8HY=; b=m+FTinVqvlrk+tSKe1iaEicKy3xMzaL+a7C+4B/tdXhqDBVHyaqxRaOPwfLHRJNP5c O2q/kgDGzYQtLL5IMLoKpM5zwjtVpiTRUPAbF95UtZZlvJoMmcazBaCtsrDXodkjQMV/ FvCtDLETV/FQZ0syJ9Yd/9+RrOvXIJHOsO9cIgQdoU/DeUfyTPdb3z0Mr4nyRra8oL+x 7N7BEFOgOHENeU/6SDiyhtzSqHtB6PaYZ9RZ2Hl8RbemjRlWojT9pxq/+DNggGNi70Rs sEZ6c20NdQzAUfw5NMX5ZWBHGhNr5J+/owMJzSauYIiX7VIMOhHSZkgcaAul+sTosOS3 uDMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nreA9AzN/CxUDeEHtlGZWCmVJxa0yc9yXa6Fcqax8HY=; b=ANnLEnlQHi8k3s00Pptr+o8DhjUxv8CfLW87q2I5cSV/1wMKp962o9CaQIrZXGtE2P hmC9CtEjyZ2O5ipqEP5NwjVSyq5+saRYS5SH3oSFjPqW5Z1CDebd4c+4Yfa/YgoNgdOq uMQZe1SZffB6Bn+6j/r9lWTvjjjbOVX9DpRgE31r/+vWM5im/1wQyO3rfyzBQbNxuGCv 7+J/vQByViKZIkopux7Wzr0TPRUNQVCsdX3BMsSgV+vDYul13QWD+Lo7K8Ctwrmvz5Dd J32ZV2moT6hQI3JECrZFSzaRDnJcOTaCk5G4z5VZihVBxTv5AaXWySRJ/Qk756ef8g43 G9KQ== X-Gm-Message-State: AEkoouukwa33aRZkT9PxAlMSD/wZsfBj9G4kjWa0KONBbEGISm6JdVSq0S5BemE1qgs0Pg== X-Received: by 10.66.237.7 with SMTP id uy7mr82863079pac.152.1470247439937; Wed, 03 Aug 2016 11:03:59 -0700 (PDT) Received: from mothership.sklembedded.com (c-73-241-2-21.hsd1.ca.comcast.net. [73.241.2.21]) by smtp.googlemail.com with ESMTPSA id w64sm14219878pfb.93.2016.08.03.11.03.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 11:03:58 -0700 (PDT) From: Steve Longerbeam <slongerbeam@gmail.com> X-Google-Original-From: Steve Longerbeam <steve_longerbeam@mentor.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>, =?UTF-8?q?Niklas=20S=C3=B6derlund?= <niklas.soderlund+renesas@ragnatech.se> Subject: [PATCH v4 1/8] media: adv7180: fix field type Date: Wed, 3 Aug 2016 11:03:43 -0700 Message-Id: <1470247430-11168-2-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470247430-11168-1-git-send-email-steve_longerbeam@mentor.com> References: <1470247430-11168-1-git-send-email-steve_longerbeam@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.8.3.175716 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DATE_TZ_NA 0, DKIM_SIGNATURE 0, IN_REP_TO 0, LEGITIMATE_NEGATE 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_URI_HTTPS 0, REFERENCES 0, SINGLE_URI_IN_BODY 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CC_NAME 0, __CC_NAME_DIFF_FROM_ACC 0, __CC_REAL_NAMES 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_DOMAIN_IN_ANY_CC2 0, __FROM_DOMAIN_IN_RCPT 0, __FROM_GMAIL 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __REFERENCES 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __YOUTUBE_RCVD 0' |
Commit Message
Steve Longerbeam
Aug. 3, 2016, 6:03 p.m. UTC
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(-)
Comments
On 08/03/2016 08:03 PM, Steve Longerbeam wrote: > 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> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 08/03/2016 08:03 PM, Steve Longerbeam wrote: > 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; I'd change this to: if (state->chip_info->flags & ADV7180_FLAG_I2P) break; /* fall through */ > 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) { > Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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) {