Message ID | 1316452075-10700-1-git-send-email-s.nawrocki@samsung.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1R5hKA-0007dM-Th; Mon, 19 Sep 2011 19:08:07 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-1) with esmtp id 1R5hK9-0005eM-LO; Mon, 19 Sep 2011 19:08:06 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751757Ab1ISRID (ORCPT <rfc822;patchwork@linuxtv.org> + 5 others); Mon, 19 Sep 2011 13:08:03 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:64244 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750920Ab1ISRIC (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 19 Sep 2011 13:08:02 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from euspt2 ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0LRS0012H4XCP070@mailout3.w1.samsung.com> for linux-media@vger.kernel.org; Mon, 19 Sep 2011 18:08:00 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LRS00DHY4XBW7@spt2.w1.samsung.com> for linux-media@vger.kernel.org; Mon, 19 Sep 2011 18:08:00 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id C9B0427004B; Mon, 19 Sep 2011 19:09:11 +0200 (CEST) Date: Mon, 19 Sep 2011 19:07:55 +0200 From: Sylwester Nawrocki <s.nawrocki@samsung.com> Subject: [PATCH v3 1/2] v4l2: Add the polarity flags for parallel camera bus FIELD signal In-reply-to: <1316450497-6723-1-git-send-email-s.nawrocki@samsung.com> To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, m.szyprowski@samsung.com, laurent.pinchart@ideasonboard.com, g.liakhovetski@gmx.de, sw0312.kim@samsung.com, riverful.kim@samsung.com, Sylwester Nawrocki <s.nawrocki@samsung.com> Message-id: <1316452075-10700-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.5.4 References: <1316450497-6723-1-git-send-email-s.nawrocki@samsung.com> 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: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.9.19.165716 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1800_1899 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' X-LSpam-Score: 1.0 (+) X-LSpam-Report: No, score=1.0 required=5.0 tests=BAYES_00=-1.9, KB_DATE_CONTAINS_TAB=2.751, RCVD_IN_DNSWL_MED=-2.3, TAB_IN_FROM=2.494 autolearn=no |
Commit Message
Sylwester Nawrocki
Sept. 19, 2011, 5:07 p.m. UTC
FIELD is an Even/Odd field selection signal, as specified in ITU-R BT.601 standard. Add corresponding flag for configuring the FIELD signal polarity. Also add a comment about usage of V4L2_MBUS_[HV]SYNC* flags for the hardware that uses [HV]REF signals. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Resending with proper bit assignment. --- include/media/v4l2-mediabus.h | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
Comments
Hi Sylwester, Thanks for the patch. On Monday 19 September 2011 19:07:55 Sylwester Nawrocki wrote: > FIELD is an Even/Odd field selection signal, as specified in ITU-R BT.601 > standard. Add corresponding flag for configuring the FIELD signal polarity. > Also add a comment about usage of V4L2_MBUS_[HV]SYNC* flags for the > hardware that uses [HV]REF signals. I like this approach better. > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> > --- > Resending with proper bit assignment. > > --- > include/media/v4l2-mediabus.h | 11 +++++++++-- > 1 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h > index 6114007..f3a61ab 100644 > --- a/include/media/v4l2-mediabus.h > +++ b/include/media/v4l2-mediabus.h > @@ -22,8 +22,12 @@ > */ > #define V4L2_MBUS_MASTER (1 << 0) > #define V4L2_MBUS_SLAVE (1 << 1) > -/* Which signal polarities it supports */ > -/* Note: in BT.656 mode HSYNC and VSYNC are unused */ > +/* > + * Signal polarity flags > + * Note: in BT.656 mode HSYNC, FIELD, and VSYNC are unused > + * V4L2_MBUS_[HV]SYNC_* flags should be also used for specifying > + * configuration of hardware that uses [HV]REF signals > + */ > #define V4L2_MBUS_HSYNC_ACTIVE_HIGH (1 << 2) > #define V4L2_MBUS_HSYNC_ACTIVE_LOW (1 << 3) > #define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1 << 4) > @@ -32,6 +36,9 @@ > #define V4L2_MBUS_PCLK_SAMPLE_FALLING (1 << 7) > #define V4L2_MBUS_DATA_ACTIVE_HIGH (1 << 8) > #define V4L2_MBUS_DATA_ACTIVE_LOW (1 << 9) > +/* Field selection signal for interlaced scan mode */ > +#define V4L2_MBUS_FIELD_ACTIVE_HIGH (1 << 10) > +#define V4L2_MBUS_FIELD_ACTIVE_LOW (1 << 11) What does this mean ? The FIELD signal is used to select between odd and even fields. Does "active high" mean that the field is odd or even when the signal has a high level ? The comment should make it explicit, or we could even rename those two constants to FIELD_ODD_HIGH/FIELD_ODD_LOW (or FIELD_EVEN_HIGH/FIELD_EVEN_LOW). > /* Serial flags */ > /* How many lanes the client can use */
Hi Laurent, On 09/21/2011 01:12 AM, Laurent Pinchart wrote: > Hi Sylwester, > > Thanks for the patch. > > On Monday 19 September 2011 19:07:55 Sylwester Nawrocki wrote: >> FIELD is an Even/Odd field selection signal, as specified in ITU-R BT.601 >> standard. Add corresponding flag for configuring the FIELD signal polarity. >> Also add a comment about usage of V4L2_MBUS_[HV]SYNC* flags for the >> hardware that uses [HV]REF signals. > > I like this approach better. > ... >> +/* Field selection signal for interlaced scan mode */ >> +#define V4L2_MBUS_FIELD_ACTIVE_HIGH (1 << 10) >> +#define V4L2_MBUS_FIELD_ACTIVE_LOW (1 << 11) > > What does this mean ? The FIELD signal is used to select between odd and even > fields. Does "active high" mean that the field is odd or even when the signal > has a high level ? The comment should make it explicit, or we could even > rename those two constants to FIELD_ODD_HIGH/FIELD_ODD_LOW (or > FIELD_EVEN_HIGH/FIELD_EVEN_LOW). Yes, certainly I didn't think enough about this. I silently assumed that for V4L2_MBUS_FIELD_ACTIVE_HIGH FIELD = 0 selects Field1 (odd) and FIELD = 1 selects Field2 (even). I think it would be good to construct the macro so it is possibly self-explanatory, rather than requiring often to dig in the documentation. So I would go for V4L2_MBUS_FIELD_ODD_LOW/V4L2_MBUS_FIELD_ODD_HIGH. Unless someone proposes something different/better I'll send an amended version tomorrow. Thanks,
On 09/21/2011 03:24 PM, Sylwester Nawrocki wrote: > Hi Laurent, > > On 09/21/2011 01:12 AM, Laurent Pinchart wrote: >> Hi Sylwester, >> >> Thanks for the patch. >> >> On Monday 19 September 2011 19:07:55 Sylwester Nawrocki wrote: >>> FIELD is an Even/Odd field selection signal, as specified in ITU-R BT.601 >>> standard. Add corresponding flag for configuring the FIELD signal polarity. >>> Also add a comment about usage of V4L2_MBUS_[HV]SYNC* flags for the >>> hardware that uses [HV]REF signals. >> >> I like this approach better. >> > ... >>> +/* Field selection signal for interlaced scan mode */ >>> +#define V4L2_MBUS_FIELD_ACTIVE_HIGH (1 << 10) >>> +#define V4L2_MBUS_FIELD_ACTIVE_LOW (1 << 11) >> >> What does this mean ? The FIELD signal is used to select between odd and even >> fields. Does "active high" mean that the field is odd or even when the signal >> has a high level ? The comment should make it explicit, or we could even >> rename those two constants to FIELD_ODD_HIGH/FIELD_ODD_LOW (or >> FIELD_EVEN_HIGH/FIELD_EVEN_LOW). > > Yes, certainly I didn't think enough about this. I silently assumed that for > V4L2_MBUS_FIELD_ACTIVE_HIGH FIELD = 0 selects Field1 (odd) and FIELD = 1 selects > Field2 (even). > I think it would be good to construct the macro so it is possibly self-explanatory, > rather than requiring often to dig in the documentation. > > So I would go for V4L2_MBUS_FIELD_ODD_LOW/V4L2_MBUS_FIELD_ODD_HIGH. > Unless someone proposes something different/better I'll send an amended version > tomorrow. Thinking some more of it, V4L2_MBUS_FIELD_EVEN_HIGH/V4L2_MBUS_FIELD_EVEN_LOW is perhaps more in line with other defines where *HIGH means standard, non-inverted case. So it seems better to me. -- 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/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 6114007..f3a61ab 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -22,8 +22,12 @@ */ #define V4L2_MBUS_MASTER (1 << 0) #define V4L2_MBUS_SLAVE (1 << 1) -/* Which signal polarities it supports */ -/* Note: in BT.656 mode HSYNC and VSYNC are unused */ +/* + * Signal polarity flags + * Note: in BT.656 mode HSYNC, FIELD, and VSYNC are unused + * V4L2_MBUS_[HV]SYNC_* flags should be also used for specifying + * configuration of hardware that uses [HV]REF signals + */ #define V4L2_MBUS_HSYNC_ACTIVE_HIGH (1 << 2) #define V4L2_MBUS_HSYNC_ACTIVE_LOW (1 << 3) #define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1 << 4) @@ -32,6 +36,9 @@ #define V4L2_MBUS_PCLK_SAMPLE_FALLING (1 << 7) #define V4L2_MBUS_DATA_ACTIVE_HIGH (1 << 8) #define V4L2_MBUS_DATA_ACTIVE_LOW (1 << 9) +/* Field selection signal for interlaced scan mode */ +#define V4L2_MBUS_FIELD_ACTIVE_HIGH (1 << 10) +#define V4L2_MBUS_FIELD_ACTIVE_LOW (1 << 11) /* Serial flags */ /* How many lanes the client can use */