[PATCH v2 1/1] v4l: Add frame end event

2013-11-12 Thread Sakari Ailus
Add an event to signal frame end. This is not necessarily the same timestamp
as the video buffer done timestamp, and can be also subscribed by other
processes than the one controlling streaming and buffer (de)queueing.

Also make all event type constants appear as constants in documentation and
move frame sync event struct documentation after all control event
documentation.

Signed-off-by: Sakari Ailus sakari.ai...@linux.intel.com
---
Hi,

I decided it'd be better not to use the id field to tell it's frame end ---
that field would be better used for stream id (and we're not exactly running
out of possible values for type).

As discussed previously, I don't know when this would be needed in mainline.

Regards,
Sakari

 Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 39 +++---
 .../DocBook/media/v4l/vidioc-subscribe-event.xml   | 18 +-
 include/uapi/linux/videodev2.h |  2 ++
 3 files changed, 39 insertions(+), 20 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml 
b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
index 89891ad..0fdaa2e 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
@@ -76,21 +76,22 @@
entry/entry
entryv4l2-event-vsync;/entry
 entrystructfieldvsync/structfield/entry
-   entryEvent data for event V4L2_EVENT_VSYNC.
+   entryEvent data for event constantV4L2_EVENT_VSYNC/constant.
 /entry
  /row
  row
entry/entry
entryv4l2-event-ctrl;/entry
 entrystructfieldctrl/structfield/entry
-   entryEvent data for event V4L2_EVENT_CTRL.
+   entryEvent data for event constantV4L2_EVENT_CTRL/constant.
 /entry
  /row
  row
entry/entry
entryv4l2-event-frame-sync;/entry
 entrystructfieldframe_sync/structfield/entry
-   entryEvent data for event V4L2_EVENT_FRAME_SYNC./entry
+   entryEvent data for event constantV4L2_EVENT_FRAME_SYNC
+   /constant and constantV4L2_EVENT_FRAME_END/constant./entry
  /row
  row
entry/entry
@@ -226,22 +227,6 @@
   /tgroup
 /table
 
-table frame=none pgwide=1 id=v4l2-event-frame-sync
-  titlestruct structnamev4l2_event_frame_sync/structname/title
-  tgroup cols=3
-   cs-str;
-   tbody valign=top
- row
-   entry__u32/entry
-   entrystructfieldframe_sequence/structfield/entry
-   entry
- The sequence number of the frame being received.
-   /entry
- /row
-   /tbody
-  /tgroup
-/table
-
 table pgwide=1 frame=none id=changes-flags
   titleChanges/title
   tgroup cols=3
@@ -270,6 +255,22 @@
/tbody
   /tgroup
 /table
+
+table frame=none pgwide=1 id=v4l2-event-frame-sync
+  titlestruct structnamev4l2_event_frame_sync/structname/title
+  tgroup cols=3
+   cs-str;
+   tbody valign=top
+ row
+   entry__u32/entry
+   entrystructfieldframe_sequence/structfield/entry
+   entry
+ The sequence number of the frame being received.
+   /entry
+ /row
+   /tbody
+  /tgroup
+/table
   /refsect1
   refsect1
 return-value;
diff --git a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml 
b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
index 5c70b61..406e5e0 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
@@ -150,7 +150,23 @@
  buffer underrun it might not be able to generate this event.
  In such cases the structfieldframe_sequence/structfield
  field in v4l2-event-frame-sync; will not be incremented. This
- causes two consecutive frame sequence numbers to have n times
+ causes two consecutive frame sync events to have n times
+ frame interval in between them./para
+   /entry
+ /row
+ row
+   entryconstantV4L2_EVENT_FRAME_END/constant/entry
+   entry5/entry
+   entry
+ paraTriggered immediately when the reception of a
+ frame has ended. This event has a
+ v4l2-event-frame-sync; associated with it./para
+
+ paraIf the hardware needs to be stopped in the case of a
+ buffer underrun it might not be able to generate this event.
+ In such cases the structfieldframe_sequence/structfield
+ field in v4l2-event-frame-sync; will not be incremented. This
+ causes two consecutive frame end events to have n times
  frame interval in between them./para
/entry
  /row
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 

Re: [RFC v3] [RFC] v4l2: Support for multiple selections

2013-11-12 Thread Tomasz Stanislawski
Hi Ricardo,
Sorry for a late reply. I've been 'offline' for the last two weeks.
Please refer to the comments below.

On 10/28/2013 11:46 PM, Ricardo Ribalda Delgado wrote:
 Hello Tomasz
 
 Sorry for the late reply, but I have been offline the last week due to
 the conference.
 
 
 On Thu, Oct 24, 2013 at 12:31 PM, Tomasz Stanislawski
 t.stanisl...@samsung.com wrote:
 Hi Ricardo,
 I am the designer of selection API. I hope I can help you a little.
 I think that there are two issues mixed in 'Mulitple selections' topic.

 Firstly, you described that you program a piece of hardware that is
 capable of selecting 8 areas for scanning. Now you
 are looking for userspace API to support such a feature.
 The feature of posting multiple rectangle was proposed in this RFC.

 Secondly, You introduced struct v4l2_ext_rect which is a future-proof
 version of v4l2_rect.


 I think that both issues should be solved in two separate patchsets.

 Ad 1.
 The selection of multiple scanning areas is a very driver-specific
 feature, isn't it? I think that you do not need to introduce any abstract
 interface. What would be other applications of the proposed interface?
 
 It is not driver specific. There are many sensors out there that
 supports multiple window of interest, but today we are ignoring them
 just because we dont have an api.
 
 The main application would be industrial imaging, where less data to
 read means more fps and therefore the system can run faster.
 
 From my field I can tell you that it is a hard requirement for
 computer vision. And it is a feature that we cannot model through v4l2
 controls.
 
 

OK. So there is no need to implement this feature as a driver-specific API.
It can go automatically to generic API.

 Do you know other drivers that may need it? Sakari mentioned introduction
 of private targets for selections. I like this idea. Just define:

 #define V4L2_SEL_TGT_PRIVATE 0x8000

 All targets that are = V4L2_SEL_TGT_PRIVATE are driver-specific.
 Generic applications must not use them. Non-generic application
 must check out the driver of video node before using selections
 from private set. If some target becomes more useful and accepted
 by more then one driver then it can be moved to generic API.
 The good thing about private target is that enums from different
 drivers can collide so the target space is not going to be trashed.

 
 If you read the previous RFCs you will see that the approach you are
 mentioning has been rejected.
 
 The main issue is that you cannot set atomically all the rectangles.
 Lets say that the configuration formed by rectangle A, B and C is
 legal, but the configuration A and B is not allowed by the sensor. How
 could you set the rectangles one by one?
 

As I said. Changes of rectangle n may trigger changes in rectangle n+1 and so 
on.
So activation of rectangle B (setting height to non-zero value) will enable
rectangle C with some default size. Moreover disabling rectangle B (setting 
height to 0)
may disable rectangle C automatically. I do not follow what is the problem here?

Hmm. I think that the real problem is much different.
Not how to set up rectangles atomically but rather
how do anything non-trivial atomically in V4L2.

It would be very nice to have crop/compose and format configured at the same 
time.
However, current version of V4L2 API does not support that.

Setting multiple crop rectangles may help a bit for only this little case.
But how would like to set multicrop rectangles and multicompose rectangle 
atomically.
How to define which crop rectangle refers to which to which compose rectangle.

What to do if one would like to change only 3rd crop rectangle?

Introduce rectangle id into v4l2_ext_rect?
Call VIDIOC_G_SELECTION to get all rectangles, change one and apply 
VIDIOC_S_SELECTION?
Is it really scalable?

Multirectangle targets may seam to be a solution but I think it is not.

I think that atomic transactions are what is really needed in V4L2.
Other ideas like try-context from subdev API may also help.

It will be nice to have something like

VIDIOC_BEGIN
  VIDIOC_S_SELECTION (target = CROP)
  VIDIOC_S_SELECTION (target = COMPOSE)
  VIDIOC_S_FMT
  VIDIOC_S_CTRL
VIDIOC_COMMIT

and call a bunch of VIDIOC_G_* to see what really was applied.

 I have an auxiliary question. Do you have to set all rectangles
 at once? can you set up them one by one?
 
 Also if you tell the driver what exact configuration you will need, it
 will provide you with the closest possible confuration, that cannot be

s/cannot be done/may not be 'doable'

 done if you provide rectangle by rectangle.
 
 But how to deal with multiple rectangles?
 
 Multiple rectangles is a desired feature, please take a look to the
 presentation on the workshop.
 

I agree that it may be useful. I just think that multirectangle selections
are needed to add support for such a feature.


 Anyway, first try to define something like this:

 #define V4L2_SEL_TGT_XXX_SCANOUT0  

[PATCH 1/2] cx24117: Add complete demod command list.

2013-11-12 Thread Luis Alves
Hi,

This patch adds the complete list of all the commands known for the cx24117 
demod.

Regards,
Luis


Signed-off-by: Luis Alves lja...@gmail.com
---
 drivers/media/dvb-frontends/cx24117.c | 98 +--
 1 file changed, 58 insertions(+), 40 deletions(-)

diff --git a/drivers/media/dvb-frontends/cx24117.c 
b/drivers/media/dvb-frontends/cx24117.c
index 476b422..a6fe1af 100644
--- a/drivers/media/dvb-frontends/cx24117.c
+++ b/drivers/media/dvb-frontends/cx24117.c
@@ -135,15 +135,33 @@
 
 
 enum cmds {
-   CMD_SET_VCO = 0x10,
-   CMD_TUNEREQUEST = 0x11,
-   CMD_MPEGCONFIG  = 0x13,
-   CMD_TUNERINIT   = 0x14,
-   CMD_LNBSEND = 0x21, /* Formerly CMD_SEND_DISEQC */
-   CMD_LNBDCLEVEL  = 0x22,
-   CMD_SET_TONE= 0x23,
-   CMD_UPDFWVERS   = 0x35,
-   CMD_TUNERSLEEP  = 0x36,
+   CMD_SET_VCOFREQ= 0x10,
+   CMD_TUNEREQUEST= 0x11,
+   CMD_GLOBAL_MPEGCFG = 0x13,
+   CMD_MPEGCFG= 0x14,
+   CMD_TUNERINIT  = 0x15,
+   CMD_GET_SRATE  = 0x18,
+   CMD_SET_GOLDCODE   = 0x19,
+   CMD_GET_AGCACC = 0x1a,
+   CMD_DEMODINIT  = 0x1b,
+   CMD_GETCTLACC  = 0x1c,
+
+   CMD_LNBCONFIG  = 0x20,
+   CMD_LNBSEND= 0x21,
+   CMD_LNBDCLEVEL = 0x22,
+   CMD_LNBPCBCONFIG   = 0x23,
+   CMD_LNBSENDTONEBST = 0x24,
+   CMD_LNBUPDREPLY= 0x25,
+
+   CMD_SET_GPIOMODE   = 0x30,
+   CMD_SET_GPIOEN = 0x31,
+   CMD_SET_GPIODIR= 0x32,
+   CMD_SET_GPIOOUT= 0x33,
+   CMD_ENABLERSCORR   = 0x34,
+   CMD_FWVERSION  = 0x35,
+   CMD_SET_SLEEPMODE  = 0x36,
+   CMD_BERCTRL= 0x3c,
+   CMD_EVENTCTRL  = 0x3d,
 };
 
 static LIST_HEAD(hybrid_tuner_instance_list);
@@ -619,8 +637,8 @@ static int cx24117_load_firmware(struct dvb_frontend *fe,
cx24117_writereg(state, 0xf7, 0x0c);
cx24117_writereg(state, 0xe0, 0x00);
 
-   /* CMD 1B */
-   cmd.args[0] = 0x1b;
+   /* Init demodulator */
+   cmd.args[0] = CMD_DEMODINIT;
cmd.args[1] = 0x00;
cmd.args[2] = 0x01;
cmd.args[3] = 0x00;
@@ -629,8 +647,8 @@ static int cx24117_load_firmware(struct dvb_frontend *fe,
if (ret != 0)
goto error;
 
-   /* CMD 10 */
-   cmd.args[0] = CMD_SET_VCO;
+   /* Set VCO frequency */
+   cmd.args[0] = CMD_SET_VCOFREQ;
cmd.args[1] = 0x06;
cmd.args[2] = 0x2b;
cmd.args[3] = 0xd8;
@@ -648,8 +666,8 @@ static int cx24117_load_firmware(struct dvb_frontend *fe,
if (ret != 0)
goto error;
 
-   /* CMD 15 */
-   cmd.args[0] = 0x15;
+   /* Tuner init */
+   cmd.args[0] = CMD_TUNERINIT;
cmd.args[1] = 0x00;
cmd.args[2] = 0x01;
cmd.args[3] = 0x00;
@@ -667,8 +685,8 @@ static int cx24117_load_firmware(struct dvb_frontend *fe,
if (ret != 0)
goto error;
 
-   /* CMD 13 */
-   cmd.args[0] = CMD_MPEGCONFIG;
+   /* Global MPEG config */
+   cmd.args[0] = CMD_GLOBAL_MPEGCFG;
cmd.args[1] = 0x00;
cmd.args[2] = 0x00;
cmd.args[3] = 0x00;
@@ -679,9 +697,9 @@ static int cx24117_load_firmware(struct dvb_frontend *fe,
if (ret != 0)
goto error;
 
-   /* CMD 14 */
+   /* MPEG config for each demod */
for (i = 0; i  2; i++) {
-   cmd.args[0] = CMD_TUNERINIT;
+   cmd.args[0] = CMD_MPEGCFG;
cmd.args[1] = (u8) i;
cmd.args[2] = 0x00;
cmd.args[3] = 0x05;
@@ -699,8 +717,8 @@ static int cx24117_load_firmware(struct dvb_frontend *fe,
cx24117_writereg(state, 0xcf, 0x00);
cx24117_writereg(state, 0xe5, 0x04);
 
-   /* Firmware CMD 35: Get firmware version */
-   cmd.args[0] = CMD_UPDFWVERS;
+   /* Get firmware version */
+   cmd.args[0] = CMD_FWVERSION;
cmd.len = 2;
for (i = 0; i  4; i++) {
cmd.args[1] = i;
@@ -779,8 +797,8 @@ static int cx24117_read_signal_strength(struct dvb_frontend 
*fe,
u8 reg = (state-demod == 0) ?
CX24117_REG_SSTATUS0 : CX24117_REG_SSTATUS1;
 
-   /* Firmware CMD 1A */
-   cmd.args[0] = 0x1a;
+   /* Read AGC accumulator register */
+   cmd.args[0] = CMD_GET_AGCACC;
cmd.args[1] = (u8) state-demod;
cmd.len = 2;
ret = cx24117_cmd_execute(fe, cmd);
@@ -899,8 +917,8 @@ static int cx24117_set_voltage(struct dvb_frontend *fe,
voltage == SEC_VOLTAGE_18 ? SEC_VOLTAGE_18 :
SEC_VOLTAGE_OFF);
 
-   /* CMD 32 */
-   cmd.args[0] = 0x32;
+   /* Set GPIO direction */
+   cmd.args[0] = CMD_SET_GPIODIR;
cmd.args[1] = reg;
cmd.args[2] = reg;
cmd.len = 3;
@@ -910,8 +928,8 @@ static int cx24117_set_voltage(struct dvb_frontend *fe,
 
if ((voltage == SEC_VOLTAGE_13) ||
(voltage == SEC_VOLTAGE_18)) {
-   /* CMD 

[PATCH 2/2] cx24117: Fix LNB set_voltage function.

2013-11-12 Thread Luis Alves
Hi,
This patch should fix/enhance the set_voltage function for the cx24117 demod.

Regards,
Luis

Signed-off-by: Luis Alves lja...@gmail.com
---
 drivers/media/dvb-frontends/cx24117.c | 33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/drivers/media/dvb-frontends/cx24117.c 
b/drivers/media/dvb-frontends/cx24117.c
index a6fe1af..68f768a 100644
--- a/drivers/media/dvb-frontends/cx24117.c
+++ b/drivers/media/dvb-frontends/cx24117.c
@@ -917,22 +917,15 @@ static int cx24117_set_voltage(struct dvb_frontend *fe,
voltage == SEC_VOLTAGE_18 ? SEC_VOLTAGE_18 :
SEC_VOLTAGE_OFF);
 
-   /* Set GPIO direction */
-   cmd.args[0] = CMD_SET_GPIODIR;
-   cmd.args[1] = reg;
-   cmd.args[2] = reg;
+   /* Prepare a set GPIO logic level CMD */
+   cmd.args[0] = CMD_SET_GPIOOUT;
+   cmd.args[2] = reg; /* mask */
cmd.len = 3;
-   ret = cx24117_cmd_execute(fe, cmd);
-   if (ret)
-   return ret;
 
if ((voltage == SEC_VOLTAGE_13) ||
(voltage == SEC_VOLTAGE_18)) {
-   /* Set GPIO logic level */
-   cmd.args[0] = CMD_SET_GPIOOUT;
+   /* power on LNB */
cmd.args[1] = reg;
-   cmd.args[2] = reg;
-   cmd.len = 3;
ret = cx24117_cmd_execute(fe, cmd);
if (ret != 0)
return ret;
@@ -949,17 +942,17 @@ static int cx24117_set_voltage(struct dvb_frontend *fe,
cmd.args[1] = state-demod ? 0 : 1;
cmd.args[2] = (voltage == SEC_VOLTAGE_18 ? 0x01 : 0x00);
cmd.len = 3;
+   ret = cx24117_cmd_execute(fe, cmd);
 
/* Min delay time before DiSEqC send */
msleep(20);
} else {
-   cmd.args[0] = CMD_SET_GPIOOUT;
+   /* power off LNB */
cmd.args[1] = 0x00;
-   cmd.args[2] = reg;
-   cmd.len = 3;
+   ret = cx24117_cmd_execute(fe, cmd);
}
 
-   return cx24117_cmd_execute(fe, cmd);
+   return ret;
 }
 
 static int cx24117_set_tone(struct dvb_frontend *fe,
@@ -1277,6 +1270,16 @@ static int cx24117_initfe(struct dvb_frontend *fe)
cmd.args[2] = CX24117_OCC;
cmd.len = 3;
ret = cx24117_cmd_execute_nolock(fe, cmd);
+   if (ret != 0)
+   goto exit;
+
+   /* Set GPIO direction */
+   /* Set as output - controls LNB power on/off */
+   cmd.args[0] = CMD_SET_GPIODIR;
+   cmd.args[1] = 0x30;
+   cmd.args[2] = 0x30;
+   cmd.len = 3;
+   ret = cx24117_cmd_execute_nolock(fe, cmd);
 
 exit:
mutex_unlock(state-priv-fe_lock);
-- 
1.8.3.2

--
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


[PATCHv3 2/8] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.

2013-11-12 Thread Denis Carikli
That new macro is needed by the imx_drm staging driver
  for supporting the QVGA display of the eukrea-cpuimx51 board.

Cc: Rob Herring rob.herr...@calxeda.com
Cc: Pawel Moll pawel.m...@arm.com
Cc: Mark Rutland mark.rutl...@arm.com
Cc: Stephen Warren swar...@wwwdotorg.org
Cc: Ian Campbell ijc+devicet...@hellion.org.uk
Cc: devicet...@vger.kernel.org
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
Cc: driverdev-de...@linuxdriverproject.org
Cc: David Airlie airl...@linux.ie
Cc: dri-de...@lists.freedesktop.org
Cc: Mauro Carvalho Chehab m.che...@samsung.com
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
Cc: linux-media@vger.kernel.org
Cc: Sascha Hauer ker...@pengutronix.de
Cc: Shawn Guo shawn@linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: Eric Bénard e...@eukrea.com
Signed-off-by: Denis Carikli de...@eukrea.com
Acked-by: Mauro Carvalho Chehab m.che...@samsung.com
---
ChangeLog v2-v3:
- Added some interested people in the Cc list.
- Added Mauro Carvalho Chehab's Ack.
- Added documentation.
---
 .../DocBook/media/v4l/pixfmt-packed-rgb.xml|   78 
 include/uapi/linux/videodev2.h |1 +
 2 files changed, 79 insertions(+)

diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml 
b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
index 166c8d6..f6a3e84 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
@@ -279,6 +279,45 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entry/entry
entry/entry
  /row
+ row id=V4L2-PIX-FMT-RGB666
+   entryconstantV4L2_PIX_FMT_RGB666/constant/entry
+   entry'RGBH'/entry
+   entry/entry
+   entryrsubscript5/subscript/entry
+   entryrsubscript4/subscript/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+   entrygsubscript5/subscript/entry
+   entrygsubscript4/subscript/entry
+   entry/entry
+   entrygsubscript3/subscript/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript5/subscript/entry
+   entrybsubscript4/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entry/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+ /row
  row id=V4L2-PIX-FMT-BGR24
entryconstantV4L2_PIX_FMT_BGR24/constant/entry
entry'BGR3'/entry
@@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref
entry/entry
entry/entry
  /row
+ row!-- id=V4L2-PIX-FMT-RGB666 --
+   entryconstantV4L2_PIX_FMT_RGB666/constant/entry
+   entry'RGBH'/entry
+   entry/entry
+   entryrsubscript5/subscript/entry
+   entryrsubscript4/subscript/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+   entrygsubscript5/subscript/entry
+   entrygsubscript4/subscript/entry
+   entry/entry
+   entrygsubscript3/subscript/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript5/subscript/entry
+   entrybsubscript4/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entry/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+ /row
  row!-- id=V4L2-PIX-FMT-BGR24 --
entryconstantV4L2_PIX_FMT_BGR24/constant/entry
entry'BGR3'/entry
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 437f1b0..e8ff410 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -294,6 +294,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_RGB555X 

[PATCHv3 4/8] staging: imx-drm: Add RGB666 support for parallel display.

2013-11-12 Thread Denis Carikli
Cc: Rob Herring rob.herr...@calxeda.com
Cc: Pawel Moll pawel.m...@arm.com
Cc: Mark Rutland mark.rutl...@arm.com
Cc: Stephen Warren swar...@wwwdotorg.org
Cc: Ian Campbell ijc+devicet...@hellion.org.uk
Cc: devicet...@vger.kernel.org
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
Cc: driverdev-de...@linuxdriverproject.org
Cc: David Airlie airl...@linux.ie
Cc: dri-de...@lists.freedesktop.org
Cc: Mauro Carvalho Chehab m.che...@samsung.com
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
Cc: linux-media@vger.kernel.org
Cc: Sascha Hauer ker...@pengutronix.de
Cc: Shawn Guo shawn@linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: Eric Bénard e...@eukrea.com
Signed-off-by: Denis Carikli de...@eukrea.com
---
ChangeLog v2-v3:
- Added some interested people in the Cc list.
- Removed the commit message long desciption that was just a copy of the short
  description.
- Rebased the patch.
- Fixed a copy-paste error in the ipu_dc_map_clear parameter.
---
 .../bindings/staging/imx-drm/fsl-imx-drm.txt   |2 +-
 drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 +
 drivers/staging/imx-drm/parallel-display.c |2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt 
b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
index b876d49..2d24425 100644
--- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
+++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
@@ -29,7 +29,7 @@ Required properties:
 - crtc: the crtc this display is connected to, see below
 Optional properties:
 - interface_pix_fmt: How this display is connected to the
-  crtc. Currently supported types: rgb24, rgb565, bgr666
+  crtc. Currently supported types: rgb24, rgb565, bgr666, rgb666
 - edid: verbatim EDID data block describing attached display.
 - ddc: phandle describing the i2c bus handling the display data
   channel
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c 
b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
index d0e3bc3..bcc7680 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
@@ -92,6 +92,7 @@ enum ipu_dc_map {
IPU_DC_MAP_GBR24, /* TVEv2 */
IPU_DC_MAP_BGR666,
IPU_DC_MAP_BGR24,
+   IPU_DC_MAP_RGB666,
 };
 
 struct ipu_dc {
@@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
return IPU_DC_MAP_BGR666;
case V4L2_PIX_FMT_BGR24:
return IPU_DC_MAP_BGR24;
+   case V4L2_PIX_FMT_RGB666:
+   return IPU_DC_MAP_RGB666;
default:
return -EINVAL;
}
@@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */
 
+   /* rgb666 */
+   ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666);
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */
+
return 0;
 }
 
diff --git a/drivers/staging/imx-drm/parallel-display.c 
b/drivers/staging/imx-drm/parallel-display.c
index 24aa9be..bb71d6d 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -222,6 +222,8 @@ static int imx_pd_probe(struct platform_device *pdev)
imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565;
else if (!strcmp(fmt, bgr666))
imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666;
+   else if (!strcmp(fmt, rgb666))
+   imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666;
}
 
imxpd-dev = pdev-dev;
-- 
1.7.9.5

--
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 0/3] media: Add SH-Mobile RCAR-H2 Lager board support

2013-11-12 Thread Valentine

On 11/12/2013 03:42 AM, Laurent Pinchart wrote:

Hi Valentine,

On Tuesday 24 September 2013 17:38:33 Valentine Barshak wrote:

The following patches add ADV7611/ADV7612 HDMI receiver I2C driver
and add RCAR H2 SOC support along with ADV761x output format support
to rcar_vin soc_camera driver.

These changes are needed for SH-Mobile R8A7790 Lager board
video input support.


Do you plan to submit a v2 ? I need the ADV761x driver pretty soon and I'd
like to avoid submitting a competing patch :-)


Yes, I plan to submit v2 when it's ready.
Currently it's a work in progress.

Do you already have anything to submit for the ADV761x support?

Thanks,
Val.
--
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 0/3] media: Add SH-Mobile RCAR-H2 Lager board support

2013-11-12 Thread Laurent Pinchart
Hi Valentine,

On Wednesday 13 November 2013 00:34:04 Valentine wrote:
 On 11/12/2013 03:42 AM, Laurent Pinchart wrote:
  On Tuesday 24 September 2013 17:38:33 Valentine Barshak wrote:
  The following patches add ADV7611/ADV7612 HDMI receiver I2C driver
  and add RCAR H2 SOC support along with ADV761x output format support
  to rcar_vin soc_camera driver.
  
  These changes are needed for SH-Mobile R8A7790 Lager board
  video input support.
  
  Do you plan to submit a v2 ? I need the ADV761x driver pretty soon and I'd
  like to avoid submitting a competing patch :-)
 
 Yes, I plan to submit v2 when it's ready.
 Currently it's a work in progress.
 
 Do you already have anything to submit for the ADV761x support?

Not yet, but I will likely work on it in the next few days.

-- 
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: [PATCHv3 2/8] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.

2013-11-12 Thread Laurent Pinchart
Hi Denis,

(Dropping the DT reviewers from the CC list to avoid spamming them)

Thank you for the patch.

On Tuesday 12 November 2013 17:49:19 Denis Carikli wrote:
 That new macro is needed by the imx_drm staging driver
   for supporting the QVGA display of the eukrea-cpuimx51 board.
 
 Cc: Rob Herring rob.herr...@calxeda.com
 Cc: Pawel Moll pawel.m...@arm.com
 Cc: Mark Rutland mark.rutl...@arm.com
 Cc: Stephen Warren swar...@wwwdotorg.org
 Cc: Ian Campbell ijc+devicet...@hellion.org.uk
 Cc: devicet...@vger.kernel.org
 Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
 Cc: driverdev-de...@linuxdriverproject.org
 Cc: David Airlie airl...@linux.ie
 Cc: dri-de...@lists.freedesktop.org
 Cc: Mauro Carvalho Chehab m.che...@samsung.com
 Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
 Cc: linux-media@vger.kernel.org
 Cc: Sascha Hauer ker...@pengutronix.de
 Cc: Shawn Guo shawn@linaro.org
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: Eric Bénard e...@eukrea.com
 Signed-off-by: Denis Carikli de...@eukrea.com
 Acked-by: Mauro Carvalho Chehab m.che...@samsung.com

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

 ---
 ChangeLog v2-v3:
 - Added some interested people in the Cc list.
 - Added Mauro Carvalho Chehab's Ack.
 - Added documentation.
 ---
  .../DocBook/media/v4l/pixfmt-packed-rgb.xml|   78
  include/uapi/linux/videodev2.h |  
  1 +
  2 files changed, 79 insertions(+)
 
 diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
 b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index
 166c8d6..f6a3e84 100644
 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
 +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
 @@ -279,6 +279,45 @@ colorspace
 constantV4L2_COLORSPACE_SRGB/constant./para entry/entry
   entry/entry
 /row
 +   row id=V4L2-PIX-FMT-RGB666
 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry
 + entry'RGBH'/entry
 + entry/entry
 + entryrsubscript5/subscript/entry
 + entryrsubscript4/subscript/entry
 + entryrsubscript3/subscript/entry
 + entryrsubscript2/subscript/entry
 + entryrsubscript1/subscript/entry
 + entryrsubscript0/subscript/entry
 + entrygsubscript5/subscript/entry
 + entrygsubscript4/subscript/entry
 + entry/entry
 + entrygsubscript3/subscript/entry
 + entrygsubscript2/subscript/entry
 + entrygsubscript1/subscript/entry
 + entrygsubscript0/subscript/entry
 + entrybsubscript5/subscript/entry
 + entrybsubscript4/subscript/entry
 + entrybsubscript3/subscript/entry
 + entrybsubscript2/subscript/entry
 + entry/entry
 + entrybsubscript1/subscript/entry
 + entrybsubscript0/subscript/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 +   /row
 row id=V4L2-PIX-FMT-BGR24
   entryconstantV4L2_PIX_FMT_BGR24/constant/entry
   entry'BGR3'/entry
 @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in
 xref entry/entry
   entry/entry
 /row
 +   row!-- id=V4L2-PIX-FMT-RGB666 --
 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry
 + entry'RGBH'/entry
 + entry/entry
 + entryrsubscript5/subscript/entry
 + entryrsubscript4/subscript/entry
 + entryrsubscript3/subscript/entry
 + entryrsubscript2/subscript/entry
 + entryrsubscript1/subscript/entry
 + entryrsubscript0/subscript/entry
 + entrygsubscript5/subscript/entry
 + entrygsubscript4/subscript/entry
 + entry/entry
 + entrygsubscript3/subscript/entry
 + entrygsubscript2/subscript/entry
 + entrygsubscript1/subscript/entry
 + entrygsubscript0/subscript/entry
 + entrybsubscript5/subscript/entry
 + entrybsubscript4/subscript/entry
 + entrybsubscript3/subscript/entry
 + entrybsubscript2/subscript/entry
 + entry/entry
 + entrybsubscript1/subscript/entry
 + entrybsubscript0/subscript/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 + entry/entry
 +   /row
 row!-- id=V4L2-PIX-FMT-BGR24 --
   entryconstantV4L2_PIX_FMT_BGR24/constant/entry
   entry'BGR3'/entry
 diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
 index 437f1b0..e8ff410 

cron job: media_tree daily build: ABI WARNING

2013-11-12 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Wed Nov 13 04:00:21 CET 2013
git branch: test
git hash:   80f93c7b0f4599ffbdac8d964ecd1162b8b618b9
gcc version:i686-linux-gcc (GCC) 4.8.1
sparse version: 0.4.5-rc1
host hardware:  x86_64
host os:3.12-0.slh.1-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.31.14-i686: OK
linux-2.6.32.27-i686: OK
linux-2.6.33.7-i686: OK
linux-2.6.34.7-i686: OK
linux-2.6.35.9-i686: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12-i686: OK
linux-2.6.31.14-x86_64: OK
linux-2.6.32.27-x86_64: OK
linux-2.6.33.7-x86_64: OK
linux-2.6.34.7-x86_64: OK
linux-2.6.35.9-x86_64: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12-x86_64: OK
apps: WARNINGS
spec-git: OK
ABI WARNING: change for arm-at91
ABI WARNING: change for arm-davinci
ABI WARNING: change for arm-exynos
ABI WARNING: change for arm-mx
ABI WARNING: change for arm-omap
ABI WARNING: change for arm-omap1
ABI WARNING: change for arm-pxa
ABI WARNING: change for blackfin
ABI WARNING: change for i686
ABI WARNING: change for m32r
ABI WARNING: change for mips
ABI WARNING: change for powerpc64
ABI WARNING: change for sh
ABI WARNING: change for x86_64
sparse version: 0.4.5-rc1
sparse: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
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: cron job: media_tree daily build: ABI WARNING

2013-11-12 Thread Hans Verkuil
On 11/13/2013 04:32 AM, Hans Verkuil wrote:
 This message is generated daily by a cron job that builds media_tree for
 the kernels and architectures in the list below.
 
 Results of the daily build of media_tree:
 
 date: Wed Nov 13 04:00:21 CET 2013
 git branch:   test
 git hash: 80f93c7b0f4599ffbdac8d964ecd1162b8b618b9
 gcc version:  i686-linux-gcc (GCC) 4.8.1
 sparse version:   0.4.5-rc1
 host hardware:x86_64
 host os:  3.12-0.slh.1-amd64
 
 linux-git-arm-at91: OK
 linux-git-arm-davinci: OK
 linux-git-arm-exynos: OK
 linux-git-arm-mx: OK
 linux-git-arm-omap: OK
 linux-git-arm-omap1: OK
 linux-git-arm-pxa: OK
 linux-git-blackfin: OK
 linux-git-i686: OK
 linux-git-m32r: OK
 linux-git-mips: OK
 linux-git-powerpc64: OK
 linux-git-sh: OK
 linux-git-x86_64: OK
 linux-2.6.31.14-i686: OK
 linux-2.6.32.27-i686: OK
 linux-2.6.33.7-i686: OK
 linux-2.6.34.7-i686: OK
 linux-2.6.35.9-i686: OK
 linux-2.6.36.4-i686: OK
 linux-2.6.37.6-i686: OK
 linux-2.6.38.8-i686: OK
 linux-2.6.39.4-i686: OK
 linux-3.0.60-i686: OK
 linux-3.1.10-i686: OK
 linux-3.2.37-i686: OK
 linux-3.3.8-i686: OK
 linux-3.4.27-i686: OK
 linux-3.5.7-i686: OK
 linux-3.6.11-i686: OK
 linux-3.7.4-i686: OK
 linux-3.8-i686: OK
 linux-3.9.2-i686: OK
 linux-3.10.1-i686: OK
 linux-3.11.1-i686: OK
 linux-3.12-i686: OK
 linux-2.6.31.14-x86_64: OK
 linux-2.6.32.27-x86_64: OK
 linux-2.6.33.7-x86_64: OK
 linux-2.6.34.7-x86_64: OK
 linux-2.6.35.9-x86_64: OK
 linux-2.6.36.4-x86_64: OK
 linux-2.6.37.6-x86_64: OK
 linux-2.6.38.8-x86_64: OK
 linux-2.6.39.4-x86_64: OK
 linux-3.0.60-x86_64: OK
 linux-3.1.10-x86_64: OK
 linux-3.2.37-x86_64: OK
 linux-3.3.8-x86_64: OK
 linux-3.4.27-x86_64: OK
 linux-3.5.7-x86_64: OK
 linux-3.6.11-x86_64: OK
 linux-3.7.4-x86_64: OK
 linux-3.8-x86_64: OK
 linux-3.9.2-x86_64: OK
 linux-3.10.1-x86_64: OK
 linux-3.11.1-x86_64: OK
 linux-3.12-x86_64: OK
 apps: WARNINGS
 spec-git: OK
 ABI WARNING: change for arm-at91
 ABI WARNING: change for arm-davinci
 ABI WARNING: change for arm-exynos
 ABI WARNING: change for arm-mx
 ABI WARNING: change for arm-omap
 ABI WARNING: change for arm-omap1
 ABI WARNING: change for arm-pxa
 ABI WARNING: change for blackfin
 ABI WARNING: change for i686
 ABI WARNING: change for m32r
 ABI WARNING: change for mips
 ABI WARNING: change for powerpc64
 ABI WARNING: change for sh
 ABI WARNING: change for x86_64

Ignore these warnings, they are caused by problems with 'sort'. Depending on
whether I ran the build manually or from cron the LANG setting was different,
leading to different sort results. I now set LANG explicitly in my build
script, so hopefully these false warnings will disappear during the next build.

For the longest time I couldn't understand why sort would give different results
until I had an early morning eureka moment today :-)

Regards,

Hans

 sparse version:   0.4.5-rc1
 sparse: ERRORS
 
 Detailed results are available here:
 
 http://www.xs4all.nl/~hverkuil/logs/Wednesday.log
 
 Full logs are available here:
 
 http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2
 
 The Media Infrastructure API from this daily build is here:
 
 http://www.xs4all.nl/~hverkuil/spec/media.html
 --
 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
 

--
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