Re: [PATCH v7 5/6] [media] vb2: add out-fence support to QBUF

2018-01-14 Thread Alexandre Courbot
On Thu, Jan 11, 2018 at 1:07 AM, Gustavo Padovan  wrote:
>  /*
>   * vb2_start_streaming() - Attempt to start streaming.
>   * @q: videobuf2 queue
> @@ -1489,18 +1562,16 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int 
> index, void *pb,
> if (vb->in_fence) {
> ret = dma_fence_add_callback(vb->in_fence, >fence_cb,
>  vb2_qbuf_fence_cb);
> -   if (ret == -EINVAL) {
> +   /* is the fence signaled? */
> +   if (ret == -ENOENT) {
> +   dma_fence_put(vb->in_fence);
> +   vb->in_fence = NULL;
> +   } else if (ret) {
> spin_unlock_irqrestore(>fence_cb_lock, flags);
> goto err;
> -   } else if (!ret) {
> -   goto fill;
> }
> -
> -   dma_fence_put(vb->in_fence);
> -   vb->in_fence = NULL;

This chunk seems to deal with input fences, shouldn't it be part of
the previous patch instead of this one?

>
> -   if ((b->fence_fd != 0 && b->fence_fd != -1) &&
> -   !(b->flags & V4L2_BUF_FLAG_IN_FENCE)) {
> +   if (b->fence_fd > 0 && !(b->flags & V4L2_BUF_FLAG_IN_FENCE)) {
> dprintk(1, "%s: fence_fd set without IN_FENCE flag\n", 
> opname);
> return -EINVAL;
> }
>
> +   if (b->fence_fd == -1 && (b->flags & V4L2_BUF_FLAG_IN_FENCE)) {
> +   dprintk(1, "%s: IN_FENCE flag set but no fence_fd\n", opname);
> +   return -EINVAL;
> +   }
> +

Same here?

> return __verify_planes_array(q->bufs[b->index], b);
>  }
>
> @@ -212,7 +216,12 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, 
> void *pb)
> b->sequence = vbuf->sequence;
> b->reserved = 0;
>
> -   b->fence_fd = 0;
> +   if (b->flags & V4L2_BUF_FLAG_OUT_FENCE) {
> +   b->fence_fd = vb->out_fence_fd;
> +   } else {
> +   b->fence_fd = 0;
> +   }

Sorry if this has already been discussed, but I don't remember the
outcome if it has.

I wonder if doing this here could not make out_fence_fd leak in
situations where we don't need/want it to. Let's take for instance a
multi-process user program. One process queues a buffer with an
OUT_FENCE and gets a valid fd in fence_fd upon return. Then the other
process performs a QUERYBUF and gets the same fence_fd - which is
invalid in its context. Would it not be preferable fill the out fence
information only when queuing buffers, since it is the only time where
we are guaranteed it will be usable by the caller?

Similarly, when a buffer is processed and user-space performs a DQBUF,
the V4L2_BUF_FLAG_OUT_FENCE will be set but fence_fd will be 0. Again,
limiting the return of out fence information to QBUF would prevent
this.

If we go that route, out_fence_fd could maybe become a local variable
of vb2_qbuf() instead of being a member of vb2_buffer, and would be
returned by vb2_setup_out_fence(). This would guarantee it does not
leak anywhere else.


Re: [PATCH v7 1/6] [media] vb2: add is_unordered callback for drivers

2018-01-14 Thread Alexandre Courbot
On Thu, Jan 11, 2018 at 1:07 AM, Gustavo Padovan  wrote:
> From: Gustavo Padovan 
>
> Explicit synchronization benefits a lot from ordered queues, they fit
> better in a pipeline with DRM for example so create a opt-in way for
> drivers notify videobuf2 that the queue is unordered.
>
> Drivers don't need implement it if the queue is ordered.

This is going to make user-space believe that *all* vb2 drivers use
ordered queues by default, at least until non-ordered drivers catch up
with this change. Wouldn't it be less dangerous to do the opposite
(make queues non-ordered by default)?


Re: [PATCH v5 0/9] Renesas Capture Engine Unit (CEU) V4L2 driver

2018-01-14 Thread jacopo mondi
Hello Hans,

On Fri, Jan 12, 2018 at 04:27:50PM +0200, Laurent Pinchart wrote:
> Hi Jacopo,
>
> On Friday, 12 January 2018 16:04:00 EET Jacopo Mondi wrote:
> > Hello,
> >(hopefully) last round for CEU driver.
> >
> > Changelog is quite thin, I have updated CEU driver MODULE_LICENSE to match
> > SPDX identifier, added Rob's and Laurent's Reviewed-by tags to bindings, and
> > made variables of "struct ceu_data" type static in the driver.
> >
> > All of the patches are now Reviewed/Acked. Time to have this series
> > included?
>
> Yes please !
>
> Hans, could you pick this up ?

Hans, since this series contains changes for the SH architecture as
well, and SH maintainers have prove to be somehow unreachable, could
you please consider to have the whole series being merged thorough
your tree?

Thanks
   j

>
> > v4->v5:
> > - Added Rob's and Laurent's Reviewed-by tag to DT bindings
> > - Change CEU driver module license to "GPL v2" to match SPDX identifier as
> >   suggested by Philippe Ombredanne
> > - Make struct ceu_data static as suggested by Laurent and add his
> >   Reviewed-by to CEU driver.
> >
> > v3->v4:
> > - Drop generic fallback compatible string "renesas,ceu"
> > - Addressed Laurent's comments on [3/9]
> >   - Fix error messages on irq get/request
> >   - Do not leak ceudev if irq_get fails
> >   - Make irq_mask a const field
> >
> > v2->v3:
> > - Improved DT bindings removing standard properties (pinctrl- ones and
> >   remote-endpoint) not specific to this driver and improved description of
> >   compatible strings
> > - Remove ov772x's xlkc_rate property and set clock rate in Migo-R board file
> > - Made 'xclk' clock private to ov772x driver in Migo-R board file
> > - Change 'rstb' GPIO active output level and changed ov772x and tw9910
> > drivers accordingly as suggested by Fabio
> > - Minor changes in CEU driver to address Laurent's comments
> > - Moved Migo-R setup patch to the end of the series to silence 0-day bot
> > - Renamed tw9910 clock to 'xti' as per video decoder manual
> > - Changed all SPDX identifiers to GPL-2.0 from previous GPL-2.0+
> >
> > v1->v2:
> >  - DT
> >  -- Addressed Geert's comments and added clocks for CEU to mstp6 clock
> > source -- Specified supported generic video iterfaces properties in
> > dt-bindings and simplified example
> >
> >  - CEU driver
> >  -- Re-worked interrupt handler, interrupt management, reset(*) and capture
> > start operation
> >  -- Re-worked querycap/enum_input/enum_frameintervals to fix some
> > v4l2_compliance failures
> >  -- Removed soc_camera legacy operations g/s_mbus_format
> >  -- Update to new notifier implementation
> >  -- Fixed several comments from Hans, Laurent and Sakari
> >
> >  - Migo-R
> >  -- Register clocks and gpios for sensor drivers in Migo-R setup
> >  -- Updated sensors (tw9910 and ov772x) drivers headers and drivers to close
> > remarks from Hans and Laurent:
> >  --- Removed platform callbacks and handle clocks and gpios from sensor
> > drivers --- Remove g/s_mbus_config operations
> >
> > Jacopo Mondi (9):
> >   dt-bindings: media: Add Renesas CEU bindings
> >   include: media: Add Renesas CEU driver interface
> >   v4l: platform: Add Renesas CEU driver
> >   ARM: dts: r7s72100: Add Capture Engine Unit (CEU)
> >   v4l: i2c: Copy ov772x soc_camera sensor driver
> >   media: i2c: ov772x: Remove soc_camera dependencies
> >   v4l: i2c: Copy tw9910 soc_camera sensor driver
> >   media: i2c: tw9910: Remove soc_camera dependencies
> >   arch: sh: migor: Use new renesas-ceu camera driver
> >
> >  .../devicetree/bindings/media/renesas,ceu.txt  |   81 +
> >  arch/arm/boot/dts/r7s72100.dtsi|   15 +-
> >  arch/sh/boards/mach-migor/setup.c  |  225 ++-
> >  arch/sh/kernel/cpu/sh4a/clock-sh7722.c |2 +-
> >  drivers/media/i2c/Kconfig  |   20 +
> >  drivers/media/i2c/Makefile |2 +
> >  drivers/media/i2c/ov772x.c | 1181 ++
> >  drivers/media/i2c/tw9910.c | 1039 
> >  drivers/media/platform/Kconfig |9 +
> >  drivers/media/platform/Makefile|1 +
> >  drivers/media/platform/renesas-ceu.c   | 1648 +
> >  include/media/drv-intf/renesas-ceu.h   |   26 +
> >  include/media/i2c/ov772x.h |6 +-
> >  include/media/i2c/tw9910.h |9 +
> >  14 files changed, 4133 insertions(+), 131 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/media/renesas,ceu.txt
> >  create mode 100644 drivers/media/i2c/ov772x.c
> >  create mode 100644 drivers/media/i2c/tw9910.c
> >  create mode 100644 drivers/media/platform/renesas-ceu.c
> >  create mode 100644 include/media/drv-intf/renesas-ceu.h
>
> --
> Regards,
>
> Laurent Pinchart
>


cron job: media_tree daily build: ERRORS

2018-01-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:   Mon Jan 15 05:00:17 CET 2018
media-tree git hash:e3ee691dbf24096ea51b3200946b11d68ce75361
media_build git hash:   2bd1f1623fbadfdc1026712b3d55141ba164c403
v4l-utils git hash: 351eb68ac235f37f749a1c5d6ed2fae80e9dffe3
gcc version:i686-linux-gcc (GCC) 7.1.0
sparse version: v0.5.0-3911-g6f737e1f
smatch version: v0.5.0-3911-g6f737e1f
host hardware:  x86_64
host os:4.13.0-164

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-blackfin-bf561: 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.36.4-i686: ERRORS
linux-2.6.37.6-i686: ERRORS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: ERRORS
linux-3.0.60-i686: ERRORS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: ERRORS
linux-3.5.7-i686: ERRORS
linux-3.6.11-i686: ERRORS
linux-3.7.4-i686: ERRORS
linux-3.8-i686: ERRORS
linux-3.9.2-i686: WARNINGS
linux-3.10.1-i686: WARNINGS
linux-3.11.1-i686: ERRORS
linux-3.12.67-i686: ERRORS
linux-3.13.11-i686: ERRORS
linux-3.14.9-i686: ERRORS
linux-3.15.2-i686: ERRORS
linux-3.16.7-i686: ERRORS
linux-3.17.8-i686: ERRORS
linux-3.18.7-i686: ERRORS
linux-3.19-i686: ERRORS
linux-4.0.9-i686: ERRORS
linux-4.1.33-i686: ERRORS
linux-4.2.8-i686: ERRORS
linux-4.3.6-i686: ERRORS
linux-4.4.22-i686: ERRORS
linux-4.5.7-i686: ERRORS
linux-4.6.7-i686: ERRORS
linux-4.7.5-i686: ERRORS
linux-4.8-i686: ERRORS
linux-4.9.26-i686: ERRORS
linux-4.10.14-i686: WARNINGS
linux-4.11-i686: WARNINGS
linux-4.12.1-i686: WARNINGS
linux-4.13-i686: WARNINGS
linux-4.14-i686: WARNINGS
linux-2.6.36.4-x86_64: ERRORS
linux-2.6.37.6-x86_64: ERRORS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: ERRORS
linux-3.0.60-x86_64: ERRORS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: ERRORS
linux-3.5.7-x86_64: ERRORS
linux-3.6.11-x86_64: ERRORS
linux-3.7.4-x86_64: ERRORS
linux-3.8-x86_64: ERRORS
linux-3.9.2-x86_64: WARNINGS
linux-3.10.1-x86_64: WARNINGS
linux-3.11.1-x86_64: ERRORS
linux-3.12.67-x86_64: ERRORS
linux-3.13.11-x86_64: ERRORS
linux-3.14.9-x86_64: ERRORS
linux-3.15.2-x86_64: ERRORS
linux-3.16.7-x86_64: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.7-x86_64: ERRORS
linux-3.19-x86_64: ERRORS
linux-4.0.9-x86_64: ERRORS
linux-4.1.33-x86_64: ERRORS
linux-4.2.8-x86_64: ERRORS
linux-4.3.6-x86_64: ERRORS
linux-4.4.22-x86_64: ERRORS
linux-4.5.7-x86_64: ERRORS
linux-4.6.7-x86_64: ERRORS
linux-4.7.5-x86_64: ERRORS
linux-4.8-x86_64: ERRORS
linux-4.9.26-x86_64: ERRORS
linux-4.10.14-x86_64: WARNINGS
linux-4.11-x86_64: WARNINGS
linux-4.12.1-x86_64: WARNINGS
linux-4.13-x86_64: WARNINGS
linux-4.14-x86_64: WARNINGS
apps: OK
spec-git: OK
smatch: OK

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

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


[PATCH] dma-buf/sw_sync: fix document of sw_sync_create_fence_data

2018-01-14 Thread Shawn Guo
The structure should really be sw_sync_create_fence_data rather than
sw_sync_ioctl_create_fence which is the function name.

Signed-off-by: Shawn Guo 
---
 drivers/dma-buf/sw_sync.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c
index 24f83f9eeaed..7779bdbd18d1 100644
--- a/drivers/dma-buf/sw_sync.c
+++ b/drivers/dma-buf/sw_sync.c
@@ -43,14 +43,14 @@
  * timelines.
  *
  * Fences can be created with SW_SYNC_IOC_CREATE_FENCE ioctl with struct
- * sw_sync_ioctl_create_fence as parameter.
+ * sw_sync_create_fence_data as parameter.
  *
  * To increment the timeline counter, SW_SYNC_IOC_INC ioctl should be used
  * with the increment as u32. This will update the last signaled value
  * from the timeline and signal any fence that has a seqno smaller or equal
  * to it.
  *
- * struct sw_sync_ioctl_create_fence
+ * struct sw_sync_create_fence_data
  * @value: the seqno to initialise the fence with
  * @name:  the name of the new sync point
  * @fence: return the fd of the new sync_file with the created fence
-- 
1.9.1



RE: [PATCH v4 00/12] [dt-bindings] [media] Add document file and driver for Sony CXD2880 DVB-T2/T tuner + demodulator

2018-01-14 Thread Takiguchi, Yasunari
Dear Mauro

> 
> I am creating patch files for version 5 of our driver.
> I need to add our driver information into
> /drivers/media/dvb-frontends/Kconfig.
> This Kconfig has no SPDX license Identifier now.
> Is it unnecessary for us to add SPDX into
> /drivers/media/dvb-frontends/Kconfig?
> (Should we add our driver information only into
> /drivers/media/dvb-frontends/Kconfig?)

Additionally, 
I need to add our driver information into 
driver/media/spi/Makefile and driver/media/spi/Kconfig,
But these Makefile and Kconfig also has 
no SPDX license Identifier now.
Should I keep no SPDX for them also?

Best Regards,
Takiguchi


RE: [PATCH v4 00/12] [dt-bindings] [media] Add document file and driver for Sony CXD2880 DVB-T2/T tuner + demodulator

2018-01-14 Thread Takiguchi, Yasunari
Dear Mauro

I am creating patch files for version 5 of our driver.
I need to add our driver information into /drivers/media/dvb-frontends/Kconfig.
This Kconfig has no SPDX license Identifier now.
Is it unnecessary for us to add SPDX into  /drivers/media/dvb-frontends/Kconfig?
(Should we add our driver information only into 
/drivers/media/dvb-frontends/Kconfig?)

Regards,
Takiguchi


[PATCH] media: usbtv: Add USB ID 1f71:3306 to the UTV007 driver

2018-01-14 Thread Ian Douglas Scott
Signed-off-by: Ian Douglas Scott 
---
 drivers/media/usb/usbtv/usbtv-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/usb/usbtv/usbtv-core.c 
b/drivers/media/usb/usbtv/usbtv-core.c
index 127f8a0c098b..fe75a0032945 100644
--- a/drivers/media/usb/usbtv/usbtv-core.c
+++ b/drivers/media/usb/usbtv/usbtv-core.c
@@ -145,6 +145,7 @@ static void usbtv_disconnect(struct usb_interface *intf)
 static const struct usb_device_id usbtv_id_table[] = {
{ USB_DEVICE(0x1b71, 0x3002) },
{ USB_DEVICE(0x1f71, 0x3301) },
++  { USB_DEVICE(0x1f71, 0x3306) },
{}
 };
 MODULE_DEVICE_TABLE(usb, usbtv_id_table);
-- 
2.15.1



Re: [PATCH 2/2] media: intel-ipu3: cio2: fix for wrong vb2buf state warnings

2018-01-14 Thread Sakari Ailus
Hi Tomasz and others,

On Fri, Jan 12, 2018 at 05:19:04PM +0900, Tomasz Figa wrote:
> On Thu, Jan 4, 2018 at 11:57 AM, Yong Zhi  wrote:
...
> > @@ -793,7 +794,7 @@ static void cio2_vb2_return_all_buffers(struct 
> > cio2_queue *q)
> > if (q->bufs[i]) {
> > atomic_dec(>bufs_queued);
> > vb2_buffer_done(>bufs[i]->vbb.vb2_buf,
> > -   VB2_BUF_STATE_ERROR);
> > +   state);
> 
> nit: Does it really exceed 80 characters after folding into previous line?
> 
> With the nit fixed:
> Reviewed-by: Tomasz Figa 

The patches have been merged to media tree master; if there are matters to
address, then please send more patches on top of the master branch. :-)

Thanks.

-- 
Cheers,

Sakari Ailus
sakari.ai...@linux.intel.com


[PATCH] [v4l-utils] sdlcam: Only build if using libjpeg

2018-01-14 Thread Chris Mayo
Signed-off-by: Chris Mayo 
---

Otherwise build fails on linking:

libtool: link: x86_64-pc-linux-gnu-gcc -march=ivybridge -ftree-vectorize -O2 
-pipe -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o pixfmt-test 
pixfmt_test-pixfmt-test.o  -lX11
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: 
sdlcam-sdlcam.o: undefined reference to symbol 'jpeg_set_quality@@LIBJPEG_6.2'
/usr/lib64/libjpeg.so.62: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:558: sdlcam] Error 1

Affects released v4l-utils-1.14.1.

 contrib/test/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am
index 0188fe214..c7c38e7a6 100644
--- a/contrib/test/Makefile.am
+++ b/contrib/test/Makefile.am
@@ -17,8 +17,10 @@ noinst_PROGRAMS += v4l2gl
 endif
 
 if HAVE_SDL
+if HAVE_JPEG
 noinst_PROGRAMS += sdlcam
 endif
+endif
 
 driver_test_SOURCES = driver-test.c
 driver_test_LDADD = ../../utils/libv4l2util/libv4l2util.la
-- 
2.13.6



ITE IT9303FN: af9035_ctrl_msg: command=2b failed fw error=21

2018-01-14 Thread Mike Maravillo
Hi guys,

I'm not sure if this is the right place to post this.

I have this card http://www.gadgetaddict.net/myphone-dtv-dongle/

Is there a chance to get this working on the Raspberry Pi 3 based on
below's dmesg output?

[ 2412.224084] usb 1-1: new high-speed USB device number 10 using ehci-pci
[ 2412.582937] usb 1-1: New USB device found, idVendor=048d, idProduct=9306
[ 2412.582943] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2412.643448] [1746] usb 1-1: dvb_usbv2_probe: bInterfaceNumber=0
[ 2412.643463] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 0b 00 00 00
03 02 00 00 12 22 db ea
[ 2412.648672] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 07 00 00 01
06 93 6b f9
[ 2412.648684] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 0b 00 00 01
01 02 00 00 38 4f ad c6
[ 2412.652713] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 05 01 00 83 7b ff
[ 2412.652722] usb 1-1: dvb_usb_af9035: prechip_version=83
chip_version=01 chip_type=9306
[ 2412.652727] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 06 00 22 02 01 fd dc
[ 2412.656734] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 08 02 00 00
00 00 00 fd ff
[ 2412.656743] [1746] usb 1-1: af9035_identify_state: reply=00 00 00 00
[ 2412.656747] usb 1-1: dvb_usb_v2: found a 'ITE 9303 Generic' in cold state
[ 2412.656750] [1746] usb 1-1: dvb_usbv2_download_firmware:
[ 2412.656810] usb 1-1: dvb_usb_v2: downloading firmware from file
'dvb-usb-it9303-01.fw'
[ 2412.656814] [1746] usb 1-1: af9035_download_firmware:
[ 2412.656818] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 0b 00 00 03
01 02 00 00 49 c5 35 b5
[ 2412.661103] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 05 03 00 00 fc ff
[ 2412.661116] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 04
03 00 00 03 41 00 03 41 80 06 41 93 1a 02 12 bf 02 41 93 22 00 00 a2
af e4 33 90 7c 00 f0 a2 dd e4 33 a3 f0 7e 4b 7f fc 7c 44 7d ca 7b 04
12 a1 aa 4b
[ 2412.666246] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 04 00 fb ff
[ 2412.666258] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=48
[ 2412.666285] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 05
03 00 00 01 41 ad 29 5f e4 ff 74 3b 2f f5 82 e4 34 f5 f5 83 74 ff f0
0f ef b4 40 ee c2 dd c2 af 74 89 90 f5 3b f0 74 41 a3 f0 74 4c 90 f5
5b f0 4b 6b
[ 2412.670091] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 05 00 fa ff
[ 2412.670102] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=96
[ 2412.670108] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 06
03 00 00 01 41 d6 29 74 00 a3 f0 74 2f 90 f5 3d f0 74 f5 a3 f0 74 44
90 f5 5d f0 74 76 a3 f0 74 89 90 f5 3f f0 74 2c a3 f0 74 44 90 f5 5f
f0 74 fc 3e
[ 2412.673737] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 06 00 f9 ff
[ 2412.673747] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=144
[ 2412.673753] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 07
03 00 00 01 41 ff 29 68 a3 f0 74 89 90 f5 41 f0 74 31 a3 f0 74 44 90
f5 61 f0 74 6f a3 f0 74 87 90 f5 43 f0 74 59 a3 f0 74 43 90 f5 63 f0
74 04 9e b5
[ 2412.678121] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 07 00 f8 ff
[ 2412.678133] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=192
[ 2412.678138] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 08
03 00 00 01 42 28 29 a3 f0 74 87 90 f5 45 f0 74 e1 a3 f0 74 43 90 f5
65 f0 74 e3 a3 f0 74 88 90 f5 47 f0 74 3a a3 f0 74 42 90 f5 67 f0 74
a2 a3 57 e0
[ 2412.681865] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 08 00 f7 ff
[ 2412.681875] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=240
[ 2412.681882] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 09
03 00 00 01 42 51 29 f0 90 f5 3a e0 54 fe 44 01 f0 c2 ae c2 8e 43 8e
10 d2 df 75 c0 50 53 89 0f 43 89 20 75 8b be 75 8d be d2 8e c2 c1 c2
ae d2 8d 0e
[ 2412.685887] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 09 00 f6 ff
[ 2412.685899] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=288
[ 2412.685906] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 0a
03 00 00 01 42 7a 29 be 12 88 3c e4 90 79 04 f0 90 d9 24 e0 54 fe 44
01 f0 e4 90 49 62 f0 90 7c 01 e0 24 ff 92 dd 90 7c 00 e0 24 ff 92 af
22 90 39 a9
[ 2412.690693] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 0a 00 f5 ff
[ 2412.690704] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=336
[ 2412.690710] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 0b
03 00 00 01 42 a3 29 f7 04 e0 70 24 c2 ae c2 8e 43 8e 10 d2 df 75 c0
50 53 89 0f 43 89 20 75 8b be 75 8d be d2 8e c2 c1 c2 ae 90 49 62 f0
80 24 e6 0b
[ 2412.695033] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 0b 00 f4 ff
[ 2412.695044] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=384
[ 2412.695050] [1746] usb 1-1: dvb_usb_v2_generic_io: >>> 35 00 29 0c
03 00 00 01 42 cc 29 c2 ae c2 8e 43 8e 10 d2 df 75 c0 d0 53 89 0f 43
89 20 75 8b be 75 8d be d2 8e c2 c1 d2 ae 90 49 62 74 01 f0 d2 be 12
88 3c 80 ed
[ 2412.698733] [1746] usb 1-1: dvb_usb_v2_generic_io: <<< 04 0c 00 f3 ff
[ 2412.698742] [1746] usb 1-1: af9035_download_firmware_new: data uploaded=432
[ 

Re: [PATCH] media: uvcvideo: Fixed ktime_t to ns conversion

2018-01-14 Thread Arnd Bergmann
On Sun, Jan 14, 2018 at 11:21 AM, Jasmin J.  wrote:
> From: Jasmin Jessich 
>
> Commit 828ee8c71950 ("media: uvcvideo: Use ktime_t for timestamps")
> changed to use ktime_t for timestamps. Older Kernels use a struct for
> ktime_t, which requires the conversion function ktime_to_ns to be used on
> some places. With this patch it will compile now also for older Kernel
> versions.
>
> Signed-off-by: Jasmin Jessich 

Looks good to me,

Acked-by: Arnd Bergmann 


Re: [PATCH] build: Disabled VIDEO_IPU3_CIO2 for Kernels older than 3.18.17

2018-01-14 Thread Jasmin J.
Hi!

With that it compiles again for Kernel 3.13.

Please note, that
  https://patchwork.linuxtv.org/patch/46464/
needs to be applied to compile for Kernels older 4.10.

BR,
   Jasmin


[PATCH] build: Disabled VIDEO_IPU3_CIO2 for Kernels older than 3.18.17

2018-01-14 Thread Jasmin J.
From: Jasmin Jessich 

The driver requires linux/property.h, which is available since Kernel
3.18.17 only.

Signed-off-by: Jasmin Jessich 
---
 v4l/versions.txt | 4 
 1 file changed, 4 insertions(+)

diff --git a/v4l/versions.txt b/v4l/versions.txt
index 945e1c3..bf19bb1 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -55,6 +55,10 @@ MEDIA_CEC_SUPPORT
 # needs fwnode_property_read_u32
 SDR_MAX2175
 
+[3.18.17]
+# requires linux/property.h
+VIDEO_IPU3_CIO2
+
 [3.18.0]
 # needs LED brightness support
 V4L2_FLASH_LED_CLASS
-- 
2.7.4



[PATCH] build: Disabled VIDEO_OV7740 for Kernels older than 4.3

2018-01-14 Thread Jasmin J.
From: Jasmin Jessich 

Signed-off-by: Jasmin Jessich 
---
 v4l/versions.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/v4l/versions.txt b/v4l/versions.txt
index ed1e056..945e1c3 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -35,6 +35,8 @@ VIDEO_SOLO6X10
 [4.3.0]
 # needs regmap_write_bits
 MEDIA_TUNER_TDA18250
+# Needs struct reg_sequence
+VIDEO_OV7740
 
 [4.2.0]
 # needs led_trigger_remove
-- 
2.7.4



Re: [PATCH] media: uvcvideo: Fixed ktime_t to ns conversion

2018-01-14 Thread Jasmin J.
Hi!

I tested this patch (compile only) on Kernel 4.4.
For 3.13 there is something else not working, so I (or Hans) needs to have a
look on that.

BR,
   Jasmin


[PATCH] media: uvcvideo: Fixed ktime_t to ns conversion

2018-01-14 Thread Jasmin J.
From: Jasmin Jessich 

Commit 828ee8c71950 ("media: uvcvideo: Use ktime_t for timestamps")
changed to use ktime_t for timestamps. Older Kernels use a struct for
ktime_t, which requires the conversion function ktime_to_ns to be used on
some places. With this patch it will compile now also for older Kernel
versions.

Signed-off-by: Jasmin Jessich 
---
 drivers/media/usb/uvc/uvc_video.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_video.c 
b/drivers/media/usb/uvc/uvc_video.c
index 5441553..1670aeb 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1009,7 +1009,7 @@ static int uvc_video_decode_start(struct uvc_streaming 
*stream,
 
buf->buf.field = V4L2_FIELD_NONE;
buf->buf.sequence = stream->sequence;
-   buf->buf.vb2_buf.timestamp = uvc_video_get_time();
+   buf->buf.vb2_buf.timestamp = ktime_to_ns(uvc_video_get_time());
 
/* TODO: Handle PTS and SCR. */
buf->state = UVC_BUF_STATE_ACTIVE;
@@ -1191,7 +1191,8 @@ static void uvc_video_decode_meta(struct uvc_streaming 
*stream,
 
uvc_trace(UVC_TRACE_FRAME,
  "%s(): t-sys %lluns, SOF %u, len %u, flags 0x%x, PTS %u, STC 
%u frame SOF %u\n",
- __func__, time, meta->sof, meta->length, meta->flags,
+ __func__, ktime_to_ns(time), meta->sof, meta->length,
+ meta->flags,
  has_pts ? *(u32 *)meta->buf : 0,
  has_scr ? *(u32 *)scr : 0,
  has_scr ? *(u32 *)(scr + 4) & 0x7ff : 0);
-- 
2.7.4