Jenkins build is back to normal : media-build #47

2019-08-14 Thread jenkins
See 




Re: [PATCH v3] media: imx: mipi csi-2: Don't fail if initial state times-out

2019-08-14 Thread Sakari Ailus
Hi Steve,

On Tue, Aug 13, 2019 at 04:27:06PM -0700, Steve Longerbeam wrote:
> Hi Sakari,
> 
> On 8/13/19 1:28 AM, Sakari Ailus wrote:
> > Hi Steve,
> > 
> > On Thu, Aug 08, 2019 at 11:02:29AM -0700, Steve Longerbeam wrote:
> > > 
> > > On 8/8/19 1:53 AM, Philipp Zabel wrote:
> > > > Hi Sakari,
> > > > 
> > > > On Thu, 2019-08-08 at 11:26 +0300, Sakari Ailus wrote:
> > > > [...]
> > > > > > > Have you checked how it works if you simply leave out this test?
> > > > Whether this works or not depends on the sensor used, and for some
> > > > sensor/drivers may depend on timing (or random factors influencing it).
> > > > See below.
> > > > 
> > > > [...]
> > > > > Some devices can be commanded to enter LP-11 state but some will just
> > > > > briefly visit that state. The LP-11 state is mandatory but software 
> > > > > should
> > > > > not be involved in detecting it if at all possible.
> > > > This is a good point. Devices that can be set to LP-11 state
> > > > immediately, but that don't stay there long enough (either because they
> > > > wait for less than the required by spec 100µs, or because system load
> > > > causes this check to be executed too late) may end up working reliably
> > > > even though the warning fires.
> > > > > So if the hardware does not require further initialisation to be done 
> > > > > in
> > > > > LP-11 state, you should remove the check.
> > > > > 
> > > > > > We had to fix at least OV5645 and OV5640 recently because of this,
> > > > > > and I can imagine more drivers will have the same issue.
> > > > > This is actually an issue in the IMX driver (or hardware), not in the
> > > > > sensor driver. It may be that sometimes it's easier to work around it 
> > > > > in
> > > > > the sensor driver.
> > > > > 
> > > > > So, I'd like to know whether the check itself is a driver bug, or 
> > > > > something
> > > > > that the hardware requires. The fact that you're sending this patch
> > > > > suggests the former.
> > > > This is something that the hardware requires, according to the reference
> > > > manual. See the comment in drivers/staging/media/imx/imx6-mipi-csi2.c,
> > > > especially step 5.:
> > > > 
> > > > /*
> > > >    * The required sequence of MIPI CSI-2 startup as specified in the 
> > > > i.MX6
> > > >    * reference manual is as follows:
> > > >    *
> > > >    * 1. Deassert presetn signal (global reset).
> > > >    *It's not clear what this "global reset" signal is (maybe APB
> > > >    *global reset), but in any case this step would be probably
> > > >    *be carried out during driver load in csi2_probe().
> > > >    *
> > > >    * 2. Configure MIPI Camera Sensor to put all Tx lanes in LP-11 state.
> > > >    *This must be carried out by the MIPI sensor's s_power(ON) 
> > > > subdev
> > > >    *op.
> > > >    *
> > > >    * 3. D-PHY initialization.
> > > >    * 4. CSI2 Controller programming (Set N_LANES, deassert 
> > > > PHY_SHUTDOWNZ,
> > > >    *deassert PHY_RSTZ, deassert CSI2_RESETN).
> > > >    * 5. Read the PHY status register (PHY_STATE) to confirm that all 
> > > > data and
> > > >    *clock lanes of the D-PHY are in LP-11 state.
> > > >    * 6. Configure the MIPI Camera Sensor to start transmitting a clock 
> > > > on the
> > > >    *D-PHY clock lane.
> > > >    * 7. CSI2 Controller programming - Read the PHY status register 
> > > > (PHY_STATE)
> > > >    *to confirm that the D-PHY is receiving a clock on the D-PHY 
> > > > clock lane.
> > > >*/
> > > > 
> > > > I read this as the hardware needing to see the LP-11 -> HS transition
> > > > after the DPHY reset has been released, and before the CSI2 RX
> > > > controller is programmed.
> > > I think that's a fair assumption, and there's another paragraph at the end
> > > of that comment above that adds more evidence to that:
> > > 
> > > ...
> > > * All steps 3 through 7 are carried out by csi2_s_stream(ON) here. Step
> > > * 6 is accomplished by calling the source subdev's s_stream(ON) between
> > > * steps 5 and 7.
> > > */
> > > 
> > > 
> > > So the driver is expecting that the LP-11 state persists until step 6, at
> > > which the LP-11 -> HS transition occurs when streaming is started at the
> > > transmitter.
> > > 
> > > But if the transmitter only stays in LP-11 state for the minimum 100 usec
> > > after it is powered on, and then _automatically_ transitions to HS, it's
> > > quite possible the LP-11 -> HS transition will happen long before the DPHY
> > > is taken out of reset. That's because the transmitter's s_power(ON) is
> > > called when the capture device is opened (via v4l2_pipeline_pm_use()), but
> > > the steps above are carried out when streaming starts, so userland would
> > > have to issue VIDIOC_STREAMON well within the 100 usec expires after
> > > open()'ing the device, for the receiver hardware to see the transition.
> > After powering on the sensor it sensor should stay in (software) standby
> > mode until streaming is started. It

[GIT PULL FOR v5.4] RC & DVB

2019-08-14 Thread Sean Young
Hi Mauro,

Another batch of patches. 

Thanks,

Sean

The following changes since commit 0dc99e042a4cfbc1e27572d523d2a1dbaf402cbf:

  media: MAINTAINERS: Remove zoran driver (2019-08-13 11:55:34 -0300)

are available in the Git repository at:

  git://linuxtv.org/syoung/media_tree.git tags/v5.4c

for you to fetch changes up to 782079130b459fccaa1eddf7630d9694a0de2b69:

  media: rc: imon: Allow iMON RC protocol for ffdc 7e device (2019-08-14 
08:18:19 +0100)


Colin Ian King (1):
  media: stv0900_core: remove redundant assignment to variables mclk, div 
and ad_div

Darius Rad (1):
  media: rc: imon: Allow iMON RC protocol for ffdc 7e device

Fuqian Huang (3):
  media/usb: Use kmemdup rather than duplicating its implementation
  media/tuners: Use kmemdup rather than duplicating its implementation
  media/dvb: Use kmemdup rather than duplicating its implementation

Luke Nowakowski-Krijger (1):
  media: dvb_frontend.h: Fix shifting signed 32-bit value problem

Masahiro Yamada (1):
  media: rc: add include guard to rc-map.h

Sean Young (6):
  media: imon_raw: simplify and explain bit operations
  media: imon_raw: prevent "nonsensical timing event of duration 0"
  selftests: ir: fix ir_loopback test failure
  media: em28xx: modules workqueue not inited for 2nd device
  media: rc: imon-rsc keymap has incorrect mappings
  media: tm6000: double free if usb disconnect while streaming

Wolfram Sang (1):
  media: ir-kbd-i2c: convert to i2c_new_dummy_device()

 drivers/media/dvb-core/dvbdev.c |  3 +-
 drivers/media/dvb-frontends/drx39xyj/drxj.c |  5 ++--
 drivers/media/dvb-frontends/stv0900_core.c  |  2 +-
 drivers/media/i2c/ir-kbd-i2c.c  | 11 
 drivers/media/rc/imon.c |  7 -
 drivers/media/rc/imon_raw.c | 43 +++--
 drivers/media/rc/keymaps/rc-imon-rsc.c  |  7 +++--
 drivers/media/tuners/tuner-xc2028.c |  3 +-
 drivers/media/tuners/xc4000.c   |  3 +-
 drivers/media/usb/em28xx/em28xx-cards.c |  4 +--
 drivers/media/usb/tm6000/tm6000-dvb.c   |  3 ++
 drivers/media/usb/zr364xx/zr364xx.c |  4 +--
 include/media/dvb_frontend.h| 21 +++---
 include/media/rc-map.h  |  5 
 tools/testing/selftests/ir/ir_loopback.c|  6 ++--
 15 files changed, 80 insertions(+), 47 deletions(-)


Re: [GIT PULL FOR v5.4] RC & DVB

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58121/
Build log: https://builder.linuxtv.org/job/patchwork/8398/
Build time: 00:14:29
Link: 
https://lore.kernel.org/linux-media/20190814073135.avafdlmfjml3c...@gofer.mess.orgSummary:
 1 issues, being 0 at build time

Error/warnings:

patches/0013-media-tm6000-double-free-if-usb-disconnect-while-str.patch:30: 
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per 
line)

Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary 
--strict patches/0013-media-tm6000-double-free-if-usb-disconnect-while-str.patch



PLEASE CONFIRM PURCHASE ORDER

2019-08-14 Thread Mr NARESH KUMAR
Could you please confirm if your recieved our purchase order last week.

If no please confirm let me resend it to you.




NARESH KUMAR

Executive Purchase Saiapextrading Ltd

Dubai, KSA.

(T/F): +96-2667-264 777 / 778

(Mo): +96 94284 02803

Website - http://www.saiapexgeneraltrading.com


Re: [ANN] Media summit in Lisbon at September

2019-08-14 Thread Alexandre Courbot
That could be nice. Of course something more informal is also fine.
Anyone else planning to attend? I suspect Laurent and people living in
France might be there?

On Mon, Aug 12, 2019 at 4:28 PM Hans Verkuil  wrote:
>
> On 8/12/19 6:00 AM, Alexandre Courbot wrote:
> > On Thu, Aug 8, 2019 at 9:55 PM Mauro Carvalho Chehab
> >  wrote:
> >>
> >> Em Thu, 1 Aug 2019 09:34:00 -0300
> >> Mauro Carvalho Chehab  escreveu:
> >>
> >>> Em Sun, 30 Jun 2019 13:44:04 -0300
> >>> Mauro Carvalho Chehab  escreveu:
> >>>
>  Hi all,
> 
>  We are organizing a media mini-summit in Lisbon to happen in September,
>  at the same week as the Linux Plumber Conference and the Kernel Summit.
> 
>  We're still discussing the details about that.
> >>>
> >>> Gently reminder.
> >>>
> >>> Right now, we have just one extra theme proposal from Sean:
> >>>
> >>>   - possible dvb improvements.
> >>>
> >>> If we don't have more proposals, we may end skipping the Media
> >>> Summit this year.
> >>
> >> It sounds that we won't have material to have a media summit this year.
> >> So, let's cancel the media summit this year.
> >
> > Loosely related, but are there people planning to go to ELCE on
> > 10/28-30? Tomasz and I may attend if there is a chance to discuss
> > libcamera/V4L2 codecs.
>
> I'll be there and if there is enough interest in setting up a meeting
> to discuss this, then I can ask the LF to set a room aside for us for,
> say, half a day or so.
>
> Regards,
>
> Hans


[GIT PULL for 5.4] More sensor driver, omap3isp and documentation patches

2019-08-14 Thread Sakari Ailus
Hi Mauro,

Here's a bunch of sensor driver, omap3isp and documentatino patches.
Noteworthy bit is perhaps a driver for the ov5675 sensor.

There are some checkpatch warnings there (patches 1, 6 and 8), the first
two seem false positives whereas the last one comes from the documentation
license header.

Please pull.


The following changes since commit 0dc99e042a4cfbc1e27572d523d2a1dbaf402cbf:

  media: MAINTAINERS: Remove zoran driver (2019-08-13 11:55:34 -0300)

are available in the Git repository at:

  ssh://linuxtv.org/git/sailus/media_tree.git tags/for-5.4-4-signed

for you to fetch changes up to 91a393dd12ba00d3916496a18ae3df090d2d351b:

  media: docs-rst: Clarify duration of LP-11 mode (2019-08-14 11:33:45 +0300)


Sensor driver stuff for 5.4


Ezequiel Garcia (1):
  media: i2c: ov5645: Fix power sequence

Luca Weiss (1):
  media: ov5640: Add support for flash and lens devices

Sakari Ailus (5):
  ov8856: Check reading clock frequency succeeded
  omap3isp: Set device on omap3isp subdevs
  omap3isp: Don't set streaming state on random subdevs
  v4l: Documentation: Serial busses use parallel mbus codes
  v4l: Documentation: Raw Bayer formats are not RGB formats

Shawn Tu (1):
  ov5675: Add support for OV5675 sensor

Steve Longerbeam (1):
  media: docs-rst: Clarify duration of LP-11 mode

 Documentation/media/kapi/csi2.rst  |   17 +-
 Documentation/media/uapi/v4l/control.rst   |2 +-
 Documentation/media/uapi/v4l/hist-v4l2.rst |2 +-
 Documentation/media/uapi/v4l/pixfmt-bayer.rst  |   38 +
 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 1306 
 Documentation/media/uapi/v4l/pixfmt-rgb.rst| 1302 ++-
 Documentation/media/uapi/v4l/pixfmt-v4l2.rst   |2 +-
 Documentation/media/uapi/v4l/pixfmt.rst|1 +
 Documentation/media/uapi/v4l/subdev-formats.rst|8 +
 MAINTAINERS|7 +
 drivers/media/i2c/Kconfig  |   13 +
 drivers/media/i2c/Makefile |1 +
 drivers/media/i2c/ov5640.c |2 +-
 drivers/media/i2c/ov5645.c |   26 +-
 drivers/media/i2c/ov5675.c | 1183 ++
 drivers/media/i2c/ov8856.c |5 +-
 drivers/media/platform/omap3isp/isp.c  |8 +
 drivers/media/platform/omap3isp/ispccdc.c  |1 +
 drivers/media/platform/omap3isp/ispccp2.c  |1 +
 drivers/media/platform/omap3isp/ispcsi2.c  |1 +
 drivers/media/platform/omap3isp/isppreview.c   |1 +
 drivers/media/platform/omap3isp/ispresizer.c   |1 +
 drivers/media/platform/omap3isp/ispstat.c  |2 +
 23 files changed, 2594 insertions(+), 1336 deletions(-)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-bayer.rst
 delete mode 100644 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst
 create mode 100644 drivers/media/i2c/ov5675.c

-- 
Sakari Ailus


Re: [GIT PULL for 5.4] More sensor driver, omap3isp and documentation

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58122/
Build log: https://builder.linuxtv.org/job/patchwork/8428/
Build time: 00:01:14
Link: 
https://lore.kernel.org/linux-media/20190814084317.gi2...@valkosipuli.retiisi.org.ukSummary:
 no issues


[PATCH v2] media: Fix various misspellings of disconnected

2019-08-14 Thread Geert Uytterhoeven
Fix typos.

Signed-off-by: Geert Uytterhoeven 
---
v2:
  - Merge "media: cx231xx: Spelling s/diconencted/diconnected/"
and "media: tm6000: Spelling s/diconencted/diconnected/",
  - Fix silly second spelling mistake in above,
  - Add fixes for more variants.
---
 drivers/media/usb/cx231xx/cx231xx-cards.c | 4 ++--
 drivers/media/usb/cx231xx/cx231xx-core.c  | 2 +-
 drivers/media/usb/cx231xx/cx231xx-video.c | 2 +-
 drivers/media/usb/em28xx/em28xx-video.c   | 2 +-
 drivers/media/usb/em28xx/em28xx.h | 2 +-
 drivers/media/usb/tm6000/tm6000-cards.c   | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c 
b/drivers/media/usb/cx231xx/cx231xx-cards.c
index e0d98ba8fdbfa829..e123e74c549ed57c 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -1351,7 +1351,7 @@ static void cx231xx_unregister_media_device(struct 
cx231xx *dev)
 /*
  * cx231xx_realease_resources()
  * unregisters the v4l2,i2c and usb devices
- * called when the device gets disconected or at module unload
+ * called when the device gets disconnected or at module unload
 */
 void cx231xx_release_resources(struct cx231xx *dev)
 {
@@ -1924,7 +1924,7 @@ static int cx231xx_usb_probe(struct usb_interface 
*interface,
 
 /*
  * cx231xx_usb_disconnect()
- * called when the device gets diconencted
+ * called when the device gets disconnected
  * video device will be unregistered on v4l2_close in case it is still open
  */
 static void cx231xx_usb_disconnect(struct usb_interface *interface)
diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c 
b/drivers/media/usb/cx231xx/cx231xx-core.c
index a749baadc1f12f04..982cb56e97e9641f 100644
--- a/drivers/media/usb/cx231xx/cx231xx-core.c
+++ b/drivers/media/usb/cx231xx/cx231xx-core.c
@@ -53,7 +53,7 @@ static DEFINE_MUTEX(cx231xx_devlist_mutex);
 /*
  * cx231xx_realease_resources()
  * unregisters the v4l2,i2c and usb devices
- * called when the device gets disconected or at module unload
+ * called when the device gets disconnected or at module unload
 */
 void cx231xx_remove_from_devlist(struct cx231xx *dev)
 {
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c 
b/drivers/media/usb/cx231xx/cx231xx-video.c
index c77597917ca18e54..9b51f07a729e4e94 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1837,7 +1837,7 @@ static int cx231xx_v4l2_open(struct file *filp)
 /*
  * cx231xx_realease_resources()
  * unregisters the v4l2,i2c and usb devices
- * called when the device gets disconected or at module unload
+ * called when the device gets disconnected or at module unload
 */
 void cx231xx_release_analog_resources(struct cx231xx *dev)
 {
diff --git a/drivers/media/usb/em28xx/em28xx-video.c 
b/drivers/media/usb/em28xx/em28xx-video.c
index fc6d37d76dc9282b..b0f7390e4b4f2ac6 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -2199,7 +2199,7 @@ static int em28xx_v4l2_open(struct file *filp)
 /*
  * em28xx_v4l2_fini()
  * unregisters the v4l2,i2c and usb devices
- * called when the device gets disconected or at module unload
+ * called when the device gets disconnected or at module unload
  */
 static int em28xx_v4l2_fini(struct em28xx *dev)
 {
diff --git a/drivers/media/usb/em28xx/em28xx.h 
b/drivers/media/usb/em28xx/em28xx.h
index c69e0bc46eb7d58b..c8bc59059a19e5d0 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -655,7 +655,7 @@ struct em28xx {
enum em28xx_chip_id chip_id;
 
unsigned int is_em25xx:1;   // em25xx/em276x/7x/8x family bridge
-   unsigned int disconnected:1;// device has been diconnected
+   unsigned int disconnected:1;// device has been disconnected
unsigned int has_video:1;
unsigned int is_audio_only:1;
unsigned int is_webcam:1;
diff --git a/drivers/media/usb/tm6000/tm6000-cards.c 
b/drivers/media/usb/tm6000/tm6000-cards.c
index 23df50aa0a4af6da..5358cd8c46030837 100644
--- a/drivers/media/usb/tm6000/tm6000-cards.c
+++ b/drivers/media/usb/tm6000/tm6000-cards.c
@@ -1328,7 +1328,7 @@ static int tm6000_usb_probe(struct usb_interface 
*interface,
 
 /*
  * tm6000_usb_disconnect()
- * called when the device gets diconencted
+ * called when the device gets disconnected
  * video device will be unregistered on v4l2_close in case it is still open
  */
 static void tm6000_usb_disconnect(struct usb_interface *interface)
-- 
2.17.1



Re: [GIT PULL for 5.4] More sensor driver, omap3isp and documentation

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58122/
Build log: https://builder.linuxtv.org/job/patchwork/8455/
Build time: 00:00:00
Link: 
https://lore.kernel.org/linux-media/20190814084317.gi2...@valkosipuli.retiisi.org.uk

FAILED: can't fetch patches from 0dc99e042a4cfbc1e27572d523d2a1dbaf402cbf to 
91a393dd12ba00d3916496a18ae3df090d2d351b


Re: [ANN] Media summit in Lisbon at September

2019-08-14 Thread Laurent Pinchart
On Wed, Aug 14, 2019 at 05:35:48PM +0900, Alexandre Courbot wrote:
> That could be nice. Of course something more informal is also fine.
> Anyone else planning to attend? I suspect Laurent and people living in
> France might be there?

I will, and so should the whole libcamera team.

> On Mon, Aug 12, 2019 at 4:28 PM Hans Verkuil wrote:
> > On 8/12/19 6:00 AM, Alexandre Courbot wrote:
> > > On Thu, Aug 8, 2019 at 9:55 PM Mauro Carvalho Chehab wrote:
> > >> Em Thu, 1 Aug 2019 09:34:00 -0300 Mauro Carvalho Chehab escreveu:
> > >>> Em Sun, 30 Jun 2019 13:44:04 -0300 Mauro Carvalho Chehab escreveu:
> > >>>
> >  Hi all,
> > 
> >  We are organizing a media mini-summit in Lisbon to happen in September,
> >  at the same week as the Linux Plumber Conference and the Kernel Summit.
> > 
> >  We're still discussing the details about that.
> > >>>
> > >>> Gently reminder.
> > >>>
> > >>> Right now, we have just one extra theme proposal from Sean:
> > >>>
> > >>>   - possible dvb improvements.
> > >>>
> > >>> If we don't have more proposals, we may end skipping the Media
> > >>> Summit this year.
> > >>
> > >> It sounds that we won't have material to have a media summit this year.
> > >> So, let's cancel the media summit this year.
> > >
> > > Loosely related, but are there people planning to go to ELCE on
> > > 10/28-30? Tomasz and I may attend if there is a chance to discuss
> > > libcamera/V4L2 codecs.
> >
> > I'll be there and if there is enough interest in setting up a meeting
> > to discuss this, then I can ask the LF to set a room aside for us for,
> > say, half a day or so.

-- 
Regards,

Laurent Pinchart


Re: [PATCH v3 1/3] ARM: dts: imx6ul: Add csi node

2019-08-14 Thread Sakari Ailus
Hi Sébastien,

On Wed, Jul 31, 2019 at 06:32:57PM +0200, Sébastien Szymanski wrote:
> Add csi node for i.MX6UL SoC.
> 
> Reviewed-by: Fabio Estevam 
> Signed-off-by: Sébastien Szymanski 

This should be probably merged through the ARM tree.

I can take the other two.

> ---
> 
> Changes for v3:
>  - none
> 
> Changes for v2:
>  - only "mclk" clock is required now.
> 
>  arch/arm/boot/dts/imx6ul.dtsi | 9 +
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts/imx6ul.dtsi
> index 81d4b4925127..56cfcf0e5084 100644
> --- a/arch/arm/boot/dts/imx6ul.dtsi
> +++ b/arch/arm/boot/dts/imx6ul.dtsi
> @@ -957,6 +957,15 @@
>   };
>   };
>  
> + csi: csi@21c4000 {
> + compatible = "fsl,imx6ul-csi", "fsl,imx7-csi";
> + reg = <0x021c4000 0x4000>;
> + interrupts = ;
> + clocks = <&clks IMX6UL_CLK_CSI>;
> + clock-names = "mclk";
> + status = "disabled";
> + };
> +
>   lcdif: lcdif@21c8000 {
>   compatible = "fsl,imx6ul-lcdif", 
> "fsl,imx28-lcdif";
>   reg = <0x021c8000 0x4000>;

-- 
Sakari Ailus


[PATCH 1/1] MAINTAINERS: Add entry for the ov5670 driver

2019-08-14 Thread Sakari Ailus
The ov5670 driver didn't get a MAINTAINERS entry when it was merged. Add
one now.

Signed-off-by: Sakari Ailus 
---
 MAINTAINERS | 8 
 1 file changed, 8 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 74c51fe3f25c..69d3fa86cf18 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11846,6 +11846,14 @@ T: git git://linuxtv.org/media_tree.git
 S: Maintained
 F: drivers/media/i2c/ov5647.c
 
+OMNIVISION OV5670 SENSOR DRIVER
+M: Chiranjeevi Rapolu 
+M: Hyungwoo Yang 
+L: linux-media@vger.kernel.org
+T: git git://linuxtv.org/media_tree.git
+S: Maintained
+F: drivers/media/i2c/ov5670.c
+
 OMNIVISION OV5675 SENSOR DRIVER
 M: Shawn Tu 
 L: linux-media@vger.kernel.org
-- 
2.20.1



[GIT PULL v2 for 5.4] More sensor driver, omap3isp and documentation patches

2019-08-14 Thread Sakari Ailus
Hi Mauro,

Here's a bunch of sensor driver, omap3isp and documentatino patches.
Noteworthy bit is perhaps a driver for the ov5675 sensor.

There are some checkpatch warnings there (patches 1, 6 and 8), the first
two seem false positives whereas the last one comes from the documentation
license header.

I've since v1 added a few more patches; IMX driver improvements as well as
a MAINTAINERS entry for ov5670.

Please pull.


The following changes since commit 0dc99e042a4cfbc1e27572d523d2a1dbaf402cbf:

  media: MAINTAINERS: Remove zoran driver (2019-08-13 11:55:34 -0300)

are available in the Git repository at:

  git://linuxtv.org/sailus/media_tree.git tags/for-5.4-6-signed

for you to fetch changes up to 852a51507ac865d7fbbf1305e2f485e7a4131b95:

  MAINTAINERS: Add entry for the ov5670 driver (2019-08-14 12:59:16 +0300)


Camera driver + framework patches for 5.4


Ezequiel Garcia (2):
  media: i2c: ov5645: Fix power sequence
  media: imx: mipi csi-2: Don't fail if initial state times-out

Luca Weiss (1):
  media: ov5640: Add support for flash and lens devices

Sakari Ailus (6):
  ov8856: Check reading clock frequency succeeded
  omap3isp: Set device on omap3isp subdevs
  omap3isp: Don't set streaming state on random subdevs
  v4l: Documentation: Serial busses use parallel mbus codes
  v4l: Documentation: Raw Bayer formats are not RGB formats
  MAINTAINERS: Add entry for the ov5670 driver

Shawn Tu (1):
  ov5675: Add support for OV5675 sensor

Steve Longerbeam (1):
  media: docs-rst: Clarify duration of LP-11 mode

Sébastien Szymanski (2):
  media: dt-bindings: imx7-csi: add i.MX6UL/L support
  media: imx7-media-csi: add i.MX6UL support

 .../devicetree/bindings/media/imx7-csi.txt |2 +-
 Documentation/media/kapi/csi2.rst  |   17 +-
 Documentation/media/uapi/v4l/control.rst   |2 +-
 Documentation/media/uapi/v4l/hist-v4l2.rst |2 +-
 Documentation/media/uapi/v4l/pixfmt-bayer.rst  |   38 +
 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 1306 
 Documentation/media/uapi/v4l/pixfmt-rgb.rst| 1302 ++-
 Documentation/media/uapi/v4l/pixfmt-v4l2.rst   |2 +-
 Documentation/media/uapi/v4l/pixfmt.rst|1 +
 Documentation/media/uapi/v4l/subdev-formats.rst|8 +
 MAINTAINERS|   15 +
 drivers/media/i2c/Kconfig  |   13 +
 drivers/media/i2c/Makefile |1 +
 drivers/media/i2c/ov5640.c |2 +-
 drivers/media/i2c/ov5645.c |   26 +-
 drivers/media/i2c/ov5675.c | 1183 ++
 drivers/media/i2c/ov8856.c |5 +-
 drivers/media/platform/omap3isp/isp.c  |8 +
 drivers/media/platform/omap3isp/ispccdc.c  |1 +
 drivers/media/platform/omap3isp/ispccp2.c  |1 +
 drivers/media/platform/omap3isp/ispcsi2.c  |1 +
 drivers/media/platform/omap3isp/isppreview.c   |1 +
 drivers/media/platform/omap3isp/ispresizer.c   |1 +
 drivers/media/platform/omap3isp/ispstat.c  |2 +
 drivers/staging/media/imx/Kconfig  |4 +-
 drivers/staging/media/imx/imx6-mipi-csi2.c |   12 +-
 drivers/staging/media/imx/imx7-media-csi.c |   30 +-
 27 files changed, 2630 insertions(+), 1356 deletions(-)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-bayer.rst
 delete mode 100644 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst
 create mode 100644 drivers/media/i2c/ov5675.c

-- 
Sakari Ailus


Re: [GIT PULL v2 for 5.4] More sensor driver, omap3isp and documentation

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58128/
Build log: https://builder.linuxtv.org/job/patchwork/8485/
Build time: 00:09:49
Link: 
https://lore.kernel.org/linux-media/20190814103251.ga3...@valkosipuli.retiisi.org.uk
Summary: 3 issues, being 0 at build time

gpg: Signature made Wed 14 Aug 2019 10:10:12 AM UTC
gpg:using DSA key F0D0377A0D4F25A79238EFE56D40361B6E28C193
gpg:issuer "sakari.ai...@linux.intel.com"
gpg: Good signature from "Sakari Ailus " [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:  There is no indication that the signature belongs to the owner.
Primary key fingerprint: F0D0 377A 0D4F 25A7 9238  EFE5 6D40 361B 6E28 C193


Error/warnings:

patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:660: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:709: CHECK: spaces 
preferred around that '/' (ctx:VxV)
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:774: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:781: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:786: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:791: CHECK: Alignment 
should match open parenthesis

Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary 
--strict patches/0001-ov5675-Add-support-for-OV5675-sensor.patch
patches/0006-media-i2c-ov5645-Fix-power-sequence.patch:8: ERROR: Please use git 
commit description style 'commit <12+ chars of sha1> ("")' - ie: 
'commit aa4bb8b8838f ("media: ov5640: Re-work MIPI startup sequence")'

Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary 
--strict patches/0006-media-i2c-ov5645-Fix-power-sequence.patch
patches/0008-v4l-Documentation-Raw-Bayer-formats-are-not-RGB-form.patch:53: 
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
patches/0008-v4l-Documentation-Raw-Bayer-formats-are-not-RGB-form.patch:58: 
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1

Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary 
--strict patches/0008-v4l-Documentation-Raw-Bayer-formats-are-not-RGB-form.patch



[PATCH v9] media: imx: add csc/scaler mem2mem device

2019-08-14 Thread Philipp Zabel
Add a single imx-media mem2mem video device that uses the IPU IC PP
(image converter post processing) task for scaling and colorspace
conversion.
On i.MX6Q/DL SoCs with two IPUs currently only the first IPU is used.

The hardware only supports writing to destination buffers up to
1024x1024 pixels in a single pass, arbitrary sizes can be achieved
by rendering multiple tiles per frame.

Signed-off-by: Philipp Zabel 
[slongerb...@gmail.com: use ipu_image_convert_adjust(), fix
 device_run() error handling, add missing media-device header,
 unregister and remove the mem2mem device in error paths in
 imx_media_probe_complete() and in imx_media_remove(), updated
 for sync subdev registration]
Signed-off-by: Steve Longerbeam 
---
Changes since v8 [1]:
 - Change subject to be more descriptive.
 - Call video_unregister_device unconditionally, it handles gracefully
   handles unregistered video devices.
 - Rebased onto commit 6d01b7ff5233 ("media: staging/imx: Switch to sync
   registration for IPU subdevs")
 - propagate colorimetry info from queue format to image converter
 - replace devm_kzalloc by kzalloc and release on video_device.release
   to avoid priv being freed immediately when the driver is unbound
   while a video device is still opened. This allows to get rid of
   imx_media_csc_scaler_device_remove() altogether.
 - update SPDX license identifier

[1] https://patchwork.linuxtv.org/patch/55776/
---
 drivers/staging/media/imx/Kconfig |   1 +
 drivers/staging/media/imx/Makefile|   3 +-
 .../staging/media/imx/imx-media-csc-scaler.c  | 925 ++
 drivers/staging/media/imx/imx-media-dev.c |  28 +-
 .../staging/media/imx/imx-media-internal-sd.c |   4 +
 drivers/staging/media/imx/imx-media.h |  12 +
 6 files changed, 971 insertions(+), 2 deletions(-)
 create mode 100644 drivers/staging/media/imx/imx-media-csc-scaler.c

diff --git a/drivers/staging/media/imx/Kconfig 
b/drivers/staging/media/imx/Kconfig
index 4c726345dc25..56b4d7ea3022 100644
--- a/drivers/staging/media/imx/Kconfig
+++ b/drivers/staging/media/imx/Kconfig
@@ -7,6 +7,7 @@ config VIDEO_IMX_MEDIA
depends on HAS_DMA
select VIDEOBUF2_DMA_CONTIG
select V4L2_FWNODE
+   select V4L2_MEM2MEM_DEV
help
  Say yes here to enable support for video4linux media controller
  driver for the i.MX5/6 SOC.
diff --git a/drivers/staging/media/imx/Makefile 
b/drivers/staging/media/imx/Makefile
index aa6c4b4ad37e..9bd9e873ba7c 100644
--- a/drivers/staging/media/imx/Makefile
+++ b/drivers/staging/media/imx/Makefile
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 imx6-media-objs := imx-media-dev.o imx-media-internal-sd.o \
-   imx-ic-common.o imx-ic-prp.o imx-ic-prpencvf.o imx-media-vdic.o
+   imx-ic-common.o imx-ic-prp.o imx-ic-prpencvf.o imx-media-vdic.o \
+   imx-media-csc-scaler.o
 
 imx-media-common-objs := imx-media-capture.o imx-media-dev-common.o \
imx-media-of.o imx-media-utils.o
diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c 
b/drivers/staging/media/imx/imx-media-csc-scaler.c
new file mode 100644
index ..0cebb013831d
--- /dev/null
+++ b/drivers/staging/media/imx/imx-media-csc-scaler.c
@@ -0,0 +1,925 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * i.MX IPUv3 IC PP mem2mem CSC/Scaler driver
+ *
+ * Copyright (C) 2011 Pengutronix, Sascha Hauer
+ * Copyright (C) 2018 Pengutronix, Philipp Zabel
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "imx-media.h"
+
+#define fh_to_ctx(__fh)container_of(__fh, struct ipu_csc_scaler_ctx, 
fh)
+
+enum {
+   V4L2_M2M_SRC = 0,
+   V4L2_M2M_DST = 1,
+};
+
+struct ipu_csc_scaler_priv {
+   struct imx_media_video_dev  vdev;
+
+   struct v4l2_m2m_dev *m2m_dev;
+   struct device   *dev;
+
+   struct imx_media_dev*md;
+
+   struct mutexmutex;  /* mem2mem device mutex */
+};
+
+#define vdev_to_priv(v) container_of(v, struct ipu_csc_scaler_priv, vdev)
+
+/* Per-queue, driver-specific private data */
+struct ipu_csc_scaler_q_data {
+   struct v4l2_pix_format  cur_fmt;
+   struct v4l2_rectrect;
+};
+
+struct ipu_csc_scaler_ctx {
+   struct ipu_csc_scaler_priv  *priv;
+
+   struct v4l2_fh  fh;
+   struct ipu_csc_scaler_q_dataq_data[2];
+   struct ipu_image_convert_ctx*icc;
+
+   struct v4l2_ctrl_handlerctrl_hdlr;
+   int rotate;
+   boolhflip;
+   boolvflip;
+   enum ipu_rotate_moderot_mode;
+   unsigned intsequence;
+};
+
+static struct ipu_csc_scaler_q_data *get_q_data(struct ipu_csc_scaler_ctx *ctx,
+

Re: [PATCH v9] media: imx: add csc/scaler mem2mem device

2019-08-14 Thread Philipp Zabel
On Wed, 2019-08-14 at 14:24 +0200, Philipp Zabel wrote:
> Add a single imx-media mem2mem video device that uses the IPU IC PP
> (image converter post processing) task for scaling and colorspace
> conversion.
> On i.MX6Q/DL SoCs with two IPUs currently only the first IPU is used.
[...]

Output of 'v4l2-compliance -d 10 -e 10 -s -P', with the ipu-v3 fixes at
[1] applied. 'v4l2-compliance -f' works for most format combinations,
but fails with CMA trying to allocate physically contiguous 4096x4096
32-bit RGB buffers on both queues, on my test system:

[1] https://patchwork.kernel.org/series/159687/mbox

--8<--
v4l2-compliance SHA: 8d411705aa29f3ad77a4d48797b7ad07bfcce471, 32 bits

Compliance test for imx-media-csc-s device /dev/video10:

Driver Info:
Driver name  : imx-media-csc-s
Card type: imx-media-csc-scaler
Bus info : platform:imx-media-csc-scaler
Driver version   : 5.3.0
Capabilities : 0x84208000
Video Memory-to-Memory
Streaming
Extended Pix Format
Device Capabilities
Device Caps  : 0x04208000
Video Memory-to-Memory
Streaming
Extended Pix Format
Media Driver Info:
Driver name  : imx-media
Model: imx-media
Serial   : 
Bus info : 
Media version: 5.3.0
Hardware revision: 0x (0)
Driver version   : 5.3.0

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second /dev/video10 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 4 Private Controls: 0

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK
test Composing: OK
test Scaling: OK

Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK (Not Supported)

Test input 0:

Streaming ioctls:
test read/write: OK (Not Supported)
test blocking wait: OK
Video Capture: Captured 58 buffers
test MMAP (no poll): OK
Video Capture: Captured 58 buffers
test MMAP (select): OK
Video Capture: Captured 58 buffers
test MMAP (epoll): OK
test USERPTR (no poll): OK (Not Supported)
test USERPTR (select): OK (Not Supported)
Video Capture: Captured 58 buffers
test DMABUF (no poll): OK
Video Capture: Captured 58 buffers
test DMABUF (select): OK

Total for imx-media-csc-s device /dev/video10: 53, Succeeded: 53, Failed: 0, 
Warnings: 0
-->8--

regards
Philipp


Re: [PATCHv2 02/12] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> From: Maxime Jourdan 
> 
> Add an enum_fmt format flag to specifically tag coded formats where
> dynamic resolution switching is supported by the device.
> 
> This is useful for some codec drivers that can support dynamic
> resolution switching for one or more of their listed coded formats. It
> allows userspace to know whether it should extract the video parameters
> itself, or if it can rely on the device to send V4L2_EVENT_SOURCE_CHANGE
> when such changes are detected.

Makes sense and looks good to me:
Reviewed-by: Paul Kocialkowski 

The docs aren't saying that this only applies to stateful decoders, but I think
it is quite clear that this can't apply to stateless decoders.

Cheers,

Paul

> Signed-off-by: Maxime Jourdan 
> Signed-off-by: Hans Verkuil 
> [hverkuil-ci...@xs4all.nl: added flag to videodev2.h.rst.exceptions]
> [hverkuil-ci...@xs4all.nl: updated commit text: 'one or more' instead of 
> 'all']
> Acked-by: Tomasz Figa 
> ---
>  Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 8 
>  Documentation/media/videodev2.h.rst.exceptions   | 1 +
>  include/uapi/linux/videodev2.h   | 1 +
>  3 files changed, 10 insertions(+)
> 
> diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst 
> b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> index ebc05ce74bdf..719f1ed64f7d 100644
> --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> @@ -135,6 +135,14 @@ one until ``EINVAL`` is returned.
>   between frames/fields. This flag can only be used in combination with
>   the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to compressed
>   formats only. This flag is valid for stateful decoders only.
> +* - ``V4L2_FMT_FLAG_DYN_RESOLUTION``
> +  - 0x0008
> +  - Dynamic resolution switching is supported by the device for this
> + compressed bytestream format (aka coded format). It will notify the user
> + via the event ``V4L2_EVENT_SOURCE_CHANGE`` when changes in the video
> + parameters are detected. This flag can only be used in combination
> + with the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to
> + compressed formats only.
>  
>  
>  Return Value
> diff --git a/Documentation/media/videodev2.h.rst.exceptions 
> b/Documentation/media/videodev2.h.rst.exceptions
> index a0640b6d0f68..adeb6b7a15cb 100644
> --- a/Documentation/media/videodev2.h.rst.exceptions
> +++ b/Documentation/media/videodev2.h.rst.exceptions
> @@ -181,6 +181,7 @@ replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 
> reserved-formats
>  replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
>  replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags
>  replace define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM fmtdesc-flags
> +replace define V4L2_FMT_FLAG_DYN_RESOLUTION fmtdesc-flags
>  
>  # V4L2 timecode types
>  replace define V4L2_TC_TYPE_24FPS timecode-type
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 67077d52c59d..530638dffd93 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -777,6 +777,7 @@ struct v4l2_fmtdesc {
>  #define V4L2_FMT_FLAG_COMPRESSED 0x0001
>  #define V4L2_FMT_FLAG_EMULATED   0x0002
>  #define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM  0x0004
> +#define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008
>  
>   /* Frame Size and frame rate enumeration */
>  /*
> -- 
> 2.20.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCHv2 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> Add an enum_fmt format flag to specifically tag coded formats where
> full bytestream parsing is supported by the device.
> 
> Some stateful decoders are capable of fully parsing a bytestream,
> but others require that userspace pre-parses the bytestream into
> frames or fields (see the corresponding pixelformat descriptions
> for details).
> 
> If this flag is set, then this pre-parsing step is not required
> (but still possible, of course).

Although I wasn't involved with the initial issue, looks good to me!

Reviewed-by: Paul Kocialkowski 

Cheers,

Paul

> Signed-off-by: Hans Verkuil 
> ---
>  Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 8 
>  Documentation/media/videodev2.h.rst.exceptions   | 1 +
>  include/uapi/linux/videodev2.h   | 5 +++--
>  3 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst 
> b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> index 822d6730e7d2..ebc05ce74bdf 100644
> --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> @@ -127,6 +127,14 @@ one until ``EINVAL`` is returned.
>- This format is not native to the device but emulated through
>   software (usually libv4l2), where possible try to use a native
>   format instead for better performance.
> +* - ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> +  - 0x0004
> +  - The hardware decoder for this compressed bytestream format (aka coded
> + format) is capable of parsing a continuous bytestream. Applications do
> + not need to parse the bytestream themselves to find the boundaries
> + between frames/fields. This flag can only be used in combination with
> + the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to compressed
> + formats only. This flag is valid for stateful decoders only.
>  
>  
>  Return Value
> diff --git a/Documentation/media/videodev2.h.rst.exceptions 
> b/Documentation/media/videodev2.h.rst.exceptions
> index 8e7d3492d248..a0640b6d0f68 100644
> --- a/Documentation/media/videodev2.h.rst.exceptions
> +++ b/Documentation/media/videodev2.h.rst.exceptions
> @@ -180,6 +180,7 @@ replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 
> reserved-formats
>  # V4L2 format flags
>  replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
>  replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags
> +replace define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM fmtdesc-flags
>  
>  # V4L2 timecode types
>  replace define V4L2_TC_TYPE_24FPS timecode-type
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 2427bc4d8eba..67077d52c59d 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -774,8 +774,9 @@ struct v4l2_fmtdesc {
>   __u32   reserved[4];
>  };
>  
> -#define V4L2_FMT_FLAG_COMPRESSED 0x0001
> -#define V4L2_FMT_FLAG_EMULATED   0x0002
> +#define V4L2_FMT_FLAG_COMPRESSED 0x0001
> +#define V4L2_FMT_FLAG_EMULATED   0x0002
> +#define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM  0x0004
>  
>   /* Frame Size and frame rate enumeration */
>  /*
> -- 
> 2.20.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCHv2 03/12] media: venus: vdec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> From: Maxime Jourdan 
> 
> Tag all the coded formats where the venus vdec supports dynamic
> resolution switching.

Looks good to me.

Reviewed-by: Paul Kocialkowski 

Cheers,

Paul

> Signed-off-by: Maxime Jourdan 
> Signed-off-by: Hans Verkuil 
> ---
>  drivers/media/platform/qcom/venus/core.h |  1 +
>  drivers/media/platform/qcom/venus/vdec.c | 11 +++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.h 
> b/drivers/media/platform/qcom/venus/core.h
> index 959eaa550f4e..922cb7e64bfa 100644
> --- a/drivers/media/platform/qcom/venus/core.h
> +++ b/drivers/media/platform/qcom/venus/core.h
> @@ -46,6 +46,7 @@ struct venus_format {
>   u32 pixfmt;
>   unsigned int num_planes;
>   u32 type;
> + u32 flags;
>  };
>  
>  #define MAX_PLANES   4
> diff --git a/drivers/media/platform/qcom/venus/vdec.c 
> b/drivers/media/platform/qcom/venus/vdec.c
> index 0b7d65db5cdc..7f4660555ddb 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -37,42 +37,52 @@ static const struct venus_format vdec_formats[] = {
>   .pixfmt = V4L2_PIX_FMT_MPEG4,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_MPEG2,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_H263,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_VC1_ANNEX_G,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_VC1_ANNEX_L,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_H264,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_VP8,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_VP9,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_XVID,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   }, {
>   .pixfmt = V4L2_PIX_FMT_HEVC,
>   .num_planes = 1,
>   .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>  };
>  
> @@ -379,6 +389,7 @@ static int vdec_enum_fmt(struct file *file, void *fh, 
> struct v4l2_fmtdesc *f)
>   return -EINVAL;
>  
>   f->pixelformat = fmt->pixfmt;
> + f->flags = fmt->flags;
>  
>   return 0;
>  }
> -- 
> 2.20.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> From: Maxime Jourdan 
> 
> Tag all the coded formats where the s5p_mfc decoder supports dynamic
> resolution switching or has a bytestream parser.

Looks good to me, despite lacking knowledge of whether this matches what the
hardware really supports.

Reviewed-by: Paul Kocialkowski 

Cheers,

Paul

> Signed-off-by: Maxime Jourdan 
> Signed-off-by: Hans Verkuil 
> [hverkuil-ci...@xs4all.nl: added CONTINUOUS_BYTESTREAM]
> ---
>  .../media/platform/s5p-mfc/s5p_mfc_common.h|  1 +
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c   | 18 ++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h 
> b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index 96d1ecd1521b..31b133af91eb 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -723,6 +723,7 @@ struct s5p_mfc_fmt {
>   enum s5p_mfc_fmt_type type;
>   u32 num_planes;
>   u32 versions;
> + u32 flags;
>  };
>  
>  /**
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
> b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index 61e144a35201..1423c33c70cb 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -62,6 +62,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_H264_MVC,
> @@ -69,6 +71,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V6PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_H263,
> @@ -76,6 +80,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_MPEG1,
> @@ -83,6 +88,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_MPEG2,
> @@ -90,6 +97,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_MPEG4,
> @@ -97,6 +106,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_XVID,
> @@ -104,6 +115,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VC1_ANNEX_G,
> @@ -111,6 +123,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VC1_ANNEX_L,
> @@ -118,6 +131,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VP8,
> @@ -125,6 +139,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V6PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>  

Re: [PATCHv2 05/12] media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> From: Maxime Jourdan 
> 
> Tag all the coded formats where the mtk-vcodec decoder supports dynamic
> resolution switching.

Looks good to me despite lack of knowledge about the hardware.

Reviewed-by: Paul Kocialkowski 

Cheers,

Paul

> Signed-off-by: Maxime Jourdan 
> Signed-off-by: Hans Verkuil 
> ---
>  drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 4 
>  drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c 
> b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
> index 90d1a67db7e5..26a55c3e807e 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
> @@ -29,16 +29,19 @@ static const struct mtk_video_fmt mtk_video_formats[] = {
>   .fourcc = V4L2_PIX_FMT_H264,
>   .type = MTK_FMT_DEC,
>   .num_planes = 1,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VP8,
>   .type = MTK_FMT_DEC,
>   .num_planes = 1,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VP9,
>   .type = MTK_FMT_DEC,
>   .num_planes = 1,
> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_MT21C,
> @@ -948,6 +951,7 @@ static int vidioc_enum_fmt(struct v4l2_fmtdesc *f, bool 
> output_queue)
>  
>   fmt = &mtk_video_formats[i];
>   f->pixelformat = fmt->fourcc;
> + f->flags = fmt->flags;
>  
>   return 0;
>  }
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h 
> b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
> index c95de5d08dda..9fd56dee7fd1 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
> @@ -99,6 +99,7 @@ struct mtk_video_fmt {
>   u32 fourcc;
>   enum mtk_fmt_type   type;
>   u32 num_planes;
> + u32 flags;
>  };
>  
>  /**
> -- 
> 2.20.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCHv2 06/12] media: vicodec: set flags for vdec/stateful OUTPUT coded formats

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> From: Maxime Jourdan 
> 
> Tag all the coded formats where the vicodec stateful decoder supports
> dynamic resolution switching and bytestream parsing.

Looks good to me:

Reviewed-by: Paul Kocialkowski 

Cheers,

Paul

> Signed-off-by: Maxime Jourdan 
> Signed-off-by: Hans Verkuil 
> [hverkuil-ci...@xs4all.nl: added CONTINUOUS_BYTESTREAM]
> ---
>  drivers/media/platform/vicodec/vicodec-core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/vicodec/vicodec-core.c 
> b/drivers/media/platform/vicodec/vicodec-core.c
> index 7e7c1e80f29f..5152f44bcc0a 100644
> --- a/drivers/media/platform/vicodec/vicodec-core.c
> +++ b/drivers/media/platform/vicodec/vicodec-core.c
> @@ -742,6 +742,9 @@ static int enum_fmt(struct v4l2_fmtdesc *f, struct 
> vicodec_ctx *ctx,
>   return -EINVAL;
>   f->pixelformat = ctx->is_stateless ?
>   V4L2_PIX_FMT_FWHT_STATELESS : V4L2_PIX_FMT_FWHT;
> + if (!ctx->is_enc && !ctx->is_stateless)
> + f->flags = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM;
>   }
>   return 0;
>  }
> -- 
> 2.20.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCHv2 08/12] pixfmt-compressed.rst: improve H264/HEVC/MPEG1+2/VP8+9 documentation

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> The existing documentation was incorrect and did not correspond
> to how actual codec drivers implemented this.
> 
> Update the documentation to explicitly specify what is actually
> expected.
> 
> Signed-off-by: Hans Verkuil 
> ---
>  .../media/uapi/v4l/pixfmt-compressed.rst  | 36 +++
>  1 file changed, 30 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/pixfmt-compressed.rst 
> b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
> index f52a7b67023d..9bb4a172a660 100644
> --- a/Documentation/media/uapi/v4l/pixfmt-compressed.rst
> +++ b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
> @@ -41,7 +41,12 @@ Compressed Formats
>  
>- ``V4L2_PIX_FMT_H264``
>- 'H264'
> -  - H264 video elementary stream with start codes.
> +  - H264 Access Unit.
> + The decoder expects one Access Unit per buffer.
> + The encoder generates one Access Unit per buffer.
> + If :ref:`VIDIOC_ENUM_FMT` reports 
> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> + then the decoder has no requirements since it can parse all the
> + information from the raw bytestream.

Maybe it would be clearer to mention that "no requirements" concerns the
lack of frame/field boundary requirement? Otherwise it feels a bit unclear
what userspace is expected to do or not do depending on the flag.

Cheers,

Paul

>  * .. _V4L2-PIX-FMT-H264-NO-SC:
>  
>- ``V4L2_PIX_FMT_H264_NO_SC``
> @@ -86,12 +91,20 @@ Compressed Formats
>  
>- ``V4L2_PIX_FMT_MPEG1``
>- 'MPG1'
> -  - MPEG1 video elementary stream.
> +  - MPEG1 Picture. Each buffer starts with a Picture header, followed
> + by other headers as needed and ending with the Picture data.
> + If :ref:`VIDIOC_ENUM_FMT` reports 
> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> + then the decoder has no requirements since it can parse all the
> + information from the raw bytestream.
>  * .. _V4L2-PIX-FMT-MPEG2:
>  
>- ``V4L2_PIX_FMT_MPEG2``
>- 'MPG2'
> -  - MPEG2 video elementary stream.
> +  - MPEG2 Picture. Each buffer starts with a Picture header, followed
> + by other headers as needed and ending with the Picture data.
> + If :ref:`VIDIOC_ENUM_FMT` reports 
> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> + then the decoder has no requirements since it can parse all the
> + information from the raw bytestream.
>  * .. _V4L2-PIX-FMT-MPEG2-SLICE:
>  
>- ``V4L2_PIX_FMT_MPEG2_SLICE``
> @@ -132,7 +145,9 @@ Compressed Formats
>  
>- ``V4L2_PIX_FMT_VP8``
>- 'VP80'
> -  - VP8 video elementary stream.
> +  - VP8 compressed video frame. The encoder generates one
> + compressed frame per buffer, and the decoder requires one
> + compressed frame per buffer.
>  * .. _V4L2-PIX-FMT-VP8-FRAME:
>  
>- ``V4L2_PIX_FMT_VP8_FRAME``
> @@ -157,12 +172,19 @@ Compressed Formats
>  
>- ``V4L2_PIX_FMT_VP9``
>- 'VP90'
> -  - VP9 video elementary stream.
> +  - VP9 compressed video frame. The encoder generates one
> + compressed frame per buffer, and the decoder requires one
> + compressed frame per buffer.
>  * .. _V4L2-PIX-FMT-HEVC:
>  
>- ``V4L2_PIX_FMT_HEVC``
>- 'HEVC'
> -  - HEVC/H.265 video elementary stream.
> +  - HEVC/H.265 Access Unit.
> + The decoder expects one Access Unit per buffer.
> + The encoder generates one Access Unit per buffer.
> + If :ref:`VIDIOC_ENUM_FMT` reports 
> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> + then the decoder has no requirements since it can parse all the
> + information from the raw bytestream.
>  * .. _V4L2-PIX-FMT-FWHT:
>  
>- ``V4L2_PIX_FMT_FWHT``
> @@ -170,6 +192,8 @@ Compressed Formats
>- Video elementary stream using a codec based on the Fast Walsh 
> Hadamard
>  Transform. This codec is implemented by the vicodec ('Virtual Codec')
>   driver. See the codec-fwht.h header for more details.
> + :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> + since the decoder can parse all the information from the raw bytestream.
>  * .. _V4L2-PIX-FMT-FWHT-STATELESS:
>  
>- ``V4L2_PIX_FMT_FWHT_STATELESS``
> -- 
> 2.20.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


Re: [PATCHv2 08/12] pixfmt-compressed.rst: improve H264/HEVC/MPEG1+2/VP8+9 documentation

2019-08-14 Thread Hans Verkuil
On 8/14/19 3:09 PM, Paul Kocialkowski wrote:
> Hi,
> 
> On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
>> The existing documentation was incorrect and did not correspond
>> to how actual codec drivers implemented this.
>>
>> Update the documentation to explicitly specify what is actually
>> expected.
>>
>> Signed-off-by: Hans Verkuil 
>> ---
>>  .../media/uapi/v4l/pixfmt-compressed.rst  | 36 +++
>>  1 file changed, 30 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/media/uapi/v4l/pixfmt-compressed.rst 
>> b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
>> index f52a7b67023d..9bb4a172a660 100644
>> --- a/Documentation/media/uapi/v4l/pixfmt-compressed.rst
>> +++ b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
>> @@ -41,7 +41,12 @@ Compressed Formats
>>  
>>- ``V4L2_PIX_FMT_H264``
>>- 'H264'
>> -  - H264 video elementary stream with start codes.
>> +  - H264 Access Unit.
>> +The decoder expects one Access Unit per buffer.
>> +The encoder generates one Access Unit per buffer.
>> +If :ref:`VIDIOC_ENUM_FMT` reports 
>> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
>> +then the decoder has no requirements since it can parse all the
>> +information from the raw bytestream.
> 
> Maybe it would be clearer to mention that "no requirements" concerns the
> lack of frame/field boundary requirement? Otherwise it feels a bit unclear
> what userspace is expected to do or not do depending on the flag.

Hmm, how about:

If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
then the decoder can start streaming at any point in the bytestream and
it can parse the Access Units by itself.

What do you think?

Hans


> 
> Cheers,
> 
> Paul
> 
>>  * .. _V4L2-PIX-FMT-H264-NO-SC:
>>  
>>- ``V4L2_PIX_FMT_H264_NO_SC``
>> @@ -86,12 +91,20 @@ Compressed Formats
>>  
>>- ``V4L2_PIX_FMT_MPEG1``
>>- 'MPG1'
>> -  - MPEG1 video elementary stream.
>> +  - MPEG1 Picture. Each buffer starts with a Picture header, followed
>> +by other headers as needed and ending with the Picture data.
>> +If :ref:`VIDIOC_ENUM_FMT` reports 
>> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
>> +then the decoder has no requirements since it can parse all the
>> +information from the raw bytestream.
>>  * .. _V4L2-PIX-FMT-MPEG2:
>>  
>>- ``V4L2_PIX_FMT_MPEG2``
>>- 'MPG2'
>> -  - MPEG2 video elementary stream.
>> +  - MPEG2 Picture. Each buffer starts with a Picture header, followed
>> +by other headers as needed and ending with the Picture data.
>> +If :ref:`VIDIOC_ENUM_FMT` reports 
>> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
>> +then the decoder has no requirements since it can parse all the
>> +information from the raw bytestream.
>>  * .. _V4L2-PIX-FMT-MPEG2-SLICE:
>>  
>>- ``V4L2_PIX_FMT_MPEG2_SLICE``
>> @@ -132,7 +145,9 @@ Compressed Formats
>>  
>>- ``V4L2_PIX_FMT_VP8``
>>- 'VP80'
>> -  - VP8 video elementary stream.
>> +  - VP8 compressed video frame. The encoder generates one
>> +compressed frame per buffer, and the decoder requires one
>> +compressed frame per buffer.
>>  * .. _V4L2-PIX-FMT-VP8-FRAME:
>>  
>>- ``V4L2_PIX_FMT_VP8_FRAME``
>> @@ -157,12 +172,19 @@ Compressed Formats
>>  
>>- ``V4L2_PIX_FMT_VP9``
>>- 'VP90'
>> -  - VP9 video elementary stream.
>> +  - VP9 compressed video frame. The encoder generates one
>> +compressed frame per buffer, and the decoder requires one
>> +compressed frame per buffer.
>>  * .. _V4L2-PIX-FMT-HEVC:
>>  
>>- ``V4L2_PIX_FMT_HEVC``
>>- 'HEVC'
>> -  - HEVC/H.265 video elementary stream.
>> +  - HEVC/H.265 Access Unit.
>> +The decoder expects one Access Unit per buffer.
>> +The encoder generates one Access Unit per buffer.
>> +If :ref:`VIDIOC_ENUM_FMT` reports 
>> ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
>> +then the decoder has no requirements since it can parse all the
>> +information from the raw bytestream.
>>  * .. _V4L2-PIX-FMT-FWHT:
>>  
>>- ``V4L2_PIX_FMT_FWHT``
>> @@ -170,6 +192,8 @@ Compressed Formats
>>- Video elementary stream using a codec based on the Fast Walsh 
>> Hadamard
>>  Transform. This codec is implemented by the vicodec ('Virtual 
>> Codec')
>>  driver. See the codec-fwht.h header for more details.
>> +:ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
>> +since the decoder can parse all the information from the raw bytestream.
>>  * .. _V4L2-PIX-FMT-FWHT-STATELESS:
>>  
>>- ``V4L2_PIX_FMT_FWHT_STATELESS``
>> -- 
>> 2.20.1
>>
> 



[PATCH] vidioc-queryctrl.rst: fix broken c:type references

2019-08-14 Thread Hans Verkuil
One typo in the function name, one missing : after :c:type.

Signed-off-by: Hans Verkuil 
---
diff --git a/Documentation/media/uapi/v4l/vidioc-queryctrl.rst 
b/Documentation/media/uapi/v4l/vidioc-queryctrl.rst
index dc500632095d..a3d56ffbf4cc 100644
--- a/Documentation/media/uapi/v4l/vidioc-queryctrl.rst
+++ b/Documentation/media/uapi/v4l/vidioc-queryctrl.rst
@@ -39,8 +39,8 @@ Arguments
 File descriptor returned by :ref:`open() `.

 ``argp``
-Pointer to struct :c:type:`v4l2_queryctl`, :c:type:`v4l2_query_ext_ctrl`
-or :c:type`v4l2_querymenu` (depending on the ioctl).
+Pointer to struct :c:type:`v4l2_queryctrl`, :c:type:`v4l2_query_ext_ctrl`
+or :c:type:`v4l2_querymenu` (depending on the ioctl).


 Description


[PATCH v2] v4l: rcar-fcp: Read IP version register at probe time

2019-08-14 Thread Laurent Pinchart
This helps identifying the IP core version, for debugging purpose only
for now.

Signed-off-by: Laurent Pinchart 
---
Changes since v1:

- Use devm_platform_ioremap_resource()
---
 drivers/media/platform/rcar-fcp.c | 41 +++
 1 file changed, 41 insertions(+)

diff --git a/drivers/media/platform/rcar-fcp.c 
b/drivers/media/platform/rcar-fcp.c
index 43c78620c9d8..6e0c0e7c0f8c 100644
--- a/drivers/media/platform/rcar-fcp.c
+++ b/drivers/media/platform/rcar-fcp.c
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -21,11 +22,38 @@
 struct rcar_fcp_device {
struct list_head list;
struct device *dev;
+   void __iomem *iomem;
 };
 
 static LIST_HEAD(fcp_devices);
 static DEFINE_MUTEX(fcp_lock);
 
+#define FCP_VCR0x
+#define FCP_VCR_CATEGORY_MASK  (0xff << 8)
+#define FCP_VCR_CATEGORY_SHIFT 8
+#define FCP_VCR_REVISION_MASK  (0xff << 0)
+#define FCP_VCR_REVISION_SHIFT 0
+
+#define FCP_CFG0   0x0004
+#define FCP_RST0x0010
+#define FCP_STA0x0018
+#define FCP_TL_CTRL0x0070
+#define FCP_PICINFO1   0x00c4
+#define FCP_BA_ANC_Y0  0x0100
+#define FCP_BA_ANC_Y1  0x0104
+#define FCP_BA_ANC_Y2  0x0108
+#define FCP_BA_ANC_C   0x010c
+#define FCP_BA_REF_Y0  0x0110
+#define FCP_BA_REF_Y1  0x0114
+#define FCP_BA_REF_Y2  0x0118
+#define FCP_BA_REF_C   0x011c
+
+
+static inline u32 rcar_fcp_read(struct rcar_fcp_device *fcp, u32 reg)
+{
+   return ioread32(fcp->iomem + reg);
+}
+
 /* 
-
  * Public API
  */
@@ -129,6 +157,7 @@ EXPORT_SYMBOL_GPL(rcar_fcp_disable);
 static int rcar_fcp_probe(struct platform_device *pdev)
 {
struct rcar_fcp_device *fcp;
+   u32 version;
 
fcp = devm_kzalloc(&pdev->dev, sizeof(*fcp), GFP_KERNEL);
if (fcp == NULL)
@@ -138,6 +167,18 @@ static int rcar_fcp_probe(struct platform_device *pdev)
 
pm_runtime_enable(&pdev->dev);
 
+   fcp->iomem = devm_platform_ioremap_resource(pdev, 0);
+   if (IS_ERR(fcp->iomem))
+   return PTR_ERR(fcp->iomem);
+
+   pm_runtime_get_sync(&pdev->dev);
+   version = rcar_fcp_read(fcp, FCP_VCR);
+   pm_runtime_put(&pdev->dev);
+
+   dev_dbg(&pdev->dev, "FCP category %u revision %u\n",
+   (version & FCP_VCR_CATEGORY_MASK) >> FCP_VCR_CATEGORY_SHIFT,
+   (version & FCP_VCR_REVISION_MASK) >> FCP_VCR_REVISION_SHIFT);
+
mutex_lock(&fcp_lock);
list_add_tail(&fcp->list, &fcp_devices);
mutex_unlock(&fcp_lock);
-- 
Regards,

Laurent Pinchart



[PATCH] media: uvc: Fix error path in control parsing failure

2019-08-14 Thread Laurent Pinchart
When parsing the UVC control descriptors fails, the error path tries to
cleanup a media device that hasn't been initialised, potentially
resulting in a crash. Fix this by initialising the media device before
the error handling path can be reached.

Fixes: 5a254d751e52 ("[media] uvcvideo: Register a v4l2_device")
Reported-by: syzbot+c86454eb3af9e8a4d...@syzkaller.appspotmail.com
Signed-off-by: Laurent Pinchart 
---
 drivers/media/usb/uvc/uvc_driver.c | 28 +++-
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c 
b/drivers/media/usb/uvc/uvc_driver.c
index 66ee168ddc7e..428235ca2635 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2151,6 +2151,20 @@ static int uvc_probe(struct usb_interface *intf,
   sizeof(dev->name) - len);
}
 
+   /* Initialize the media device. */
+#ifdef CONFIG_MEDIA_CONTROLLER
+   dev->mdev.dev = &intf->dev;
+   strscpy(dev->mdev.model, dev->name, sizeof(dev->mdev.model));
+   if (udev->serial)
+   strscpy(dev->mdev.serial, udev->serial,
+   sizeof(dev->mdev.serial));
+   usb_make_path(udev, dev->mdev.bus_info, sizeof(dev->mdev.bus_info));
+   dev->mdev.hw_revision = le16_to_cpu(udev->descriptor.bcdDevice);
+   media_device_init(&dev->mdev);
+
+   dev->vdev.mdev = &dev->mdev;
+#endif
+
/* Parse the Video Class control descriptor. */
if (uvc_parse_control(dev) < 0) {
uvc_trace(UVC_TRACE_PROBE, "Unable to parse UVC "
@@ -2171,19 +2185,7 @@ static int uvc_probe(struct usb_interface *intf,
"linux-uvc-devel mailing list.\n");
}
 
-   /* Initialize the media device and register the V4L2 device. */
-#ifdef CONFIG_MEDIA_CONTROLLER
-   dev->mdev.dev = &intf->dev;
-   strscpy(dev->mdev.model, dev->name, sizeof(dev->mdev.model));
-   if (udev->serial)
-   strscpy(dev->mdev.serial, udev->serial,
-   sizeof(dev->mdev.serial));
-   usb_make_path(udev, dev->mdev.bus_info, sizeof(dev->mdev.bus_info));
-   dev->mdev.hw_revision = le16_to_cpu(udev->descriptor.bcdDevice);
-   media_device_init(&dev->mdev);
-
-   dev->vdev.mdev = &dev->mdev;
-#endif
+   /* Register the V4L2 device. */
if (v4l2_device_register(&intf->dev, &dev->vdev) < 0)
goto error;
 
-- 
Regards,

Laurent Pinchart



[GIT PULL FOR v5.4] R-Car VSP1 change

2019-08-14 Thread Laurent Pinchart
Hi Mauro,

The following changes since commit b20a6e298bcb8cb8ae18de26baaf462a6418515b:

  media: rc: imon: Allow iMON RC protocol for ffdc 7e device (2019-08-14 
05:08:27 -0300)

are available in the Git repository at:

  git://linuxtv.org/pinchartl/media.git tags/vsp1-next-20190814

for you to fetch changes up to f95c54e35811b711ce73e5a54c6a01e096bc324f:

  media: vsp1: fix memory leak of dl on error return path (2019-08-14 17:55:22 
+0300)


Miscellaneous R-Car VSP1 fix


Colin Ian King (1):
  media: vsp1: fix memory leak of dl on error return path

 drivers/media/platform/vsp1/vsp1_dl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
Regards,

Laurent Pinchart


Re: [GIT PULL FOR v5.4] R-Car VSP1 change

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58148/
Build log: https://builder.linuxtv.org/job/patchwork/8628/
Build time: 00:05:29
Link: 
https://lore.kernel.org/linux-media/20190814153020.ga30...@pendragon.ideasonboard.com
Summary: no issues

gpg: Signature made Wed 14 Aug 2019 03:29:18 PM UTC
gpg:using RSA key BD94648A8E47ECEDBF199B1862255D299E280B24
gpg:issuer "laurent.pinch...@ideasonboard.com"
gpg: Good signature from "Laurent Pinchart " 
[unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:  There is no indication that the signature belongs to the owner.
Primary key fingerprint: 9423 1B98 0100 EC61 9AC1  0E10 F045 C2B9 6991 256E
 Subkey fingerprint: BD94 648A 8E47 ECED BF19  9B18 6225 5D29 9E28 0B24



Re: [GIT PULL for 5.4] More sensor driver, omap3isp and documentation

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58122/
Build log: https://builder.linuxtv.org/job/patchwork/8689/
Build time: 00:00:00
Link: 
https://lore.kernel.org/linux-media/20190814084317.gi2...@valkosipuli.retiisi.org.uk

FAILED: Jenkins doesn't have a ssh account at linuxtv.org


Re: [GIT PULL v2 for 5.4] More sensor driver, omap3isp and documentation

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58128/
Build log: https://builder.linuxtv.org/job/patchwork/8689/
Build time: 00:08:45
Link: 
https://lore.kernel.org/linux-media/20190814103251.ga3...@valkosipuli.retiisi.org.uk
Summary: 3 issues, being 0 at build time

gpg: Signature made Wed 14 Aug 2019 10:10:12 AM UTC
gpg:using DSA key F0D0377A0D4F25A79238EFE56D40361B6E28C193
gpg:issuer "sakari.ai...@linux.intel.com"
gpg: Good signature from "Sakari Ailus " [full]


Error/warnings:

patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:660: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:709: CHECK: spaces 
preferred around that '/' (ctx:VxV)
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:774: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:781: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:786: CHECK: Alignment 
should match open parenthesis
patches/0001-ov5675-Add-support-for-OV5675-sensor.patch:791: CHECK: Alignment 
should match open parenthesis

Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary 
--strict patches/0001-ov5675-Add-support-for-OV5675-sensor.patch
patches/0006-media-i2c-ov5645-Fix-power-sequence.patch:8: ERROR: Please use git 
commit description style 'commit <12+ chars of sha1> ("")' - ie: 
'commit aa4bb8b8838f ("media: ov5640: Re-work MIPI startup sequence")'

Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary 
--strict patches/0006-media-i2c-ov5645-Fix-power-sequence.patch
patches/0008-v4l-Documentation-Raw-Bayer-formats-are-not-RGB-form.patch:53: 
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
patches/0008-v4l-Documentation-Raw-Bayer-formats-are-not-RGB-form.patch:58: 
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1

Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary 
--strict patches/0008-v4l-Documentation-Raw-Bayer-formats-are-not-RGB-form.patch



Re: [GIT PULL FOR v5.4] R-Car VSP1 change

2019-08-14 Thread Jenkins
From: buil...@linuxtv.org

Pull request: https://patchwork.linuxtv.org/patch/58148/
Build log: https://builder.linuxtv.org/job/patchwork/8689/
Build time: 00:05:25
Link: 
https://lore.kernel.org/linux-media/20190814153020.ga30...@pendragon.ideasonboard.com
Summary: no issues

gpg: Signature made Wed 14 Aug 2019 03:29:18 PM UTC
gpg:using RSA key BD94648A8E47ECEDBF199B1862255D299E280B24
gpg:issuer "laurent.pinch...@ideasonboard.com"
gpg: Good signature from "Laurent Pinchart " 
[full]



S/G_SELECTION: The target flag usage for capture/output buftype

2019-08-14 Thread Satish Kumar Nagireddy
Hi All,

I need your help in understanding target flag usage in S/G_SELECTION ioctls.

I see that some of the applications like GStreamer has the the hardcoding of 
target flag as V4L2_SEL_TGT_CROP for capture buftype.
https://github.com/Xilinx/gst-plugins-good-xlnx/blob/master/sys/v4l2/gstv4l2object.c#L4027

And on the other side, I see that few up-streamed drivers are clearly 
restricting to use CROP for output buftype and COMPOSE for capture buftype.
I do not have the concrete data from V4L2 specifications. At this point in 
time, I can only share other up-streamed drivers as examples.
https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/sti/bdisp/bdisp-v4l2.c#L935
https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/rockchip/rga/rga.c#L622
Any references from V4L2 specification?
Regards,
Satish




S/G_SELECTION: The target flag usage for capture/output buftype

2019-08-14 Thread Satish Kumar Nagireddy
Hi All,

I need your help in understanding target flag usage in S/G_SELECTION ioctls.

I see that some of the applications like GStreamer has the the hardcoding of 
target flag as V4L2_SEL_TGT_CROP for capture buftype.
https://github.com/Xilinx/gst-plugins-good-xlnx/blob/master/sys/v4l2/gstv4l2object.c#L4027

And on the other side, I see that few up-streamed drivers are clearly 
restricting to use CROP for output buftype and COMPOSE for capture buftype.
I do not have the concrete data from V4L2 specifications. At this point in 
time, I can only share other up-streamed drivers as examples.
https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/sti/bdisp/bdisp-v4l2.c#L935
https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/rockchip/rga/rga.c#L622
Any references from V4L2 specification?

Regards,
Satish



cron job: media_tree daily build: ERRORS

2019-08-14 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:   Thu Aug 15 05:00:11 CEST 2019
media-tree git hash:70c55c1ad1a76e804ee5330e134674f5d2741cb7
media_build git hash:   5c911a1c60754c2aa66cfad067035561ceb898a5
v4l-utils git hash: 59d6c0b4a5605b4dbb4020f3b9cba7de87d9fdce
edid-decode git hash:   0932deee88928f110b5a74851c173ad895f75863
gcc version:i686-linux-gcc (GCC) 8.3.0
sparse repo:https://git.linuxtv.org/mchehab/sparse.git
sparse version: 0.6.1-rc1
smatch repo:https://git.linuxtv.org/mchehab/smatch.git
smatch version: 0.5.1
build-scripts repo: https://git.linuxtv.org/hverkuil/build-scripts.git
build-scripts git hash: c2ffae3e7d5ca45112abb3c6f983abd338792feb
host hardware:  x86_64
host os:4.19.0-4-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-arm-pxa: OK
linux-git-arm-stm32: OK
linux-git-arm64: OK
linux-git-i686: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
Check COMPILE_TEST: OK
Check for strcpy/strncpy/strlcpy: OK
linux-3.10.108-i686: ERRORS
linux-3.10.108-x86_64: ERRORS
linux-3.11.10-i686: ERRORS
linux-3.11.10-x86_64: ERRORS
linux-3.12.74-i686: ERRORS
linux-3.12.74-x86_64: ERRORS
linux-3.13.11-i686: ERRORS
linux-3.13.11-x86_64: ERRORS
linux-3.14.79-i686: ERRORS
linux-3.14.79-x86_64: ERRORS
linux-3.15.10-i686: ERRORS
linux-3.15.10-x86_64: ERRORS
linux-3.16.63-i686: ERRORS
linux-3.16.63-x86_64: ERRORS
linux-3.17.8-i686: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.136-i686: ERRORS
linux-3.18.136-x86_64: ERRORS
linux-3.19.8-i686: ERRORS
linux-3.19.8-x86_64: ERRORS
linux-4.0.9-i686: ERRORS
linux-4.0.9-x86_64: ERRORS
linux-4.1.52-i686: ERRORS
linux-4.1.52-x86_64: ERRORS
linux-4.2.8-i686: ERRORS
linux-4.2.8-x86_64: ERRORS
linux-4.3.6-i686: ERRORS
linux-4.3.6-x86_64: ERRORS
linux-4.4.167-i686: ERRORS
linux-4.4.167-x86_64: ERRORS
linux-4.5.7-i686: ERRORS
linux-4.5.7-x86_64: ERRORS
linux-4.6.7-i686: ERRORS
linux-4.6.7-x86_64: ERRORS
linux-4.7.10-i686: ERRORS
linux-4.7.10-x86_64: ERRORS
linux-4.8.17-i686: ERRORS
linux-4.8.17-x86_64: ERRORS
linux-4.9.162-i686: ERRORS
linux-4.9.162-x86_64: ERRORS
linux-4.10.17-i686: ERRORS
linux-4.10.17-x86_64: ERRORS
linux-4.11.12-i686: ERRORS
linux-4.11.12-x86_64: ERRORS
linux-4.12.14-i686: ERRORS
linux-4.12.14-x86_64: ERRORS
linux-4.13.16-i686: ERRORS
linux-4.13.16-x86_64: ERRORS
linux-4.14.105-i686: ERRORS
linux-4.14.105-x86_64: ERRORS
linux-4.15.18-i686: ERRORS
linux-4.15.18-x86_64: ERRORS
linux-4.16.18-i686: ERRORS
linux-4.16.18-x86_64: ERRORS
linux-4.17.19-i686: ERRORS
linux-4.17.19-x86_64: ERRORS
linux-4.18.20-i686: ERRORS
linux-4.18.20-x86_64: ERRORS
linux-4.19.28-i686: ERRORS
linux-4.19.28-x86_64: ERRORS
linux-4.20.15-i686: ERRORS
linux-4.20.15-x86_64: ERRORS
linux-5.0.15-i686: ERRORS
linux-5.0.15-x86_64: ERRORS
linux-5.1.1-i686: OK
linux-5.1.1-x86_64: OK
linux-5.2.1-i686: OK
linux-5.2.1-x86_64: OK
linux-5.3-rc1-i686: OK
linux-5.3-rc1-x86_64: OK
apps: OK
spec-git: OK
virtme: OK: Final Summary: 2329, Succeeded: 2329, Failed: 0, Warnings: 0
sparse: OK
smatch: OK

Detailed results are available here:

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

Detailed regression test results are available here:

http://www.xs4all.nl/~hverkuil/logs/Thursday-test-media.log
http://www.xs4all.nl/~hverkuil/logs/Thursday-test-media-dmesg.log

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.html


Build failed in Jenkins: media-build #71

2019-08-14 Thread jenkins
See 

Changes:

--
[...truncated 28.49 KB...]
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  
  CC [M]  

Re: [PATCH] media: video-i2c: add mlx90640 subpage data to output

2019-08-14 Thread Matt Ranostay
On Mon, Aug 12, 2019 at 6:05 AM Hans Verkuil  wrote:
>
> Hi Matt,
>
> On 8/11/19 9:10 AM, Matt Ranostay wrote:
> > Add current subpage data via the status register to the video
> > frame in the last word of data, which seems to be unused
> > undocumented reserved data.
>
> I don't really understand from this description what is going on
> here.

Probably can make it more verbose if requested.

But simple overview is that all the frame data is from 0x400 read but
there is a some status register data that is from 0x8000
that needs to be read.

So mostly from the latter read (which can have an unlikely race
condition and be incorrect) is to confirm which sub frame that is
being read which can be one or two. You need the previous subpage
magic values to process that respective frame temperature data.

>
> mlx90640_xfer() reads the buffer data from the i2c device, but
> that data is split over two different addresses? Or does
> 0x8000 contain something else with a different meaning compared
> to what is read from 0x400?
>
> >
> > Signed-off-by: Matt Ranostay 
> > ---
> >  drivers/media/i2c/video-i2c.c | 12 ++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
> > index 078141712c88..8bc7b228ba40 100644
> > --- a/drivers/media/i2c/video-i2c.c
> > +++ b/drivers/media/i2c/video-i2c.c
> > @@ -168,8 +168,16 @@ static int amg88xx_xfer(struct video_i2c_data *data, 
> > char *buf)
> >
> >  static int mlx90640_xfer(struct video_i2c_data *data, char *buf)
> >  {
> > - return regmap_bulk_read(data->regmap, 0x400, buf,
> > - data->chip->buffer_size);
> > + int ret = regmap_bulk_read(data->regmap, 0x400, buf,
> > +data->chip->buffer_size);
>
> Shouldn't this be data->chip->buffer_size - size, since the last
> 'size' bytes will be overwritten anyway?

Yes that is true but don't see in datasheet that you can just not read
the last two bytes of the transaction.
Probably totally fine to not do so but who knows.

- Matt

>
> > + int size = data->chip->bpp / 8;
> > +
> > + if (ret)
> > + return ret;
> > +
> > + /* read status register, which contains subpage that is read */
> > + return regmap_bulk_read(data->regmap, 0x8000,
> > + &buf[data->chip->buffer_size - size], size);
> >  }
> >
> >  static int amg88xx_setup(struct video_i2c_data *data)
> >
>
> Regards,
>
> Hans


Jenkins build is back to normal : media-build #72

2019-08-14 Thread jenkins
See