Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-19 Thread Sylwester Nawrocki
On 09/19/2011 01:02 AM, Laurent Pinchart wrote:
 On Saturday 17 September 2011 14:07:30 Sylwester Nawrocki wrote:
 On 09/17/2011 12:54 PM, Laurent Pinchart wrote:
 On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
 HREF is a signal indicating valid data during single line transmission.
 Add corresponding flags for this signal to the set of mediabus signal
 polarity flags.

 So that's a data valid signal that gates the pixel data ? The OMAP3 ISP
 has a

 Yes, it's horizontal window reference signal, it's well described in this
 datasheet: http://www.morninghan.com/pdf/OV2640FSL_DS_(1_3).pdf
 
 In that specific case I would likely connect to HREF signal to the ISP HSYNC 
 signal and ignore the sensor HSYNC signal completely :-)
 
 AFAICS there can be also its vertical counterpart - VREF.
 
 OK, your HREF signal is thus completely unrelated to my DVAL signal. DVAL 
 really qualifies pixel. For instance, if the sensor outputs pixels at half 
 the 
 pixel rate, DVAL would switch at every pixel clock cycle during a line.

Yeah, sounds it's entirely different.

 
 Many devices seem to use this terminology. However, I realize, not all, as
 you're pointing out. So perhaps it's time for some naming contest now..
 :-)

 similar signal called WEN, and I've seen other chips using DVAL. Your
 patch looks good to me, except maybe for the signal name that could be
 made a bit more explicit (I'm not sure what most chips use though).

 I'm pretty OK with HREF/VREF. But I'm open to any better suggestions.

 Maybe

 V4L2_MBUS_LINE_VALID_ACTIVE_HIGH
 V4L2_MBUS_LINE_VALID_ACTIVE_LOW

 V4L2_MBUS_FRAME_VALID_ACTIVE_HIGH
 V4L2_MBUS_FRAME_VALID_ACTIVE_LOW

 ?
 Some of Aptina sensor datasheets describes those signals as
 LINE_VALID/FRAME_VALID, (www.aptina.com/assets/downloadDocument.do?id=76).
 
 LINE_VALID/FRAME_VALID are HSYNC/VSYNC.

I would say these are rather inverted horizontal/vertical blanking signal.

 
 Signed-off-by: Sylwester Nawrockis.nawro...@samsung.com
 Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com
 ---

   include/media/v4l2-mediabus.h |   14 --
   1 files changed, 8 insertions(+), 6 deletions(-)

 diff --git a/include/media/v4l2-mediabus.h
 b/include/media/v4l2-mediabus.h index 6114007..41d8771 100644
 --- a/include/media/v4l2-mediabus.h
 +++ b/include/media/v4l2-mediabus.h
 @@ -26,12 +26,14 @@

   /* Note: in BT.656 mode HSYNC and VSYNC are unused */

 I've forgotten to update this:

 /* Note: in BT.656 mode HSYNC, HREF and VSYNC are unused */

   #define V4L2_MBUS_HSYNC_ACTIVE_HIGH  (1  2)
   #define V4L2_MBUS_HSYNC_ACTIVE_LOW   (1  3)

 -#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1  4)
 -#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1  5)
 -#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1  6)
 -#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1  7)
 -#define V4L2_MBUS_DATA_ACTIVE_HIGH(1  8)
 -#define V4L2_MBUS_DATA_ACTIVE_LOW (1  9)
 +#define V4L2_MBUS_HREF_ACTIVE_HIGH(1  4)
 +#define V4L2_MBUS_HREF_ACTIVE_LOW (1  5)
 +#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1  6)
 +#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1  7)
 +#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1  8)
 +#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1  9)
 +#define V4L2_MBUS_DATA_ACTIVE_HIGH(1  10)
 +#define V4L2_MBUS_DATA_ACTIVE_LOW (1  11)
 

Thanks
-- 
Sylwester Nawrocki
Samsung Poland RD Center
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-19 Thread Sylwester Nawrocki
Hi Laurent,

On 09/19/2011 01:05 AM, Laurent Pinchart wrote:
 On Saturday 17 September 2011 18:06:20 Sylwester Nawrocki wrote:
 On 09/17/2011 02:34 PM, Guennadi Liakhovetski wrote:
 On Sat, 17 Sep 2011, Sylwester Nawrocki wrote:
 On 09/17/2011 12:54 PM, Laurent Pinchart wrote:
 On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
 HREF is a signal indicating valid data during single line
 transmission. Add corresponding flags for this signal to the set of
 mediabus signal polarity flags.

 So that's a data valid signal that gates the pixel data ? The OMAP3 ISP
 has a

 Yes, it's horizontal window reference signal, it's well described in
 this datasheet: http://www.morninghan.com/pdf/OV2640FSL_DS_(1_3).pdf

 AFAICS there can be also its vertical counterpart - VREF.

 Many devices seem to use this terminology. However, I realize, not all,
 as you're pointing out. So perhaps it's time for some naming contest
 now.. :-)

 No objections in principle, just one question though: can these signals
 actually be used simultaneously with respective *SYNC signals or only as
 an alternative? If the latter, maybe we could reuse same names by just
 making them more generic?

 That's actually a good question. In my use cases only HREF is used as
 horizontal synchronization signal, i.e. physical bus interface has this
 signals:

 -| PCLK
 -| VSYNC
 -| HREF
 -| DATA[0:7]
 -| FIELD

 For interlaced mode FIELD can be connected to the horizontal
 synchronization signal. For this case there is InvPolHSYNC bit in the host
 interface registers to indicate the polarity. There are 5 bits actually:

 InvPolPCLK
 InvPolVSYNC (vertical sychronization)
 InvPolHREF  (horizontal synchronization)
 InvPolHSYNC (for interlaced mode only, FIELD port = horizontal sync.
 signal) InvPolFIELD (interlaced mode,  FIELD port = FIELD signal)
 
 Shouldn't this be handled through platform data only ?

Indeed, this is how it's done now and I didn't intend to change that.
I just wanted to replace driver's private signal polarity flag definitions
with the standard ones. Do you think I should rather keep these things in
driver's public header? It's of course a way of less resistance :)


To make things complete I thought about adding the FIELD flags, i.e.

From 9bd11f9b14dffe877f9c546e068b4b4027c9472a Mon Sep 17 00:00:00 2001
From: Sylwester Nawrocki s.nawro...@samsung.com
Date: Sun, 18 Sep 2011 11:28:58 +0200
Subject: [PATCH 1/2] v4l2: Add the parallel bus HREF and FIELD signal polarity
flags

HREF is a signal gating valid data during single line transmission.
FIELD is an Even/Odd field selection signal, as specified in ITU-R BT.601
standard.
Add corresponding flags for these signals to the set of media bus signal
polarity flags.

Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
---
 include/media/v4l2-mediabus.h |   20 +---
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
index 6114007..1952d9f 100644
--- a/include/media/v4l2-mediabus.h
+++ b/include/media/v4l2-mediabus.h
@@ -23,15 +23,21 @@
 #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 */
+/* Note: in BT.656 mode HSYNC, HREF, FIELD, and VSYNC are unused */
 #define V4L2_MBUS_HSYNC_ACTIVE_HIGH(1  2)
 #define V4L2_MBUS_HSYNC_ACTIVE_LOW (1  3)
-#define V4L2_MBUS_VSYNC_ACTIVE_HIGH(1  4)
-#define V4L2_MBUS_VSYNC_ACTIVE_LOW (1  5)
-#define V4L2_MBUS_PCLK_SAMPLE_RISING   (1  6)
-#define V4L2_MBUS_PCLK_SAMPLE_FALLING  (1  7)
-#define V4L2_MBUS_DATA_ACTIVE_HIGH (1  8)
-#define V4L2_MBUS_DATA_ACTIVE_LOW  (1  9)
+/* HREF is a horizontal window reference signal gating valid pixel data */
+#define V4L2_MBUS_HREF_ACTIVE_HIGH (1  4)
+#define V4L2_MBUS_HREF_ACTIVE_LOW  (1  5)
+#define V4L2_MBUS_VSYNC_ACTIVE_HIGH(1  6)
+#define V4L2_MBUS_VSYNC_ACTIVE_LOW (1  7)
+#define V4L2_MBUS_PCLK_SAMPLE_RISING   (1  8)
+#define V4L2_MBUS_PCLK_SAMPLE_FALLING  (1  9)
+#define V4L2_MBUS_DATA_ACTIVE_HIGH (1  10)
+#define V4L2_MBUS_DATA_ACTIVE_LOW  (1  11)
+/* Field selection signal for interlaced scan mode */
+#define V4L2_MBUS_FIELD_ACTIVE_HIGH(1  12)
+#define V4L2_MBUS_FIELD_ACTIVE_LOW (1  13)

 /* Serial flags */
 /* How many lanes the client can use */
-- 1.7.4.1

If there is more objection to the above changes then I'll drop the patch
and stay with driver's private definitions.


Thanks,
-- 
Sylwester Nawrocki
Samsung Poland RD Center
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  

Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-18 Thread Laurent Pinchart
Hi Sylwester,

On Saturday 17 September 2011 14:07:30 Sylwester Nawrocki wrote:
 On 09/17/2011 12:54 PM, Laurent Pinchart wrote:
  On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
  HREF is a signal indicating valid data during single line transmission.
  Add corresponding flags for this signal to the set of mediabus signal
  polarity flags.
  
  So that's a data valid signal that gates the pixel data ? The OMAP3 ISP
  has a
 
 Yes, it's horizontal window reference signal, it's well described in this
 datasheet: http://www.morninghan.com/pdf/OV2640FSL_DS_(1_3).pdf

In that specific case I would likely connect to HREF signal to the ISP HSYNC 
signal and ignore the sensor HSYNC signal completely :-)

 AFAICS there can be also its vertical counterpart - VREF.

OK, your HREF signal is thus completely unrelated to my DVAL signal. DVAL 
really qualifies pixel. For instance, if the sensor outputs pixels at half the 
pixel rate, DVAL would switch at every pixel clock cycle during a line.

 Many devices seem to use this terminology. However, I realize, not all, as
 you're pointing out. So perhaps it's time for some naming contest now..
 :-)
 
  similar signal called WEN, and I've seen other chips using DVAL. Your
  patch looks good to me, except maybe for the signal name that could be
  made a bit more explicit (I'm not sure what most chips use though).
 
 I'm pretty OK with HREF/VREF. But I'm open to any better suggestions.
 
 Maybe
 
 V4L2_MBUS_LINE_VALID_ACTIVE_HIGH
 V4L2_MBUS_LINE_VALID_ACTIVE_LOW
 
 V4L2_MBUS_FRAME_VALID_ACTIVE_HIGH
 V4L2_MBUS_FRAME_VALID_ACTIVE_LOW
 
 ?
 Some of Aptina sensor datasheets describes those signals as
 LINE_VALID/FRAME_VALID, (www.aptina.com/assets/downloadDocument.do?id=76).

LINE_VALID/FRAME_VALID are HSYNC/VSYNC.

  Signed-off-by: Sylwester Nawrockis.nawro...@samsung.com
  Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com
  ---
  
include/media/v4l2-mediabus.h |   14 --
1 files changed, 8 insertions(+), 6 deletions(-)
  
  diff --git a/include/media/v4l2-mediabus.h
  b/include/media/v4l2-mediabus.h index 6114007..41d8771 100644
  --- a/include/media/v4l2-mediabus.h
  +++ b/include/media/v4l2-mediabus.h
  @@ -26,12 +26,14 @@
  
/* Note: in BT.656 mode HSYNC and VSYNC are unused */
 
 I've forgotten to update this:
 
 /* Note: in BT.656 mode HSYNC, HREF and VSYNC are unused */
 
#define V4L2_MBUS_HSYNC_ACTIVE_HIGH  (1  2)
#define V4L2_MBUS_HSYNC_ACTIVE_LOW   (1  3)
  
  -#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1  4)
  -#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1  5)
  -#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1  6)
  -#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1  7)
  -#define V4L2_MBUS_DATA_ACTIVE_HIGH(1  8)
  -#define V4L2_MBUS_DATA_ACTIVE_LOW (1  9)
  +#define V4L2_MBUS_HREF_ACTIVE_HIGH(1  4)
  +#define V4L2_MBUS_HREF_ACTIVE_LOW (1  5)
  +#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1  6)
  +#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1  7)
  +#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1  8)
  +#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1  9)
  +#define V4L2_MBUS_DATA_ACTIVE_HIGH(1  10)
  +#define V4L2_MBUS_DATA_ACTIVE_LOW (1  11)

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-18 Thread Laurent Pinchart
Hi Sylwester,

On Saturday 17 September 2011 18:06:20 Sylwester Nawrocki wrote:
 On 09/17/2011 02:34 PM, Guennadi Liakhovetski wrote:
  On Sat, 17 Sep 2011, Sylwester Nawrocki wrote:
  On 09/17/2011 12:54 PM, Laurent Pinchart wrote:
  On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
  HREF is a signal indicating valid data during single line
  transmission. Add corresponding flags for this signal to the set of
  mediabus signal polarity flags.
  
  So that's a data valid signal that gates the pixel data ? The OMAP3 ISP
  has a
  
  Yes, it's horizontal window reference signal, it's well described in
  this datasheet: http://www.morninghan.com/pdf/OV2640FSL_DS_(1_3).pdf
  
  AFAICS there can be also its vertical counterpart - VREF.
  
  Many devices seem to use this terminology. However, I realize, not all,
  as you're pointing out. So perhaps it's time for some naming contest
  now.. :-)
  
  No objections in principle, just one question though: can these signals
  actually be used simultaneously with respective *SYNC signals or only as
  an alternative? If the latter, maybe we could reuse same names by just
  making them more generic?
 
 That's actually a good question. In my use cases only HREF is used as
 horizontal synchronization signal, i.e. physical bus interface has this
 signals:
 
 -| PCLK
 -| VSYNC
 -| HREF
 -| DATA[0:7]
 -| FIELD
 
 For interlaced mode FIELD can be connected to the horizontal
 synchronization signal. For this case there is InvPolHSYNC bit in the host
 interface registers to indicate the polarity. There are 5 bits actually:
 
 InvPolPCLK
 InvPolVSYNC (vertical sychronization)
 InvPolHREF  (horizontal synchronization)
 InvPolHSYNC (for interlaced mode only, FIELD port = horizontal sync.
 signal) InvPolFIELD (interlaced mode,  FIELD port = FIELD signal)

Shouldn't this be handled through platform data only ?

 IMHO keeping different names for synchronization and 'data valid' signals
 is more clear.

  similar signal called WEN, and I've seen other chips using DVAL. Your
  patch looks good to me, except maybe for the signal name that could be
  made a bit more explicit (I'm not sure what most chips use though).
  
  I'm pretty OK with HREF/VREF. But I'm open to any better suggestions.
  
  Maybe
  
  V4L2_MBUS_LINE_VALID_ACTIVE_HIGH
  V4L2_MBUS_LINE_VALID_ACTIVE_LOW
  
  V4L2_MBUS_FRAME_VALID_ACTIVE_HIGH
  V4L2_MBUS_FRAME_VALID_ACTIVE_LOW
  
  ?
  Some of Aptina sensor datasheets describes those signals as
  LINE_VALID/FRAME_VALID,
  (www.aptina.com/assets/downloadDocument.do?id=76).
  
  Signed-off-by: Sylwester Nawrockis.nawro...@samsung.com
  Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com
  ---
  
 include/media/v4l2-mediabus.h |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)
  
  diff --git a/include/media/v4l2-mediabus.h
  b/include/media/v4l2-mediabus.h index 6114007..41d8771 100644
  --- a/include/media/v4l2-mediabus.h
  +++ b/include/media/v4l2-mediabus.h
  @@ -26,12 +26,14 @@
  
 /* Note: in BT.656 mode HSYNC and VSYNC are unused */
  
  I've forgotten to update this:
  
  /* Note: in BT.656 mode HSYNC, HREF and VSYNC are unused */
  
 #define V4L2_MBUS_HSYNC_ACTIVE_HIGH   (1   2)
 #define V4L2_MBUS_HSYNC_ACTIVE_LOW(1   3)
  
  -#define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1   4)
  -#define V4L2_MBUS_VSYNC_ACTIVE_LOW  (1   5)
  -#define V4L2_MBUS_PCLK_SAMPLE_RISING(1   6)
  -#define V4L2_MBUS_PCLK_SAMPLE_FALLING   (1   7)
  -#define V4L2_MBUS_DATA_ACTIVE_HIGH  (1   8)
  -#define V4L2_MBUS_DATA_ACTIVE_LOW   (1   9)
  +#define V4L2_MBUS_HREF_ACTIVE_HIGH  (1   4)
  +#define V4L2_MBUS_HREF_ACTIVE_LOW   (1   5)
  +#define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1   6)
  +#define V4L2_MBUS_VSYNC_ACTIVE_LOW  (1   7)
  +#define V4L2_MBUS_PCLK_SAMPLE_RISING(1   8)
  +#define V4L2_MBUS_PCLK_SAMPLE_FALLING   (1   9)
  +#define V4L2_MBUS_DATA_ACTIVE_HIGH  (1   10)
  +#define V4L2_MBUS_DATA_ACTIVE_LOW   (1   11)

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-17 Thread Laurent Pinchart
Hi Sylwester,

On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
 HREF is a signal indicating valid data during single line transmission.
 Add corresponding flags for this signal to the set of mediabus signal
 polarity flags.

So that's a data valid signal that gates the pixel data ? The OMAP3 ISP has a 
similar signal called WEN, and I've seen other chips using DVAL. Your patch 
looks good to me, except maybe for the signal name that could be made a bit 
more explicit (I'm not sure what most chips use though).

 Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 ---
  include/media/v4l2-mediabus.h |   14 --
  1 files changed, 8 insertions(+), 6 deletions(-)
 
 diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
 index 6114007..41d8771 100644
 --- a/include/media/v4l2-mediabus.h
 +++ b/include/media/v4l2-mediabus.h
 @@ -26,12 +26,14 @@
  /* Note: in BT.656 mode HSYNC and VSYNC are unused */
  #define V4L2_MBUS_HSYNC_ACTIVE_HIGH  (1  2)
  #define V4L2_MBUS_HSYNC_ACTIVE_LOW   (1  3)
 -#define V4L2_MBUS_VSYNC_ACTIVE_HIGH  (1  4)
 -#define V4L2_MBUS_VSYNC_ACTIVE_LOW   (1  5)
 -#define V4L2_MBUS_PCLK_SAMPLE_RISING (1  6)
 -#define V4L2_MBUS_PCLK_SAMPLE_FALLING(1  7)
 -#define V4L2_MBUS_DATA_ACTIVE_HIGH   (1  8)
 -#define V4L2_MBUS_DATA_ACTIVE_LOW(1  9)
 +#define V4L2_MBUS_HREF_ACTIVE_HIGH   (1  4)
 +#define V4L2_MBUS_HREF_ACTIVE_LOW(1  5)
 +#define V4L2_MBUS_VSYNC_ACTIVE_HIGH  (1  6)
 +#define V4L2_MBUS_VSYNC_ACTIVE_LOW   (1  7)
 +#define V4L2_MBUS_PCLK_SAMPLE_RISING (1  8)
 +#define V4L2_MBUS_PCLK_SAMPLE_FALLING(1  9)
 +#define V4L2_MBUS_DATA_ACTIVE_HIGH   (1  10)
 +#define V4L2_MBUS_DATA_ACTIVE_LOW(1  11)
 
  /* Serial flags */
  /* How many lanes the client can use */

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-17 Thread Sylwester Nawrocki
Hi Laurent,

thanks for your comments.

On 09/17/2011 12:54 PM, Laurent Pinchart wrote:
 Hi Sylwester,
 
 On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
 HREF is a signal indicating valid data during single line transmission.
 Add corresponding flags for this signal to the set of mediabus signal
 polarity flags.
 
 So that's a data valid signal that gates the pixel data ? The OMAP3 ISP has a

Yes, it's horizontal window reference signal, it's well described in this 
datasheet:
http://www.morninghan.com/pdf/OV2640FSL_DS_(1_3).pdf

AFAICS there can be also its vertical counterpart - VREF.

Many devices seem to use this terminology. However, I realize, not all, as 
you're
pointing out. So perhaps it's time for some naming contest now.. :-)

 similar signal called WEN, and I've seen other chips using DVAL. Your patch
 looks good to me, except maybe for the signal name that could be made a bit
 more explicit (I'm not sure what most chips use though).

I'm pretty OK with HREF/VREF. But I'm open to any better suggestions.

Maybe 

V4L2_MBUS_LINE_VALID_ACTIVE_HIGH
V4L2_MBUS_LINE_VALID_ACTIVE_LOW

V4L2_MBUS_FRAME_VALID_ACTIVE_HIGH
V4L2_MBUS_FRAME_VALID_ACTIVE_LOW

? 
Some of Aptina sensor datasheets describes those signals as 
LINE_VALID/FRAME_VALID,
(www.aptina.com/assets/downloadDocument.do?id=76).

 
 Signed-off-by: Sylwester Nawrockis.nawro...@samsung.com
 Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com
 ---
   include/media/v4l2-mediabus.h |   14 --
   1 files changed, 8 insertions(+), 6 deletions(-)

 diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
 index 6114007..41d8771 100644
 --- a/include/media/v4l2-mediabus.h
 +++ b/include/media/v4l2-mediabus.h
 @@ -26,12 +26,14 @@
   /* Note: in BT.656 mode HSYNC and VSYNC are unused */

I've forgotten to update this:

/* Note: in BT.656 mode HSYNC, HREF and VSYNC are unused */

   #define V4L2_MBUS_HSYNC_ACTIVE_HIGH(1  2)
   #define V4L2_MBUS_HSYNC_ACTIVE_LOW (1  3)
 -#define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1  4)
 -#define V4L2_MBUS_VSYNC_ACTIVE_LOW  (1  5)
 -#define V4L2_MBUS_PCLK_SAMPLE_RISING(1  6)
 -#define V4L2_MBUS_PCLK_SAMPLE_FALLING   (1  7)
 -#define V4L2_MBUS_DATA_ACTIVE_HIGH  (1  8)
 -#define V4L2_MBUS_DATA_ACTIVE_LOW   (1  9)
 +#define V4L2_MBUS_HREF_ACTIVE_HIGH  (1  4)
 +#define V4L2_MBUS_HREF_ACTIVE_LOW   (1  5)
 +#define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1  6)
 +#define V4L2_MBUS_VSYNC_ACTIVE_LOW  (1  7)
 +#define V4L2_MBUS_PCLK_SAMPLE_RISING(1  8)
 +#define V4L2_MBUS_PCLK_SAMPLE_FALLING   (1  9)
 +#define V4L2_MBUS_DATA_ACTIVE_HIGH  (1  10)
 +#define V4L2_MBUS_DATA_ACTIVE_LOW   (1  11)

--
Thanks,
Sylwester
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-17 Thread Guennadi Liakhovetski
On Sat, 17 Sep 2011, Sylwester Nawrocki wrote:

 Hi Laurent,
 
 thanks for your comments.
 
 On 09/17/2011 12:54 PM, Laurent Pinchart wrote:
  Hi Sylwester,
  
  On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
  HREF is a signal indicating valid data during single line transmission.
  Add corresponding flags for this signal to the set of mediabus signal
  polarity flags.
  
  So that's a data valid signal that gates the pixel data ? The OMAP3 ISP has 
  a
 
 Yes, it's horizontal window reference signal, it's well described in this 
 datasheet:
 http://www.morninghan.com/pdf/OV2640FSL_DS_(1_3).pdf
 
 AFAICS there can be also its vertical counterpart - VREF.
 
 Many devices seem to use this terminology. However, I realize, not all, as 
 you're
 pointing out. So perhaps it's time for some naming contest now.. :-)

Hi

No objections in principle, just one question though: can these signals 
actually be used simultaneously with respective *SYNC signals or only as 
an alternative? If the latter, maybe we could reuse same names by just 
making them more generic?

Thanks
Guennadi

  similar signal called WEN, and I've seen other chips using DVAL. Your patch
  looks good to me, except maybe for the signal name that could be made a bit
  more explicit (I'm not sure what most chips use though).
 
 I'm pretty OK with HREF/VREF. But I'm open to any better suggestions.
 
 Maybe 
 
 V4L2_MBUS_LINE_VALID_ACTIVE_HIGH
 V4L2_MBUS_LINE_VALID_ACTIVE_LOW
 
 V4L2_MBUS_FRAME_VALID_ACTIVE_HIGH
 V4L2_MBUS_FRAME_VALID_ACTIVE_LOW
   
 ? 
 Some of Aptina sensor datasheets describes those signals as 
 LINE_VALID/FRAME_VALID,
 (www.aptina.com/assets/downloadDocument.do?id=76).
 
  
  Signed-off-by: Sylwester Nawrockis.nawro...@samsung.com
  Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com
  ---
include/media/v4l2-mediabus.h |   14 --
1 files changed, 8 insertions(+), 6 deletions(-)
 
  diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
  index 6114007..41d8771 100644
  --- a/include/media/v4l2-mediabus.h
  +++ b/include/media/v4l2-mediabus.h
  @@ -26,12 +26,14 @@
/* Note: in BT.656 mode HSYNC and VSYNC are unused */
 
 I've forgotten to update this:
 
 /* Note: in BT.656 mode HSYNC, HREF and VSYNC are unused */
 
#define V4L2_MBUS_HSYNC_ACTIVE_HIGH  (1  2)
#define V4L2_MBUS_HSYNC_ACTIVE_LOW   (1  3)
  -#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1  4)
  -#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1  5)
  -#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1  6)
  -#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1  7)
  -#define V4L2_MBUS_DATA_ACTIVE_HIGH(1  8)
  -#define V4L2_MBUS_DATA_ACTIVE_LOW (1  9)
  +#define V4L2_MBUS_HREF_ACTIVE_HIGH(1  4)
  +#define V4L2_MBUS_HREF_ACTIVE_LOW (1  5)
  +#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1  6)
  +#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1  7)
  +#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1  8)
  +#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1  9)
  +#define V4L2_MBUS_DATA_ACTIVE_HIGH(1  10)
  +#define V4L2_MBUS_DATA_ACTIVE_LOW (1  11)
 
 --
 Thanks,
 Sylwester
 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-17 Thread Sylwester Nawrocki
Hi Guennadi,

On 09/17/2011 02:34 PM, Guennadi Liakhovetski wrote:
 On Sat, 17 Sep 2011, Sylwester Nawrocki wrote:
 
 Hi Laurent,

 thanks for your comments.

 On 09/17/2011 12:54 PM, Laurent Pinchart wrote:
 Hi Sylwester,

 On Friday 16 September 2011 19:28:42 Sylwester Nawrocki wrote:
 HREF is a signal indicating valid data during single line transmission.
 Add corresponding flags for this signal to the set of mediabus signal
 polarity flags.

 So that's a data valid signal that gates the pixel data ? The OMAP3 ISP has 
 a

 Yes, it's horizontal window reference signal, it's well described in this 
 datasheet:
 http://www.morninghan.com/pdf/OV2640FSL_DS_(1_3).pdf

 AFAICS there can be also its vertical counterpart - VREF.

 Many devices seem to use this terminology. However, I realize, not all, as 
 you're
 pointing out. So perhaps it's time for some naming contest now.. :-)
 
 Hi
 
 No objections in principle, just one question though: can these signals
 actually be used simultaneously with respective *SYNC signals or only as
 an alternative? If the latter, maybe we could reuse same names by just
 making them more generic?

That's actually a good question. In my use cases only HREF is used as horizontal
synchronization signal, i.e. physical bus interface has this signals:

-| PCLK
-| VSYNC
-| HREF
-| DATA[0:7]
-| FIELD

For interlaced mode FIELD can be connected to the horizontal synchronization
signal. For this case there is InvPolHSYNC bit in the host interface registers
to indicate the polarity. There are 5 bits actually:

InvPolPCLK 
InvPolVSYNC (vertical sychronization)
InvPolHREF  (horizontal synchronization)
InvPolHSYNC (for interlaced mode only, FIELD port = horizontal sync. signal)
InvPolFIELD (interlaced mode,  FIELD port = FIELD signal)

IMHO keeping different names for synchronization and 'data valid' signals is 
more
clear.

 
 Thanks
 Guennadi
 
 similar signal called WEN, and I've seen other chips using DVAL. Your patch
 looks good to me, except maybe for the signal name that could be made a bit
 more explicit (I'm not sure what most chips use though).

 I'm pretty OK with HREF/VREF. But I'm open to any better suggestions.

 Maybe

 V4L2_MBUS_LINE_VALID_ACTIVE_HIGH
 V4L2_MBUS_LINE_VALID_ACTIVE_LOW

 V4L2_MBUS_FRAME_VALID_ACTIVE_HIGH
 V4L2_MBUS_FRAME_VALID_ACTIVE_LOW
  
 ?
 Some of Aptina sensor datasheets describes those signals as 
 LINE_VALID/FRAME_VALID,
 (www.aptina.com/assets/downloadDocument.do?id=76).


 Signed-off-by: Sylwester Nawrockis.nawro...@samsung.com
 Signed-off-by: Kyungmin Parkkyungmin.p...@samsung.com
 ---
include/media/v4l2-mediabus.h |   14 --
1 files changed, 8 insertions(+), 6 deletions(-)

 diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
 index 6114007..41d8771 100644
 --- a/include/media/v4l2-mediabus.h
 +++ b/include/media/v4l2-mediabus.h
 @@ -26,12 +26,14 @@
/* Note: in BT.656 mode HSYNC and VSYNC are unused */

 I've forgotten to update this:

 /* Note: in BT.656 mode HSYNC, HREF and VSYNC are unused */

#define V4L2_MBUS_HSYNC_ACTIVE_HIGH (1   2)
#define V4L2_MBUS_HSYNC_ACTIVE_LOW  (1   3)
 -#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1   4)
 -#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1   5)
 -#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1   6)
 -#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1   7)
 -#define V4L2_MBUS_DATA_ACTIVE_HIGH(1   8)
 -#define V4L2_MBUS_DATA_ACTIVE_LOW (1   9)
 +#define V4L2_MBUS_HREF_ACTIVE_HIGH(1   4)
 +#define V4L2_MBUS_HREF_ACTIVE_LOW (1   5)
 +#define V4L2_MBUS_VSYNC_ACTIVE_HIGH   (1   6)
 +#define V4L2_MBUS_VSYNC_ACTIVE_LOW(1   7)
 +#define V4L2_MBUS_PCLK_SAMPLE_RISING  (1   8)
 +#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1   9)
 +#define V4L2_MBUS_DATA_ACTIVE_HIGH(1   10)
 +#define V4L2_MBUS_DATA_ACTIVE_LOW (1   11)

--
Regards,
Sylwester
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH/RFC 1/2] v4l2: Add the parallel bus HREF signal polarity flags

2011-09-16 Thread Sylwester Nawrocki
HREF is a signal indicating valid data during single line transmission.
Add corresponding flags for this signal to the set of mediabus signal
polarity flags.

Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
---
 include/media/v4l2-mediabus.h |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
index 6114007..41d8771 100644
--- a/include/media/v4l2-mediabus.h
+++ b/include/media/v4l2-mediabus.h
@@ -26,12 +26,14 @@
 /* Note: in BT.656 mode HSYNC and VSYNC are unused */
 #define V4L2_MBUS_HSYNC_ACTIVE_HIGH(1  2)
 #define V4L2_MBUS_HSYNC_ACTIVE_LOW (1  3)
-#define V4L2_MBUS_VSYNC_ACTIVE_HIGH(1  4)
-#define V4L2_MBUS_VSYNC_ACTIVE_LOW (1  5)
-#define V4L2_MBUS_PCLK_SAMPLE_RISING   (1  6)
-#define V4L2_MBUS_PCLK_SAMPLE_FALLING  (1  7)
-#define V4L2_MBUS_DATA_ACTIVE_HIGH (1  8)
-#define V4L2_MBUS_DATA_ACTIVE_LOW  (1  9)
+#define V4L2_MBUS_HREF_ACTIVE_HIGH (1  4)
+#define V4L2_MBUS_HREF_ACTIVE_LOW  (1  5)
+#define V4L2_MBUS_VSYNC_ACTIVE_HIGH(1  6)
+#define V4L2_MBUS_VSYNC_ACTIVE_LOW (1  7)
+#define V4L2_MBUS_PCLK_SAMPLE_RISING   (1  8)
+#define V4L2_MBUS_PCLK_SAMPLE_FALLING  (1  9)
+#define V4L2_MBUS_DATA_ACTIVE_HIGH (1  10)
+#define V4L2_MBUS_DATA_ACTIVE_LOW  (1  11)
 
 /* Serial flags */
 /* How many lanes the client can use */
-- 
1.7.6

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html