mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4] media: v4l2-ctrls: add control for test pattern
@ 2012-09-25  6:09 Prabhakar
  2012-09-25  6:53 ` Hans Verkuil
  2012-10-01  9:16 ` Sakari Ailus
  0 siblings, 2 replies; 3+ messages in thread
From: Prabhakar @ 2012-09-25  6:09 UTC (permalink / raw)
  To: LMML
  Cc: DLOS, LDOC, Mauro Carvalho Chehab, VGER, Sakari Ailus,
	Manjunath Hadli, Prabhakar Lad, Hans Verkuil, Laurent Pinchart,
	Sylwester Nawrocki, Hans de Goede, Kyungmin Park, Rob Landley

From: Lad, Prabhakar <prabhakar.lad@ti.com>

add V4L2_CID_TEST_PATTERN of type menu, which determines
the internal test pattern selected by the device.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Rob Landley <rob@landley.net>
---
 This patches has one checkpatch warning for line over
 80 characters altough it can be avoided I have kept it
 for consistency.

 Changes for v4:
 1: Fixed some grammar/style issues, pointed by Hans.

 Changes for v3:
 1: Removed the menu for test pattern, pointed by Sakari.

 Changes for v2:
 1: Included display devices in the description for test pattern
   as pointed by Hans.
 2: In the menu replaced 'Test Pattern Disabled' by 'Disabled' as
   pointed by Sylwester.
 3: Removed the test patterns from menu as the are hardware specific
   as pointed by Sakari.

 Documentation/DocBook/media/v4l/controls.xml |   10 ++++++++++
 drivers/media/v4l2-core/v4l2-ctrls.c         |    2 ++
 include/linux/videodev2.h                    |    1 +
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index f0fb08d..5450d31 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -4313,6 +4313,16 @@ interface and may change in the future.</para>
 	      </tbody>
 	    </entrytbl>
 	  </row>
+	  <row>
+	    <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN</constant></entry>
+	    <entry>menu</entry>
+	  </row>
+	  <row id="v4l2-test-pattern">
+	    <entry spanname="descr"> Some capture/display/sensor devices have
+	    the capability to generate test pattern images. These hardware
+	    specific test patterns can be used to test if a device is working
+	    properly.</entry>
+	  </row>
 	<row><entry></entry></row>
 	</tbody>
       </tgroup>
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 8f2f40b..41b7732 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -740,6 +740,7 @@ const char *v4l2_ctrl_get_name(u32 id)
 	case V4L2_CID_LINK_FREQ:		return "Link Frequency";
 	case V4L2_CID_PIXEL_RATE:		return "Pixel Rate";
 	case V4L2_CID_DPCM_PREDICTOR:		return "DPCM Predictor";
+	case V4L2_CID_TEST_PATTERN:		return "Test Pattern";
 
 	default:
 		return NULL;
@@ -841,6 +842,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
 	case V4L2_CID_EXPOSURE_METERING:
 	case V4L2_CID_SCENE_MODE:
 	case V4L2_CID_DPCM_PREDICTOR:
+	case V4L2_CID_TEST_PATTERN:
 		*type = V4L2_CTRL_TYPE_MENU;
 		break;
 	case V4L2_CID_LINK_FREQ:
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index ca9fb78..7014c0b 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -2005,6 +2005,7 @@ enum v4l2_dpcm_predictor {
 	V4L2_DPCM_PREDICTOR_SIMPLE	= 0,
 	V4L2_DPCM_PREDICTOR_ADVANCED	= 1,
 };
+#define V4L2_CID_TEST_PATTERN			(V4L2_CID_IMAGE_PROC_CLASS_BASE + 4)
 
 /*
  *	T U N I N G
-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4] media: v4l2-ctrls: add control for test pattern
  2012-09-25  6:09 [PATCH v4] media: v4l2-ctrls: add control for test pattern Prabhakar
@ 2012-09-25  6:53 ` Hans Verkuil
  2012-10-01  9:16 ` Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2012-09-25  6:53 UTC (permalink / raw)
  To: davinci-linux-open-source
  Cc: Prabhakar, LMML, Rob Landley, LDOC, VGER, Mauro Carvalho Chehab,
	Hans de Goede, Kyungmin Park, Sakari Ailus, Sylwester Nawrocki,
	Hans Verkuil

On Tue September 25 2012 08:09:05 Prabhakar wrote:
> From: Lad, Prabhakar <prabhakar.lad@ti.com>
> 
> add V4L2_CID_TEST_PATTERN of type menu, which determines
> the internal test pattern selected by the device.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> 
> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
> Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
> Cc: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Rob Landley <rob@landley.net>
> ---
>  This patches has one checkpatch warning for line over
>  80 characters altough it can be avoided I have kept it
>  for consistency.
> 
>  Changes for v4:
>  1: Fixed some grammar/style issues, pointed by Hans.
> 
>  Changes for v3:
>  1: Removed the menu for test pattern, pointed by Sakari.
> 
>  Changes for v2:
>  1: Included display devices in the description for test pattern
>    as pointed by Hans.
>  2: In the menu replaced 'Test Pattern Disabled' by 'Disabled' as
>    pointed by Sylwester.
>  3: Removed the test patterns from menu as the are hardware specific
>    as pointed by Sakari.
> 
>  Documentation/DocBook/media/v4l/controls.xml |   10 ++++++++++
>  drivers/media/v4l2-core/v4l2-ctrls.c         |    2 ++
>  include/linux/videodev2.h                    |    1 +
>  3 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
> index f0fb08d..5450d31 100644
> --- a/Documentation/DocBook/media/v4l/controls.xml
> +++ b/Documentation/DocBook/media/v4l/controls.xml
> @@ -4313,6 +4313,16 @@ interface and may change in the future.</para>
>  	      </tbody>
>  	    </entrytbl>
>  	  </row>
> +	  <row>
> +	    <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN</constant></entry>
> +	    <entry>menu</entry>
> +	  </row>
> +	  <row id="v4l2-test-pattern">
> +	    <entry spanname="descr"> Some capture/display/sensor devices have
> +	    the capability to generate test pattern images. These hardware
> +	    specific test patterns can be used to test if a device is working
> +	    properly.</entry>
> +	  </row>
>  	<row><entry></entry></row>
>  	</tbody>
>        </tgroup>
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> index 8f2f40b..41b7732 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -740,6 +740,7 @@ const char *v4l2_ctrl_get_name(u32 id)
>  	case V4L2_CID_LINK_FREQ:		return "Link Frequency";
>  	case V4L2_CID_PIXEL_RATE:		return "Pixel Rate";
>  	case V4L2_CID_DPCM_PREDICTOR:		return "DPCM Predictor";
> +	case V4L2_CID_TEST_PATTERN:		return "Test Pattern";
>  
>  	default:
>  		return NULL;
> @@ -841,6 +842,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>  	case V4L2_CID_EXPOSURE_METERING:
>  	case V4L2_CID_SCENE_MODE:
>  	case V4L2_CID_DPCM_PREDICTOR:
> +	case V4L2_CID_TEST_PATTERN:
>  		*type = V4L2_CTRL_TYPE_MENU;
>  		break;
>  	case V4L2_CID_LINK_FREQ:
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index ca9fb78..7014c0b 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -2005,6 +2005,7 @@ enum v4l2_dpcm_predictor {
>  	V4L2_DPCM_PREDICTOR_SIMPLE	= 0,
>  	V4L2_DPCM_PREDICTOR_ADVANCED	= 1,
>  };
> +#define V4L2_CID_TEST_PATTERN			(V4L2_CID_IMAGE_PROC_CLASS_BASE + 4)
>  
>  /*
>   *	T U N I N G
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4] media: v4l2-ctrls: add control for test pattern
  2012-09-25  6:09 [PATCH v4] media: v4l2-ctrls: add control for test pattern Prabhakar
  2012-09-25  6:53 ` Hans Verkuil
@ 2012-10-01  9:16 ` Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2012-10-01  9:16 UTC (permalink / raw)
  To: Prabhakar
  Cc: LMML, DLOS, LDOC, Mauro Carvalho Chehab, VGER, Manjunath Hadli,
	Prabhakar Lad, Hans Verkuil, Laurent Pinchart,
	Sylwester Nawrocki, Hans de Goede, Kyungmin Park, Rob Landley

Hi Prabhakar,

Prabhakar wrote:
> From: Lad, Prabhakar <prabhakar.lad@ti.com>
>
> add V4L2_CID_TEST_PATTERN of type menu, which determines
> the internal test pattern selected by the device.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
> Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
> Cc: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Rob Landley <rob@landley.net>
> ---
>   This patches has one checkpatch warning for line over
>   80 characters altough it can be avoided I have kept it
>   for consistency.
>
>   Changes for v4:
>   1: Fixed some grammar/style issues, pointed by Hans.
>
>   Changes for v3:
>   1: Removed the menu for test pattern, pointed by Sakari.
>
>   Changes for v2:
>   1: Included display devices in the description for test pattern
>     as pointed by Hans.
>   2: In the menu replaced 'Test Pattern Disabled' by 'Disabled' as
>     pointed by Sylwester.
>   3: Removed the test patterns from menu as the are hardware specific
>     as pointed by Sakari.
>
>   Documentation/DocBook/media/v4l/controls.xml |   10 ++++++++++
>   drivers/media/v4l2-core/v4l2-ctrls.c         |    2 ++
>   include/linux/videodev2.h                    |    1 +
>   3 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
> index f0fb08d..5450d31 100644
> --- a/Documentation/DocBook/media/v4l/controls.xml
> +++ b/Documentation/DocBook/media/v4l/controls.xml
> @@ -4313,6 +4313,16 @@ interface and may change in the future.</para>
>   	      </tbody>
>   	    </entrytbl>
>   	  </row>
> +	  <row>
> +	    <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN</constant></entry>
> +	    <entry>menu</entry>
> +	  </row>
> +	  <row id="v4l2-test-pattern">
> +	    <entry spanname="descr"> Some capture/display/sensor devices have
> +	    the capability to generate test pattern images. These hardware
> +	    specific test patterns can be used to test if a device is working
> +	    properly.</entry>
> +	  </row>
>   	<row><entry></entry></row>
>   	</tbody>
>         </tgroup>
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> index 8f2f40b..41b7732 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -740,6 +740,7 @@ const char *v4l2_ctrl_get_name(u32 id)
>   	case V4L2_CID_LINK_FREQ:		return "Link Frequency";
>   	case V4L2_CID_PIXEL_RATE:		return "Pixel Rate";
>   	case V4L2_CID_DPCM_PREDICTOR:		return "DPCM Predictor";
> +	case V4L2_CID_TEST_PATTERN:		return "Test Pattern";
>
>   	default:
>   		return NULL;
> @@ -841,6 +842,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>   	case V4L2_CID_EXPOSURE_METERING:
>   	case V4L2_CID_SCENE_MODE:
>   	case V4L2_CID_DPCM_PREDICTOR:
> +	case V4L2_CID_TEST_PATTERN:
>   		*type = V4L2_CTRL_TYPE_MENU;
>   		break;
>   	case V4L2_CID_LINK_FREQ:
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index ca9fb78..7014c0b 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -2005,6 +2005,7 @@ enum v4l2_dpcm_predictor {
>   	V4L2_DPCM_PREDICTOR_SIMPLE	= 0,
>   	V4L2_DPCM_PREDICTOR_ADVANCED	= 1,
>   };
> +#define V4L2_CID_TEST_PATTERN			(V4L2_CID_IMAGE_PROC_CLASS_BASE + 4)
>
>   /*
>    *	T U N I N G
>

Acked-by: Sakari Ailus <sakari.ailus@iki.fi>

I'd suggest to rebase this under the DPCM predictor patch. As the choice of
the predictor affects the resulting format, it has to be the same on the
transmitter and the receiver, and also affects the in-memory pixel format.

I'll prepare an RFC on the topic shortly.

Kind regards,

-- 
Sakari Ailus
sakari.ailus@iki.fi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-01  9:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-25  6:09 [PATCH v4] media: v4l2-ctrls: add control for test pattern Prabhakar
2012-09-25  6:53 ` Hans Verkuil
2012-10-01  9:16 ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®