Re: em28xx problem with 3.10-4.0

2015-06-15 Thread Gabor Z. Papp
* "Gabor Z. Papp" :

| I would like to use my Pinnacle Dazzle DVC usb encoder with kernels
| 3.10-4.0, but I'm getting the same error all the time.

| Latest working kernel is the 3.4 line.

| What happend with the driver?

Should I provide more details than the dmesg output?

Linux video capture interface: v2.00
em28xx: New device Pinnacle Systems GmbH DVC100 @ 480 Mbps (2304:021a, 
interface 0, class 0)
em28xx: Video interface 0 found: bulk isoc
em28xx: chip ID is em2710/2820
em2710/2820 #0: EEPROM ID = 1a eb 67 95, EEPROM hash = 0xe2ac7680
em2710/2820 #0: EEPROM info:
em2710/2820 #0: AC97 audio (5 sample rates)
em2710/2820 #0: 300mA max power
em2710/2820 #0: Table at offset 0x06, strings=0x1098, 0x2e6a, 0x
em2710/2820 #0: Identified as Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas 
Video to DVD maker / Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U (card=9)
em2710/2820 #0: analog set to isoc mode.
em28xx audio device (2304:021a): interface 1, class 1
em28xx audio device (2304:021a): interface 2, class 1
usbcore: registered new interface driver em28xx
em2710/2820 #0: Registering V4L2 extension
saa7115 1-0025: saa7113 found @ 0x4a (em2710/2820 #0)
em2710/2820 #0: Config register raw data: 0x12
em2710/2820 #0: AC97 vendor ID = 0x83847650
em2710/2820 #0: AC97 features = 0x6a90
em2710/2820 #0: Empia 202 AC97 audio processor detected
em2710/2820 #0: V4L2 video device registered as video0
em2710/2820 #0: V4L2 extension successfully initialized
em28xx: Registered (Em28xx v4l2 Extension) extension
Linux agpgart interface v0.103
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky 
ffmpeg: page allocation failure: order:6, mode:0xd0
CPU: 0 PID: 3721 Comm: ffmpeg 4.0.5-gzp1 #1
Hardware name: System manufacturer System Product Name/P5W64 WS Pro, BIOS 1201  
  10/01/2008
  c12e214e 0001 c109221f c137382c f51ff478 0006 00d0
 0001 00d0 0040 00d0 c109419f 00d0 0006 
 0028 0040 0010 0028 0040  0050 f51ff1c0
Call Trace:
 [] ? dump_stack+0x3e/0x4e
 [] ? warn_alloc_failed+0xaf/0xf0
 [] ? __alloc_pages_nodemask+0x39f/0x5a0
 [] ? dma_generic_alloc_coherent+0x8f/0xd0
 [] ? via_no_dac+0x40/0x40
 [] ? hcd_buffer_alloc+0xbb/0x140 [usbcore]
 [] ? em28xx_alloc_urbs+0x191/0x410 [em28xx]
 [] ? saa711x_writeregs+0x36/0x90 [saa7115]
 [] ? em28xx_init_usb_xfer+0x52/0x160 [em28xx]
 [] ? em28xx_start_analog_streaming+0x230/0x410 [em28xx_v4l]
 [] ? em28xx_wake_i2c+0xc0/0xc0 [em28xx_v4l]
 [] ? buffer_queue+0x53/0xb0 [em28xx_v4l]
 [] ? __buf_prepare+0x28e/0x300 [videobuf2_core]
 [] ? vb2_start_streaming+0x52/0x130 [videobuf2_core]
 [] ? vb2_internal_qbuf+0xcd/0x200 [videobuf2_core]
 [] ? vb2_internal_streamon+0x10f/0x150 [videobuf2_core]
 [] ? vb2_ioctl_streamon+0xc/0x40 [videobuf2_core]
 [] ? v4l_streamon+0x13/0x20 [videodev]
 [] ? __video_do_ioctl+0x230/0x2d0 [videodev]
 [] ? __pte_alloc+0x1e/0x80
 [] ? video_usercopy+0x19f/0x3d0 [videodev]
 [] ? inode_to_bdi+0x12/0x40
 [] ? vma_wants_writenotify+0x6a/0x80
 [] ? vma_set_page_prot+0x25/0x50
 [] ? mmap_region+0x138/0x4f0
 [] ? video_ioctl2+0xf/0x20 [videodev]
 [] ? video_ioctl2+0x20/0x20 [videodev]
 [] ? v4l2_ioctl+0xdd/0x120 [videodev]
 [] ? v4l2_open+0xe0/0xe0 [videodev]
 [] ? do_vfs_ioctl+0x31f/0x540
 [] ? do_mmap_pgoff+0x2a6/0x330
 [] ? vm_mmap_pgoff+0x56/0x80
 [] ? SyS_ioctl+0x3c/0x70
 [] ? sysenter_do_call+0x12/0x12
Mem-Info:
DMA per-cpu:
CPU0: hi:0, btch:   1 usd:   0
CPU1: hi:0, btch:   1 usd:   0
CPU2: hi:0, btch:   1 usd:   0
CPU3: hi:0, btch:   1 usd:   0
Normal per-cpu:
CPU0: hi:  186, btch:  31 usd:   0
CPU1: hi:  186, btch:  31 usd:   0
CPU2: hi:  186, btch:  31 usd: 167
CPU3: hi:  186, btch:  31 usd:   0
HighMem per-cpu:
CPU0: hi:  186, btch:  31 usd:   0
CPU1: hi:  186, btch:  31 usd:   0
CPU2: hi:  186, btch:  31 usd:   0
CPU3: hi:  186, btch:  31 usd:   0
active_anon:86766 inactive_anon:53673 isolated_anon:0
 active_file:67864 inactive_file:145211 isolated_file:0
 unevictable:0 dirty:3 writeback:0 unstable:0
 free:109849 slab_reclaimable:37567 slab_unreclaimable:4346
 mapped:20327 shmem:256 pagetables:748 bounce:0
 free_cma:0
DMA free:3504kB min:64kB low:80kB high:96kB active_anon:1448kB 
inactive_anon:1596kB active_file:5600kB inactive_file:2296kB unevictable:0kB 
isolated(anon):0kB isolated(file):0kB present:15992kB managed:15916kB 
mlocked:0kB dirty:0kB writeback:0kB mapped:824kB shmem:0kB 
slab_reclaimable:816kB slab_unreclaimable:164kB kernel_stack:0kB 
pagetables:24kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB 
pages_scanned:20 all_unreclaimable? no
lowmem_reserve[]: 0 849 2009 2009
Normal free:44592kB min:3696kB low:4620kB high:5544kB active_anon:93048kB 
inactive_anon:98172kB active_file:209520kB inactive_file:227252kB 
unevictable:0kB isolated(anon):0kB isolated(file):128kB present:892920kB 
managed:870660kB mlocked:0kB dirty:12kB writeback:0kB mapped:

Re: [PATCH v6 00/11]

2015-06-15 Thread Hans Verkuil
On 05/04/2015 07:32 PM, Kamil Debski wrote:
> Hi,
> 
> The sixth version of this patchset addresses recent comments on the mailing
> list. Please see the changelog below for details.

Just in case people are wondering what happened to this: about a month ago I
took over from Kamil and I am working hard to get a v7 posted. I'm currently
working on a utility to send messages over the cec line and once that's done
I plan on posting a new version which should be close to the final version.

One of the main problems is making sure that the framework covers the full
CEC 2.0 functionality (or at least, making sure that any missing pieces can
be added seamlessly later). CEC 2.0 is a lot more strict in what should and
what shouldn't be implemented, so this takes time.

Regards,

Hans

> 
> Best wishes,
> Kamil Debski
> 
> Changes since v5
> 
> - drop struct cec_timeval in favour of a __u64 that keeps the timestamp in ns
> - remove userspace documentation from Documentation/cec.txt as userspace API
>   is described in the DocBook
> - add missing documentation for the passthrough mode to the DocBook
> - add information about the number of events that can be queued
> - fix misspelling of reply
> - fix behaviour of posting an event in cec_received_msg, such that the 
> behaviour
>   is consistent with the documentation
> 
> Changes since v4
> 
> - add sequence numbering to transmitted messages
> - add sequence number handling to event hanlding
> - add passthrough mode
> - change reserved field sizes
> - fixed CEC version defines and addec CEC 2.0 commands
> - add DocBook documentation
> 
> Changes since v3
> 
> - remove the promiscuous mode
> - rewrite the devicetree patches
> - fixes, expansion and partial rewrite of the documentation
> - reorder of API structures and addition of reserved fields
> - use own struct to report time (32/64 bit safe)
> - fix of handling events
> - add cec.h to include/uapi/linux/Kbuild
> - fixes in the adv76xx driver (add missing methods, change adv7604 to adv76xx)
> - cleanup of debug messages in s5p-cec driver
> - remove non necessary claiming of a gpio in the s5p-cec driver
> - cleanup headers of the s5p-cec driver
> 
> Changes since v2
> ===-
> - added promiscuous mode
> - added new key codes to the input framework
> - add vendor ID reporting
> - add the possibility to clear assigned logical addresses
> - cleanup of the rc cec map
> 
> Changes since v1
> 
> - documentation edited and moved to the Documentation folder
> - added key up/down message handling
> - add missing CEC commands to the cec.h file
> 
> Background
> ==
> 
> The work on a common CEC framework was started over three years ago by Hans
> Verkuil. Unfortunately the work has stalled. As I have received the task of
> creating a driver for the CEC interface module present on the Exynos range of
> SoCs, I got in touch with Hans. He replied that the work stalled due to his
> lack of time.
> 
> Original RFC by Hans Verkuil/Martin Bugge
> =
> https://www.mail-archive.com/linux-media@vger.kernel.org/msg28735.html
> 
> 
> Hans Verkuil (5):
>   cec: add HDMI CEC framework
>   DocBook/media: add CEC documentation
>   v4l2-subdev: add HDMI CEC ops
>   cec: adv7604: add cec support.
>   cec: adv7511: add cec support.
> 
> Kamil Debski (6):
>   dts: exynos4*: add HDMI CEC pin definition to pinctrl
>   dts: exynos4: add node for the HDMI CEC device
>   dts: exynos4412-odroid*: enable the HDMI CEC device
>   HID: add HDMI CEC specific keycodes
>   rc: Add HDMI CEC protoctol handling
>   cec: s5p-cec: Add s5p-cec driver
> 
>  Documentation/DocBook/media/Makefile   |4 +-
>  Documentation/DocBook/media/v4l/biblio.xml |   10 +
>  Documentation/DocBook/media/v4l/cec-api.xml|   74 ++
>  Documentation/DocBook/media/v4l/cec-func-close.xml |   59 +
>  Documentation/DocBook/media/v4l/cec-func-ioctl.xml |   73 ++
>  Documentation/DocBook/media/v4l/cec-func-open.xml  |   94 ++
>  Documentation/DocBook/media/v4l/cec-func-poll.xml  |   89 ++
>  .../DocBook/media/v4l/cec-ioc-g-adap-log-addrs.xml |  275 +
>  .../DocBook/media/v4l/cec-ioc-g-adap-phys-addr.xml |   78 ++
>  .../DocBook/media/v4l/cec-ioc-g-adap-state.xml |   87 ++
>  Documentation/DocBook/media/v4l/cec-ioc-g-caps.xml |  173 +++
>  .../DocBook/media/v4l/cec-ioc-g-event.xml  |  125 ++
>  .../DocBook/media/v4l/cec-ioc-g-passthrough.xml|   88 ++
>  .../DocBook/media/v4l/cec-ioc-g-vendor-id.xml  |   70 ++
>  .../DocBook/media/v4l/cec-ioc-receive.xml  |  185 +++
>  Documentation/DocBook/media_api.tmpl   |6 +-
>  Documentation/cec.txt  |  165 +++
>  .../devicetree/bindings/media/s5p-cec.txt  |   33 +
>  arch/arm/boot/dts/exynos4.dtsi |   12 +
>  arch/arm/boot/dts/exynos4210-pinctrl.dtsi  |7 +
>  arch/arm/boot/dts/exynos44

Re: [RFC v3 00/19] New ioct VIDIOC_G_DEF_EXT_CTRLS

2015-06-15 Thread Hans Verkuil
Hi Ricardo,

This patch series looks good to me. I'll wait a bit to see if anyone else has
comments. If not, then I'll merge for 4.3.

Regards,

Hans

On 06/12/2015 06:46 PM, Ricardo Ribalda Delgado wrote:
> Integer controls provide a way to get their default/initial value, but
> any other control (p_u32, p_u8.) provide no other way to get the
> initial value than unloading the module and loading it back.
> 
> *What is the actual problem?
> I have a custom control with WIDTH integer values. Every value
> represents the calibrated FPN (fixed pattern noise) correction value for that
> column
> -Application A changes the FPN correction value
> -Application B wants to restore the calibrated value but it cant :(
> 
> *What is the proposed solution?
> -Add a new ioctl VIDIOC_G_DEF_EXT_CTRLS, with the same API as
> G_EXT_CTRLS, but that returns the initial value of a given control.
> 
> 
> I have posted a copy of my working tree to
> 
> https://github.com/ribalda/linux/tree/g_def_ext-rfc3
> 
> It has been tested with a hacked version of yavta (for normal controls) and a
> custom program for the array control.
> 
> Changelog v3:
> -Comments by Hans Verkuil:
> -Remove the control ops from the following drivers
> saa7706
> ivtv-gpio
> wm8739
> tvp7002
> tvp514x
> tvl320aic23b
> tda7432
> sr030pc30
> saa717x
> cs5345
> adv7393
> adv7343
> 
> Changelog v2:
> -Add documentation
> -Split in multiple patches
> -Comments by Hans Verkuil:
> -Rename ioctl to G_DEF_EXT_CTRL
> -Much! better implementation of def_to_user
> 
> 
> THANKS!
> 
> 
> Ricardo Ribalda Delgado (19):
>   media/v4l2-core: Add argument def_value to g_ext_ctrl
>   media/v4l2-core: add new ioctl VIDIOC_G_DEF_EXT_CTRLS
>   videodev2.h: Fix typo in comment
>   media/usb/uvc: Implement vivioc_g_def_ext_ctrls
>   media/pci/saa7164-encoder: Implement vivioc_g_def_ext_ctrls
>   media/pci/saa7164-vbi: Implement vivioc_g_def_ext_ctrls
>   media/usb/prusb2: Implement vivioc_g_def_ext_ctrls
>   v4l2-subdev: Add g_def_ext_ctrls to core_ops
>   media/i2c/bt819: Implement g_def_ext_ctrls core_op
>   media/i2c/cs53l32a: Implement g_def_ext_ctrls core_op
>   media/i2c/cx25840/cx25840-core: Implement g_def_ext_ctrls core_op
>   media/i2c/msp3400-driver: Implement g_def_ext_ctrls core_op
>   media/i2c/saa7110: Implement g_def_ext_ctrls core_op
>   media/i2c/saa7115: Implement g_def_ext_ctrls core_op
>   media/i2c/tlv320aic23b: Implement g_def_ext_ctrls core_op
>   media/i2c/vpx3220: Implement g_def_ext_ctrls core_op
>   media/i2c/wm8775: Implement g_def_ext_ctrls core_op
>   Docbook: media: new ioctl VIDIOC_G_DEF_EXT_CTRLS
>   Documentation: media: Fix code sample
> 
>  Documentation/DocBook/media/v4l/v4l2.xml   |  8 ++
>  .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml   | 13 ++---
>  Documentation/video4linux/v4l2-controls.txt|  4 ++-
>  Documentation/video4linux/v4l2-framework.txt   |  1 +
>  Documentation/zh_CN/video4linux/v4l2-framework.txt |  1 +
>  drivers/media/i2c/bt819.c  |  1 +
>  drivers/media/i2c/cs53l32a.c   |  1 +
>  drivers/media/i2c/cx25840/cx25840-core.c   |  1 +
>  drivers/media/i2c/msp3400-driver.c |  1 +
>  drivers/media/i2c/saa7110.c|  1 +
>  drivers/media/i2c/saa7115.c|  1 +
>  drivers/media/i2c/tlv320aic23b.c   |  1 +
>  drivers/media/i2c/vpx3220.c|  1 +
>  drivers/media/i2c/wm8775.c |  1 +
>  drivers/media/pci/saa7164/saa7164-encoder.c| 28 +++
>  drivers/media/pci/saa7164/saa7164-vbi.c| 28 +++
>  drivers/media/platform/omap3isp/ispvideo.c |  2 +-
>  drivers/media/usb/pvrusb2/pvrusb2-v4l2.c   | 28 +++
>  drivers/media/usb/uvc/uvc_v4l2.c   | 30 
>  drivers/media/v4l2-core/v4l2-compat-ioctl32.c  |  4 +++
>  drivers/media/v4l2-core/v4l2-ctrls.c   | 32 
> ++
>  drivers/media/v4l2-core/v4l2-ioctl.c   | 25 +++--
>  drivers/media/v4l2-core/v4l2-subdev.c  |  5 +++-
>  include/media/v4l2-ctrls.h |  5 +++-
>  include/media/v4l2-ioctl.h |  2 ++
>  include/media/v4l2-subdev.h|  2 ++
>  include/uapi/linux/videodev2.h |  3 +-
>  27 files changed, 214 insertions(+), 16 deletions(-)
> 

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


cron job: media_tree daily build: WARNINGS

2015-06-15 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:   Tue Jun 16 04:00:15 CEST 2015
git branch: test
git hash:   e42c8c6eb456f8978de417ea349eef676ef4385c
gcc version:i686-linux-gcc (GCC) 5.1.0
sparse version: v0.5.0-44-g40791b9
smatch version: 0.4.1-3153-g7d56ab3
host hardware:  x86_64
host os:4.0.0-3.slh.1-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin-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.32.27-i686: WARNINGS
linux-2.6.33.7-i686: WARNINGS
linux-2.6.34.7-i686: WARNINGS
linux-2.6.35.9-i686: WARNINGS
linux-2.6.36.4-i686: WARNINGS
linux-2.6.37.6-i686: WARNINGS
linux-2.6.38.8-i686: WARNINGS
linux-2.6.39.4-i686: WARNINGS
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12.23-i686: OK
linux-3.13.11-i686: OK
linux-3.14.9-i686: OK
linux-3.15.2-i686: OK
linux-3.16.7-i686: OK
linux-3.17.8-i686: OK
linux-3.18.7-i686: OK
linux-3.19-i686: OK
linux-4.0-i686: OK
linux-4.1-rc1-i686: OK
linux-2.6.32.27-x86_64: WARNINGS
linux-2.6.33.7-x86_64: WARNINGS
linux-2.6.34.7-x86_64: WARNINGS
linux-2.6.35.9-x86_64: WARNINGS
linux-2.6.36.4-x86_64: WARNINGS
linux-2.6.37.6-x86_64: WARNINGS
linux-2.6.38.8-x86_64: WARNINGS
linux-2.6.39.4-x86_64: WARNINGS
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12.23-x86_64: OK
linux-3.13.11-x86_64: OK
linux-3.14.9-x86_64: OK
linux-3.15.2-x86_64: OK
linux-3.16.7-x86_64: OK
linux-3.17.8-x86_64: OK
linux-3.18.7-x86_64: OK
linux-3.19-x86_64: OK
linux-4.0-x86_64: OK
linux-4.1-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: ERRORS

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

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


Re: [PATCH v1.3 1/5] v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it

2015-06-15 Thread Bryan Wu
On Thu, Jun 11, 2015 at 11:41 PM, Sakari Ailus  wrote:
> On Thu, Jun 11, 2015 at 10:27:30PM +0300, Laurent Pinchart wrote:
>> Hi Sakari,
>>
>> Thank you for the patch.
>>
>> On Thursday 11 June 2015 22:18:01 Sakari Ailus wrote:
>> > V4L2 async sub-devices are currently matched (OF case) based on the struct
>> > device_node pointer in struct device. LED devices may have more than one
>> > LED, and in that case the OF node to match is not directly the device's
>> > node, but a LED's node.
>> >
>> > Signed-off-by: Laurent Pinchart 
>> > Signed-off-by: Sakari Ailus 
>>
>> Acked-by: Laurent Pinchart 
>
> Bryan, could you apply the patch to your tree? It's required by Jacek's
> patchset you attempted to apply a few days back.
>
> Thanks!

Sure, I will merge that through my tree.

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


[GIT FIXES FOR v4.2] Revert "[media] vb2: Push mmap_sem down to memops" & videodev2.h fix

2015-06-15 Thread Hans Verkuil
Mauro,

Please merge this revert asap. This patch introduces two serious regressions 
(first
noticed when testing the cobalt driver, later reproduced with the vivid driver).

This patch needs more work from Jan. Luckily I noticed in time and it should 
help
Jan that it is reproducible with vivid, so he does not need any hardware to 
test it.

The other patch I added (superseding my previous GIT FIXES request) fixes a 
stupid
copy-and-paste error in a macro newly added for 4.2. This bug breaks the correct
handling of transfer functions as I discovered while preparing for a 
presentation on
this topic.

Regards,

Hans

The following changes since commit e42c8c6eb456f8978de417ea349eef676ef4385c:

  [media] au0828: move dev->boards atribuition to happen earlier (2015-06-10 
12:39:35 -0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git for-v4.2o

for you to fetch changes up to 6da206bf3b501193398ccd55383ea0e8df1755d8:

  videodev2.h: fix copy-and-paste error in V4L2_MAP_XFER_FUNC_DEFAULT 
(2015-06-15 16:21:14 +0200)


Hans Verkuil (2):
  Revert "[media] vb2: Push mmap_sem down to memops"
  videodev2.h: fix copy-and-paste error in V4L2_MAP_XFER_FUNC_DEFAULT

 drivers/media/v4l2-core/videobuf2-core.c   | 2 ++
 drivers/media/v4l2-core/videobuf2-dma-contig.c | 7 ---
 drivers/media/v4l2-core/videobuf2-dma-sg.c | 6 --
 drivers/media/v4l2-core/videobuf2-vmalloc.c| 6 +-
 include/uapi/linux/videodev2.h | 2 +-
 5 files changed, 4 insertions(+), 19 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] videodev2.h: fix copy-and-paste error in V4L2_MAP_XFER_FUNC_DEFAULT

2015-06-15 Thread Hans Verkuil
The colorspace argument was compared against a V4L2_XFER_FUNC define instead
of against a V4L2_COLORSPACE define, returning the wrong answer.

Signed-off-by: Hans Verkuil 

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 3d5fc72..3228fbe 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -270,7 +270,7 @@ enum v4l2_xfer_func {
  * This depends on the colorspace.
  */
 #define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \
-   ((colsp) == V4L2_XFER_FUNC_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \
+   ((colsp) == V4L2_COLORSPACE_ADOBERGB ? V4L2_XFER_FUNC_ADOBERGB : \
 ((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \
  ((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \
   ((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG 
? \
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 09/12] media/i2c/tvp7002: Remove compat control ops

2015-06-15 Thread Lad, Prabhakar
On Fri, Jun 12, 2015 at 5:31 PM, Ricardo Ribalda Delgado
 wrote:
> They are no longer used in old non-control-framework
> bridge drivers.
>
> Reported-by: Hans Verkuil 
> Signed-off-by: Ricardo Ribalda Delgado 

Acked-by: Lad, Prabhakar 

Cheers,
--Prabhakar Lad

> ---
>  drivers/media/i2c/tvp7002.c | 7 ---
>  1 file changed, 7 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
> index 05077cffd235..f617d8b745ee 100644
> --- a/drivers/media/i2c/tvp7002.c
> +++ b/drivers/media/i2c/tvp7002.c
> @@ -861,13 +861,6 @@ tvp7002_set_pad_format(struct v4l2_subdev *sd, struct 
> v4l2_subdev_pad_config *cf
>  /* V4L2 core operation handlers */
>  static const struct v4l2_subdev_core_ops tvp7002_core_ops = {
> .log_status = tvp7002_log_status,
> -   .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
> -   .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
> -   .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
> -   .g_ctrl = v4l2_subdev_g_ctrl,
> -   .s_ctrl = v4l2_subdev_s_ctrl,
> -   .queryctrl = v4l2_subdev_queryctrl,
> -   .querymenu = v4l2_subdev_querymenu,
>  #ifdef CONFIG_VIDEO_ADV_DEBUG
> .g_register = tvp7002_g_register,
> .s_register = tvp7002_s_register,
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/12] media/i2c/tvp514x: Remove compat control ops

2015-06-15 Thread Lad, Prabhakar
On Fri, Jun 12, 2015 at 5:31 PM, Ricardo Ribalda Delgado
 wrote:
> They are no longer used in old non-control-framework
> bridge drivers.
>
> Reported-by: Hans Verkuil 
> Signed-off-by: Ricardo Ribalda Delgado 

Acked-by: Lad, Prabhakar 

Cheers,
--Prabhakar Lad

> ---
>  drivers/media/i2c/tvp514x.c | 11 ---
>  1 file changed, 11 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c
> index 24e47279e30c..a93985a9b070 100644
> --- a/drivers/media/i2c/tvp514x.c
> +++ b/drivers/media/i2c/tvp514x.c
> @@ -957,16 +957,6 @@ static int tvp514x_set_pad_format(struct v4l2_subdev *sd,
> return 0;
>  }
>
> -static const struct v4l2_subdev_core_ops tvp514x_core_ops = {
> -   .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
> -   .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
> -   .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
> -   .g_ctrl = v4l2_subdev_g_ctrl,
> -   .s_ctrl = v4l2_subdev_s_ctrl,
> -   .queryctrl = v4l2_subdev_queryctrl,
> -   .querymenu = v4l2_subdev_querymenu,
> -};
> -
>  static const struct v4l2_subdev_video_ops tvp514x_video_ops = {
> .s_std = tvp514x_s_std,
> .s_routing = tvp514x_s_routing,
> @@ -983,7 +973,6 @@ static const struct v4l2_subdev_pad_ops tvp514x_pad_ops = 
> {
>  };
>
>  static const struct v4l2_subdev_ops tvp514x_ops = {
> -   .core = &tvp514x_core_ops,
> .video = &tvp514x_video_ops,
> .pad = &tvp514x_pad_ops,
>  };
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/12] media/i2c/adv7343: Remove compat control ops

2015-06-15 Thread Lad, Prabhakar
On Fri, Jun 12, 2015 at 5:31 PM, Ricardo Ribalda Delgado
 wrote:
> They are no longer used in old non-control-framework
> bridge drivers.
>
> Reported-by: Hans Verkuil 
> Signed-off-by: Ricardo Ribalda Delgado 

Acked-by: Lad, Prabhakar 

Cheers,
--Prabhakar Lad

> ---
>  drivers/media/i2c/adv7343.c | 7 ---
>  1 file changed, 7 deletions(-)
>
> diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c
> index 7c50833e7d17..d27283135490 100644
> --- a/drivers/media/i2c/adv7343.c
> +++ b/drivers/media/i2c/adv7343.c
> @@ -319,13 +319,6 @@ static const struct v4l2_ctrl_ops adv7343_ctrl_ops = {
>
>  static const struct v4l2_subdev_core_ops adv7343_core_ops = {
> .log_status = adv7343_log_status,
> -   .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
> -   .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
> -   .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
> -   .g_ctrl = v4l2_subdev_g_ctrl,
> -   .s_ctrl = v4l2_subdev_s_ctrl,
> -   .queryctrl = v4l2_subdev_queryctrl,
> -   .querymenu = v4l2_subdev_querymenu,
>  };
>
>  static int adv7343_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Kconfig: disable Media Controller for DVB

2015-06-15 Thread Mauro Carvalho Chehab
Since when we start discussions about the usage Media Controller for
complex hardware, one thing become clear: the way it is, MC fails to
map anything different than capture/output/m2m video-only streaming.

The point is that MC has entities named as devnodes, but the only
devnode used (before the DVB patches) is MEDIA_ENT_T_DEVNODE_V4L.
Due to the way MC got implemented, however, this entity actually
doesn't represent the devnode, but the hardware I/O engine that
receives data via DMA.

By coincidence, such DMA is associated with the V4L device node
on webcam hardware, but this is not true even for other V4L2
devices. For example, on USB hardware, the DMA is done via the
USB controller. The data passes though a in-kernel filter that
strips off the URB headers. Other V4L2 devices like radio may not
even have DMA. When it have, the DMA is done via ALSA, and not
via the V4L devnode.

In other words, MC is broken as a whole, but tagging it as BROKEN
right now would do more harm than good.

So, instead, let's mark, for now, the DVB part as broken and
block all new changes to MC while we fix this mess, whith
we hopefully will do for the next Kernel version.

Requested-by: Laurent Pinchart 
Acked-by: Laurent Pinchart 
Signed-off-by: Hans Verkuil 
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 3ef0f90b128f..157099243d61 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -97,6 +97,7 @@ config MEDIA_CONTROLLER
 config MEDIA_CONTROLLER_DVB
bool "Enable Media controller for DVB"
depends on MEDIA_CONTROLLER
+   depends on BROKEN
---help---
  Enable the media controller API support for DVB.
 
-- 
2.4.3

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


Re: [PATCH 05/12] media/i2c/sr030pc30: Remove compat control ops

2015-06-15 Thread Sylwester Nawrocki
Hi Hans,

On 15/06/15 12:23, Hans Verkuil wrote:
> Sylwester,
> 
> Can you confirm that this is only used with bridge drivers that use the
> control framework? Actually, this driver isn't used by any bridge driver
> in the kernel tree, but it is probably in use by out-of-tree code.
> 
> I'd like your Ack (or Nack) before I merge this.
> 
> Note that eventually these legacy support ops will disappear once all
> bridge drivers in the kernel have been converted to the control framework.

This sensor driver is used on board type which has been scratched long time
ago, feel free to do any changes in this code.

Acked-by: Sylwester Nawrocki 


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


[PATCH 14/14] DocBook/media: fix bad spacing in VIDIOC_EXPBUF

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

The VIDIOC_EXPBUF documentation had spurious spaces that made it irritating
to read. Fix this.

Signed-off-by: Hans Verkuil 
---
 Documentation/DocBook/media/v4l/vidioc-expbuf.xml | 38 +++
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml 
b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
index a78c920..0ae0b6a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
@@ -62,28 +62,28 @@ buffer as a DMABUF file at any time after buffers have been 
allocated with the
 &VIDIOC-REQBUFS; ioctl.
 
  To export a buffer, applications fill &v4l2-exportbuffer;.  The
- type  field is set to the same buffer type as was
-previously used with  &v4l2-requestbuffers; type .
-Applications must also set the  index  field. Valid
+type field is set to the same buffer type as was
+previously used with &v4l2-requestbuffers; type.
+Applications must also set the index field. Valid
 index numbers range from zero to the number of buffers allocated with
-&VIDIOC-REQBUFS; (&v4l2-requestbuffers; count )
-minus one.  For the multi-planar API, applications set the  plane
- field to the index of the plane to be exported. Valid planes
+&VIDIOC-REQBUFS; (&v4l2-requestbuffers; count)
+minus one.  For the multi-planar API, applications set the 
plane
+field to the index of the plane to be exported. Valid planes
 range from zero to the maximal number of valid planes for the currently active
-format. For the single-planar API, applications must set  plane
- to zero.  Additional flags may be posted in the 
-flags  field.  Refer to a manual for open() for details.
+format. For the single-planar API, applications must set 
plane
+to zero.  Additional flags may be posted in the 
flags
+field.  Refer to a manual for open() for details.
 Currently only O_CLOEXEC, O_RDONLY, O_WRONLY, and O_RDWR are supported.  All
 other fields must be set to zero.
 In the case of multi-planar API, every plane is exported separately using
-multiple  VIDIOC_EXPBUF  calls. 
+multiple VIDIOC_EXPBUF calls.
 
- After calling VIDIOC_EXPBUF the  fd
- field will be set by a driver.  This is a DMABUF file
+After calling VIDIOC_EXPBUF the 
fd
+field will be set by a driver.  This is a DMABUF file
 descriptor. The application may pass it to other DMABUF-aware devices. Refer to
 DMABUF importing for details about importing
 DMABUF files into V4L2 nodes. It is recommended to close a DMABUF file when it
-is no longer used to allow the associated memory to be reclaimed. 
+is no longer used to allow the associated memory to be reclaimed.
   
 
   
@@ -170,9 +170,9 @@ multi-planar API. Otherwise this value must be set to zero. 

  
__u32
flags
-   Flags for the newly created file, currently only 
-O_CLOEXEC , O_RDONLY, O_WRONLY
-, and O_RDWR are supported, refer to the manual
+   Flags for the newly created file, currently only
+O_CLOEXEC, O_RDONLY, 
O_WRONLY,
+and O_RDWR are supported, refer to the manual
 of open() for more details.
  
  
@@ -200,9 +200,9 @@ set the array to zero.
EINVAL

  A queue is not in MMAP mode or DMABUF exporting is not
-supported or  flags  or  type
- or  index  or  plane
- fields are invalid.
+supported or flags or 
type
+or index or plane fields
+are invalid.

   
 
-- 
2.1.4

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


[PATCH 13/14] soc_camera: always release queue for queue owner

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

Always release the queue if the owner closes its filehandle and not when
it is the last open filehandle.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/soc_camera/soc_camera.c | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/soc_camera/soc_camera.c 
b/drivers/media/platform/soc_camera/soc_camera.c
index 0b09281..9087fed 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -788,20 +788,21 @@ static int soc_camera_close(struct file *file)
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
 
mutex_lock(&ici->host_lock);
+   if (icd->streamer == file) {
+   if (ici->ops->init_videobuf2)
+   vb2_queue_release(&icd->vb2_vidq);
+   icd->streamer = NULL;
+   }
icd->use_count--;
if (!icd->use_count) {
pm_runtime_suspend(&icd->vdev->dev);
pm_runtime_disable(&icd->vdev->dev);
 
-   if (ici->ops->init_videobuf2)
-   vb2_queue_release(&icd->vb2_vidq);
__soc_camera_power_off(icd);
 
soc_camera_remove_device(icd);
}
 
-   if (icd->streamer == file)
-   icd->streamer = NULL;
mutex_unlock(&ici->host_lock);
 
module_put(ici->ops->owner);
-- 
2.1.4

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


[PATCH 12/14] soc_camera: pass on streamoff error

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

If streamoff returned an error, then pass that on to the caller.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/soc_camera/soc_camera.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/soc_camera/soc_camera.c 
b/drivers/media/platform/soc_camera/soc_camera.c
index 6ce6576..0b09281 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1000,6 +1000,7 @@ static int soc_camera_streamoff(struct file *file, void 
*priv,
struct soc_camera_device *icd = file->private_data;
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+   int ret;
 
WARN_ON(priv != file->private_data);
 
@@ -1014,13 +1015,13 @@ static int soc_camera_streamoff(struct file *file, void 
*priv,
 * remaining buffers. When the last buffer is freed, stop capture
 */
if (ici->ops->init_videobuf)
-   videobuf_streamoff(&icd->vb_vidq);
+   ret = videobuf_streamoff(&icd->vb_vidq);
else
-   vb2_streamoff(&icd->vb2_vidq, i);
+   ret = vb2_streamoff(&icd->vb2_vidq, i);
 
v4l2_subdev_call(sd, video, s_stream, 0);
 
-   return 0;
+   return ret;
 }
 
 static int soc_camera_cropcap(struct file *file, void *fh,
-- 
2.1.4

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


[PATCH 11/14] soc_camera: compliance fixes

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

- REQBUFS(0) will stop streaming, free buffers and release the file ownership.
- Return ENOTTY for create_bufs for a vb1 driver
- Return EBUSY if there is a different streaming owner and set the new owner on
  success.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/soc_camera/soc_camera.c | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/soc_camera/soc_camera.c 
b/drivers/media/platform/soc_camera/soc_camera.c
index 5f1e5a8..6ce6576 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -384,9 +384,8 @@ static int soc_camera_reqbufs(struct file *file, void *priv,
ret = vb2_reqbufs(&icd->vb2_vidq, p);
}
 
-   if (!ret && !icd->streamer)
-   icd->streamer = file;
-
+   if (!ret)
+   icd->streamer = p->count ? file : NULL;
return ret;
 }
 
@@ -443,12 +442,19 @@ static int soc_camera_create_bufs(struct file *file, void 
*priv,
 {
struct soc_camera_device *icd = file->private_data;
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+   int ret;
 
/* videobuf2 only */
if (ici->ops->init_videobuf)
-   return -EINVAL;
-   else
-   return vb2_create_bufs(&icd->vb2_vidq, create);
+   return -ENOTTY;
+
+   if (icd->streamer && icd->streamer != file)
+   return -EBUSY;
+
+   ret = vb2_create_bufs(&icd->vb2_vidq, create);
+   if (!ret)
+   icd->streamer = file;
+   return ret;
 }
 
 static int soc_camera_prepare_buf(struct file *file, void *priv,
-- 
2.1.4

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


[PATCH 10/14] soc_camera: fix expbuf support

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

- For vb1 drivers just return -ENOTTY.
- For vb2 drivers allow vb2_expbuf without there being a stream owner:
  the vb2_expbuf function will return the correct error message in that case.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/soc_camera/soc_camera.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/soc_camera/soc_camera.c 
b/drivers/media/platform/soc_camera/soc_camera.c
index f24062d..5f1e5a8 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -470,14 +470,13 @@ static int soc_camera_expbuf(struct file *file, void 
*priv,
struct soc_camera_device *icd = file->private_data;
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
 
-   if (icd->streamer != file)
-   return -EBUSY;
-
/* videobuf2 only */
if (ici->ops->init_videobuf)
-   return -EINVAL;
-   else
-   return vb2_expbuf(&icd->vb2_vidq, p);
+   return -ENOTTY;
+
+   if (icd->streamer && icd->streamer != file)
+   return -EBUSY;
+   return vb2_expbuf(&icd->vb2_vidq, p);
 }
 
 /* Always entered with .host_lock held */
-- 
2.1.4

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


[PATCH 07/14] sh_mobile_ceu_camera: fix querycap

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

Fill in the bus_info and driver fields. Found by v4l2-compliance.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c 
b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
index c5c6c4e..8881efe 100644
--- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
+++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
@@ -1665,6 +1665,8 @@ static int sh_mobile_ceu_querycap(struct soc_camera_host 
*ici,
  struct v4l2_capability *cap)
 {
strlcpy(cap->card, "SuperH_Mobile_CEU", sizeof(cap->card));
+   strlcpy(cap->driver, "sh_mobile_ceu", sizeof(cap->driver));
+   strlcpy(cap->bus_info, "platform:sh_mobile_ceu", sizeof(cap->bus_info));
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
 
-- 
2.1.4

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


[PATCH 06/14] mt9t112: JPEG -> SRGB

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

The JPEG colorspace should only be used for JPEG encoded images. This is
just a regular sRGB sensor.

Signed-off-by: Hans Verkuil 
---
 drivers/media/i2c/soc_camera/mt9t112.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/i2c/soc_camera/mt9t112.c 
b/drivers/media/i2c/soc_camera/mt9t112.c
index de10a76..2f35d31 100644
--- a/drivers/media/i2c/soc_camera/mt9t112.c
+++ b/drivers/media/i2c/soc_camera/mt9t112.c
@@ -104,22 +104,22 @@ struct mt9t112_priv {
 static const struct mt9t112_format mt9t112_cfmts[] = {
{
.code   = MEDIA_BUS_FMT_UYVY8_2X8,
-   .colorspace = V4L2_COLORSPACE_JPEG,
+   .colorspace = V4L2_COLORSPACE_SRGB,
.fmt= 1,
.order  = 0,
}, {
.code   = MEDIA_BUS_FMT_VYUY8_2X8,
-   .colorspace = V4L2_COLORSPACE_JPEG,
+   .colorspace = V4L2_COLORSPACE_SRGB,
.fmt= 1,
.order  = 1,
}, {
.code   = MEDIA_BUS_FMT_YUYV8_2X8,
-   .colorspace = V4L2_COLORSPACE_JPEG,
+   .colorspace = V4L2_COLORSPACE_SRGB,
.fmt= 1,
.order  = 2,
}, {
.code   = MEDIA_BUS_FMT_YVYU8_2X8,
-   .colorspace = V4L2_COLORSPACE_JPEG,
+   .colorspace = V4L2_COLORSPACE_SRGB,
.fmt= 1,
.order  = 3,
}, {
-- 
2.1.4

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


[PATCH 02/14] sh-veu: don't use COLORSPACE_JPEG.

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

COLORSPACE_JPEG should only be used for JPEGs. Use SMPTE170M instead,
which is how YCbCr images are usually encoded.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/sh_veu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
index 77a74d3..f5e3eb3a 100644
--- a/drivers/media/platform/sh_veu.c
+++ b/drivers/media/platform/sh_veu.c
@@ -211,7 +211,7 @@ static enum v4l2_colorspace sh_veu_4cc2cspace(u32 fourcc)
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV24:
-   return V4L2_COLORSPACE_JPEG;
+   return V4L2_COLORSPACE_SMPTE170M;
case V4L2_PIX_FMT_RGB332:
case V4L2_PIX_FMT_RGB444:
case V4L2_PIX_FMT_RGB565:
-- 
2.1.4

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


[PATCH 01/14] sh-veu: initialize timestamp_flags and copy timestamp info

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

This field wasn't set, causing WARN_ON's from the vb2 core.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/sh_veu.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
index 2554f37..77a74d3 100644
--- a/drivers/media/platform/sh_veu.c
+++ b/drivers/media/platform/sh_veu.c
@@ -958,6 +958,7 @@ static int sh_veu_queue_init(void *priv, struct vb2_queue 
*src_vq,
src_vq->ops = &sh_veu_qops;
src_vq->mem_ops = &vb2_dma_contig_memops;
src_vq->lock = &veu->fop_lock;
+   src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
 
ret = vb2_queue_init(src_vq);
if (ret < 0)
@@ -971,6 +972,7 @@ static int sh_veu_queue_init(void *priv, struct vb2_queue 
*src_vq,
dst_vq->ops = &sh_veu_qops;
dst_vq->mem_ops = &vb2_dma_contig_memops;
dst_vq->lock = &veu->fop_lock;
+   dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
 
return vb2_queue_init(dst_vq);
 }
@@ -1103,6 +1105,12 @@ static irqreturn_t sh_veu_isr(int irq, void *dev_id)
if (!src || !dst)
return IRQ_NONE;
 
+   dst->v4l2_buf.timestamp = src->v4l2_buf.timestamp;
+   dst->v4l2_buf.flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
+   dst->v4l2_buf.flags |=
+   src->v4l2_buf.flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
+   dst->v4l2_buf.timecode = src->v4l2_buf.timecode;
+
spin_lock(&veu->lock);
v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);
v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);
-- 
2.1.4

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


[PATCH 00/14] Various soc_camera related fixes

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

I had a pile of straightforward fixes pending in one of my git branches
that were all related to soc_camera in some way. Some were part of William's
r-car patch series, but this collects them all in one place.

These fixes are all due to v4l2-compliance failures or warnings (well, except
of the DocBook patch at the end of course).

Regards,

Hans

Hans Verkuil (14):
  sh-veu: initialize timestamp_flags and copy timestamp info
  sh-veu: don't use COLORSPACE_JPEG.
  tw9910: don't use COLORSPACE_JPEG
  tw9910: init priv->scale and update standard
  ak881x: simplify standard checks
  mt9t112: JPEG -> SRGB
  sh_mobile_ceu_camera: fix querycap
  sh_mobile_ceu_camera: set field to FIELD_NONE
  soc_camera: fix enum_input
  soc_camera: fix expbuf support
  soc_camera: compliance fixes
  soc_camera: pass on streamoff error
  soc_camera: always release queue for queue owner
  DocBook/media: fix bad spacing in VIDIOC_EXPBUF

 Documentation/DocBook/media/v4l/vidioc-expbuf.xml  | 38 -
 drivers/media/i2c/ak881x.c |  8 ++--
 drivers/media/i2c/soc_camera/mt9t112.c |  8 ++--
 drivers/media/i2c/soc_camera/tw9910.c  | 35 ++--
 drivers/media/platform/sh_veu.c| 10 -
 .../platform/soc_camera/sh_mobile_ceu_camera.c |  3 ++
 drivers/media/platform/soc_camera/soc_camera.c | 48 +-
 7 files changed, 99 insertions(+), 51 deletions(-)

-- 
2.1.4

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


[PATCH 03/14] tw9910: don't use COLORSPACE_JPEG

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

This is an SDTV video receiver, so the colorspace should be SMPTE170M.

Signed-off-by: Hans Verkuil 
---
 drivers/media/i2c/soc_camera/tw9910.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/soc_camera/tw9910.c 
b/drivers/media/i2c/soc_camera/tw9910.c
index 42bec9b..df66417 100644
--- a/drivers/media/i2c/soc_camera/tw9910.c
+++ b/drivers/media/i2c/soc_camera/tw9910.c
@@ -711,7 +711,7 @@ static int tw9910_get_fmt(struct v4l2_subdev *sd,
mf->width   = priv->scale->width;
mf->height  = priv->scale->height;
mf->code= MEDIA_BUS_FMT_UYVY8_2X8;
-   mf->colorspace  = V4L2_COLORSPACE_JPEG;
+   mf->colorspace  = V4L2_COLORSPACE_SMPTE170M;
mf->field   = V4L2_FIELD_INTERLACED_BT;
 
return 0;
@@ -732,7 +732,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd,
if (mf->code != MEDIA_BUS_FMT_UYVY8_2X8)
return -EINVAL;
 
-   mf->colorspace = V4L2_COLORSPACE_JPEG;
+   mf->colorspace = V4L2_COLORSPACE_SMPTE170M;
 
ret = tw9910_set_frame(sd, &width, &height);
if (!ret) {
@@ -762,7 +762,7 @@ static int tw9910_set_fmt(struct v4l2_subdev *sd,
}
 
mf->code = MEDIA_BUS_FMT_UYVY8_2X8;
-   mf->colorspace = V4L2_COLORSPACE_JPEG;
+   mf->colorspace = V4L2_COLORSPACE_SMPTE170M;
 
/*
 * select suitable norm
-- 
2.1.4

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


[PATCH 08/14] sh_mobile_ceu_camera: set field to FIELD_NONE

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

Make sure that 'field' isn't FIELD_ANY when the driver is
first loaded. Fixes a v4l2-compliance failure.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c 
b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
index 8881efe..efdeea4 100644
--- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
+++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
@@ -1775,6 +1775,7 @@ static int sh_mobile_ceu_probe(struct platform_device 
*pdev)
pcdev->max_height = pcdev->pdata->max_height;
pcdev->flags = pcdev->pdata->flags;
}
+   pcdev->field = V4L2_FIELD_NONE;
 
if (!pcdev->max_width) {
unsigned int v;
-- 
2.1.4

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


[PATCH 09/14] soc_camera: fix enum_input

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

Fill in the std field from the video_device tvnorms field.

This fixes a v4l2-compliance failure.

Signed-off-by: Hans Verkuil 
---
 drivers/media/platform/soc_camera/soc_camera.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/soc_camera/soc_camera.c 
b/drivers/media/platform/soc_camera/soc_camera.c
index d708df4..f24062d 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -309,11 +309,14 @@ static int soc_camera_try_fmt_vid_cap(struct file *file, 
void *priv,
 static int soc_camera_enum_input(struct file *file, void *priv,
 struct v4l2_input *inp)
 {
+   struct soc_camera_device *icd = file->private_data;
+
if (inp->index != 0)
return -EINVAL;
 
/* default is camera */
inp->type = V4L2_INPUT_TYPE_CAMERA;
+   inp->std = icd->vdev->tvnorms;
strcpy(inp->name, "Camera");
 
return 0;
-- 
2.1.4

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


[PATCH 05/14] ak881x: simplify standard checks

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

Simplify confusing conditions. This also swaps the checks for NTSC and PAL:
to be consistent with other drivers check for NTSC first. So if the user
sets both NTSC and PAL bits, then NTSC wins.

Signed-off-by: Hans Verkuil 
---
 drivers/media/i2c/ak881x.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/i2c/ak881x.c b/drivers/media/i2c/ak881x.c
index 2984624..d3b965e 100644
--- a/drivers/media/i2c/ak881x.c
+++ b/drivers/media/i2c/ak881x.c
@@ -156,12 +156,12 @@ static int ak881x_s_std_output(struct v4l2_subdev *sd, 
v4l2_std_id std)
} else if (std == V4L2_STD_PAL_60) {
vp1 = 7;
ak881x->lines = 480;
-   } else if (std && !(std & ~V4L2_STD_PAL)) {
-   vp1 = 0xf;
-   ak881x->lines = 576;
-   } else if (std && !(std & ~V4L2_STD_NTSC)) {
+   } else if (std & V4L2_STD_NTSC) {
vp1 = 0;
ak881x->lines = 480;
+   } else if (std & V4L2_STD_PAL) {
+   vp1 = 0xf;
+   ak881x->lines = 576;
} else {
/* No SECAM or PAL_N/Nc supported */
return -EINVAL;
-- 
2.1.4

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


[PATCH 04/14] tw9910: init priv->scale and update standard

2015-06-15 Thread Hans Verkuil
From: Hans Verkuil 

When the standard changes the VACTIVE and VDELAY values need to be updated.

Signed-off-by: Hans Verkuil 
---
 drivers/media/i2c/soc_camera/tw9910.c | 29 -
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/soc_camera/tw9910.c 
b/drivers/media/i2c/soc_camera/tw9910.c
index df66417..e939c24 100644
--- a/drivers/media/i2c/soc_camera/tw9910.c
+++ b/drivers/media/i2c/soc_camera/tw9910.c
@@ -510,13 +510,39 @@ static int tw9910_s_std(struct v4l2_subdev *sd, 
v4l2_std_id norm)
 {
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct tw9910_priv *priv = to_tw9910(client);
+   const unsigned hact = 720;
+   const unsigned hdelay = 15;
+   unsigned vact;
+   unsigned vdelay;
+   int ret;
 
if (!(norm & (V4L2_STD_NTSC | V4L2_STD_PAL)))
return -EINVAL;
 
priv->norm = norm;
+   if (norm & V4L2_STD_525_60) {
+   vact = 240;
+   vdelay = 18;
+   ret = tw9910_mask_set(client, VVBI, 0x10, 0x10);
+   } else {
+   vact = 288;
+   vdelay = 24;
+   ret = tw9910_mask_set(client, VVBI, 0x10, 0x00);
+   }
+   if (!ret)
+   ret = i2c_smbus_write_byte_data(client, CROP_HI,
+   ((vdelay >> 2) & 0xc0) |
+   ((vact >> 4) & 0x30) |
+   ((hdelay >> 6) & 0x0c) |
+   ((hact >> 8) & 0x03));
+   if (!ret)
+   ret = i2c_smbus_write_byte_data(client, VDELAY_LO,
+   vdelay & 0xff);
+   if (!ret)
+   ret = i2c_smbus_write_byte_data(client, VACTIVE_LO,
+   vact & 0xff);
 
-   return 0;
+   return ret;
 }
 
 #ifdef CONFIG_VIDEO_ADV_DEBUG
@@ -820,6 +846,7 @@ static int tw9910_video_probe(struct i2c_client *client)
 "tw9910 Product ID %0x:%0x\n", id, priv->revision);
 
priv->norm = V4L2_STD_NTSC;
+   priv->scale = &tw9910_ntsc_scales[0];
 
 done:
tw9910_s_power(&priv->subdev, 0);
-- 
2.1.4

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


[GIT PULL FOR v4.2] Remove compat control ops and two other improvements

2015-06-15 Thread Hans Verkuil
Hi Mauro,

These are mostly patches removing the compatibility control ops from
various subdevs where this is no longer needed.

Also a code cleanup and code to improve logging the framerate.

Regards,

Hans

The following changes since commit e42c8c6eb456f8978de417ea349eef676ef4385c:

  [media] au0828: move dev->boards atribuition to happen earlier (2015-06-10 
12:39:35 -0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git for-v4.2p

for you to fetch changes up to e6c8f2db405dda4a921463143417e4c204b0e39f:

  media/radio/saa7706h: Remove compat control ops (2015-06-15 12:23:53 +0200)


Prashant Laddha (1):
  v4l2-dv-timings: print refresh rate with better precision

Ricardo Ribalda Delgado (12):
  media/v4l2-ctrls: Code cleanout validate_new()
  media/i2c/adv7343: Remove compat control ops
  media/i2c/adv7393: Remove compat control ops
  media/i2c/cs5345: Remove compat control ops
  media/i2c/saa717x: Remove compat control ops
  media/i2c/tda7432: Remove compat control ops
  media/i2c/tlv320aic23: Remove compat control ops
  media/i2c/tvp514x: Remove compat control ops
  media/i2c/tvp7002: Remove compat control ops
  i2c/wm8739: Remove compat control ops
  pci/ivtv/ivtv-gpio: Remove compat control ops
  media/radio/saa7706h: Remove compat control ops

 drivers/media/i2c/adv7343.c   |  7 ---
 drivers/media/i2c/adv7393.c   |  7 ---
 drivers/media/i2c/cs5345.c|  7 ---
 drivers/media/i2c/saa717x.c   |  7 ---
 drivers/media/i2c/tda7432.c   |  7 ---
 drivers/media/i2c/tlv320aic23b.c  |  7 ---
 drivers/media/i2c/tvp514x.c   | 11 ---
 drivers/media/i2c/tvp7002.c   |  7 ---
 drivers/media/i2c/wm8739.c|  7 ---
 drivers/media/pci/ivtv/ivtv-gpio.c|  7 ---
 drivers/media/radio/saa7706h.c| 16 ++--
 drivers/media/v4l2-core/v4l2-ctrls.c  | 15 ---
 drivers/media/v4l2-core/v4l2-dv-timings.c |  9 ++---
 13 files changed, 8 insertions(+), 106 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/7] v4l2: replace video op g_mbus_fmt by pad op get_fmt

2015-06-15 Thread Hans Verkuil
On 06/15/2015 12:08 AM, Laurent Pinchart wrote:
> Hi Hans,
> 
> (CC'ing Javier Martin)
> 
> On Thursday 09 April 2015 12:21:23 Hans Verkuil wrote:
>> From: Hans Verkuil 
>>
>> The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses
>> by the get_fmt pad op and remove the video op.
>>
>> Signed-off-by: Hans Verkuil 
>> Cc: Guennadi Liakhovetski 
>> Cc: Prabhakar Lad 
>> Cc: Kamil Debski 
> 
> [snip]
> 
>> diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
>> index f2f87b7..e4fa074 100644
>> --- a/drivers/media/i2c/tvp5150.c
>> +++ b/drivers/media/i2c/tvp5150.c
>> @@ -828,14 +828,18 @@ static int tvp5150_enum_mbus_code(struct v4l2_subdev
>> *sd, return 0;
>>  }
>>
>> -static int tvp5150_mbus_fmt(struct v4l2_subdev *sd,
>> -struct v4l2_mbus_framefmt *f)
>> +static int tvp5150_fill_fmt(struct v4l2_subdev *sd,
>> +struct v4l2_subdev_pad_config *cfg,
>> +struct v4l2_subdev_format *format)
>>  {
>> +struct v4l2_mbus_framefmt *f;
>>  struct tvp5150 *decoder = to_tvp5150(sd);
>>
>> -if (f == NULL)
>> +if (!format || format->pad)
>>  return -EINVAL;
>>
>> +f = &format->format;
>> +
>>  tvp5150_reset(sd, 0);
> 
> This resets the device every time a get or set format is issued, even for TRY 
> formats. I don't think that's right.
> 
> Do you have any idea why this is needed ? The code was introduced in commit 
> ec2c4f3f93cb ("[media] media: tvp5150: Add mbus_fmt callbacks"), with Javier 
> listed as the author but Mauro being the only SoB.

I have no idea why this would be needed. I agree with you that it seems
unnecessary. Note that I don't think this is ever used with TRY formats today,
but still it doesn't look right for SET formats either.

Regards,

Hans

> 
>>  f->width = decoder->rect.width;
>> @@ -1069,9 +1073,6 @@ static const struct v4l2_subdev_tuner_ops
>> tvp5150_tuner_ops = { static const struct v4l2_subdev_video_ops
>> tvp5150_video_ops = {
>>  .s_std = tvp5150_s_std,
>>  .s_routing = tvp5150_s_routing,
>> -.s_mbus_fmt = tvp5150_mbus_fmt,
>> -.try_mbus_fmt = tvp5150_mbus_fmt,
>> -.g_mbus_fmt = tvp5150_mbus_fmt,
>>  .s_crop = tvp5150_s_crop,
>>  .g_crop = tvp5150_g_crop,
>>  .cropcap = tvp5150_cropcap,
>> @@ -1086,6 +1087,8 @@ static const struct v4l2_subdev_vbi_ops
>> tvp5150_vbi_ops = {
>>
>>  static const struct v4l2_subdev_pad_ops tvp5150_pad_ops = {
>>  .enum_mbus_code = tvp5150_enum_mbus_code,
>> +.set_fmt = tvp5150_fill_fmt,
>> +.get_fmt = tvp5150_fill_fmt,
>>  };
>>
>>  static const struct v4l2_subdev_ops tvp5150_ops = {
> 

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


Re: [PATCH 05/12] media/i2c/sr030pc30: Remove compat control ops

2015-06-15 Thread Hans Verkuil
Sylwester,

Can you confirm that this is only used with bridge drivers that use the
control framework? Actually, this driver isn't used by any bridge driver
in the kernel tree, but it is probably in use by out-of-tree code.

I'd like your Ack (or Nack) before I merge this.

Note that eventually these legacy support ops will disappear once all
bridge drivers in the kernel have been converted to the control framework.

Regards,

Hans


On 06/12/2015 06:31 PM, Ricardo Ribalda Delgado wrote:
> They are no longer used in old non-control-framework
> bridge drivers.
> 
> Reported-by: Hans Verkuil 
> Signed-off-by: Ricardo Ribalda Delgado 
> ---
>  drivers/media/i2c/sr030pc30.c | 7 ---
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/media/i2c/sr030pc30.c b/drivers/media/i2c/sr030pc30.c
> index b62b6ddc4356..229dc76c44a5 100644
> --- a/drivers/media/i2c/sr030pc30.c
> +++ b/drivers/media/i2c/sr030pc30.c
> @@ -636,13 +636,6 @@ static const struct v4l2_ctrl_ops sr030pc30_ctrl_ops = {
>  
>  static const struct v4l2_subdev_core_ops sr030pc30_core_ops = {
>   .s_power= sr030pc30_s_power,
> - .g_ext_ctrls = v4l2_subdev_g_ext_ctrls,
> - .try_ext_ctrls = v4l2_subdev_try_ext_ctrls,
> - .s_ext_ctrls = v4l2_subdev_s_ext_ctrls,
> - .g_ctrl = v4l2_subdev_g_ctrl,
> - .s_ctrl = v4l2_subdev_s_ctrl,
> - .queryctrl = v4l2_subdev_queryctrl,
> - .querymenu = v4l2_subdev_querymenu,
>  };
>  
>  static const struct v4l2_subdev_pad_ops sr030pc30_pad_ops = {
> 

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


Klientskie bazi tel +79133913837 Email: nonen2...@gmail.com Yznaite podrobnee!!!

2015-06-15 Thread Klientskie bazi tel +79133913837 Email: nonen2...@gmail.com Yznaite podrobnee!!!

Klientskie bazi tel +79133913837 Email: nonen2...@gmail.com Yznaite podrobnee!!!
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/9] Helper to abstract vma handling in media layer

2015-06-15 Thread Hans Verkuil
On 06/10/2015 11:20 AM, Mauro Carvalho Chehab wrote:
> Hi Andrew,
> 
> I received this patch series with a new set of helper functions for
> mm, together with changes for media and DRM drivers.
> 
> As this stuff is actually mm code, I prefer if this got merged via
> your tree.
> 
> Could you please handle it? Please notice that patch 8 actually changes
> the exynos DRM driver, but it misses ack from DRM people.

For the vb2 patches 3-7:

Nacked-by: Hans Verkuil 

Since the prerequisite patch "vb2: Push mmap_sem down to memops" caused
two regressions I want to postpone these other vb2 patches until that problem
is fixed first.

Jan, I leave it to you whether you want the non-vb2 patches to go in or not.
I don't think they are affected by this vb2 problem.

Regards,

Hans

> 
> Regards,
> Mauro
> 
> Jan Kara (9):
>   mm: Provide new get_vaddr_frames() helper
>   [media] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use
> get_vaddr_pfns()
>   [media] vb2: Provide helpers for mapping virtual addresses
>   [media] media: vb2: Convert vb2_dma_sg_get_userptr() to use frame
> vector
>   [media] media: vb2: Convert vb2_vmalloc_get_userptr() to use frame
> vector
>   [media] media: vb2: Convert vb2_dc_get_userptr() to use frame vector
>   [media] media: vb2: Remove unused functions
>   [media] drm/exynos: Convert g2d_userptr_get_dma_addr() to use
> get_vaddr_frames()
>   [media] mm: Move get_vaddr_frames() behind a config option
> 
>  drivers/gpu/drm/exynos/Kconfig |   1 +
>  drivers/gpu/drm/exynos/exynos_drm_g2d.c|  95 --
>  drivers/gpu/drm/exynos/exynos_drm_gem.c|  97 ---
>  drivers/media/platform/omap/Kconfig|   1 +
>  drivers/media/platform/omap/omap_vout.c|  69 
>  drivers/media/v4l2-core/Kconfig|   1 +
>  drivers/media/v4l2-core/videobuf2-dma-contig.c | 214 ---
>  drivers/media/v4l2-core/videobuf2-dma-sg.c |  99 ++-
>  drivers/media/v4l2-core/videobuf2-memops.c | 156 ++---
>  drivers/media/v4l2-core/videobuf2-vmalloc.c|  92 --
>  include/linux/mm.h |  44 +
>  include/media/videobuf2-memops.h   |  11 +-
>  mm/Kconfig |   3 +
>  mm/Makefile|   1 +
>  mm/frame_vector.c  | 232 
> +
>  mm/gup.c   |   1 +
>  16 files changed, 486 insertions(+), 631 deletions(-)
>  create mode 100644 mm/frame_vector.c
> 

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


[GIT FIXES FOR v4.2] Revert "[media] vb2: Push mmap_sem down to memops"

2015-06-15 Thread Hans Verkuil
Mauro,

Please merge this revert asap. This patch introduces two serious regressions 
(first
noticed when testing the cobalt driver, later reproduced with the vivid driver).

This patch needs more work from Jan. Luckily I noticed in time and it should 
help
Jan that it is reproducible with vivid, so he does not need any hardware to 
test it.

Regards,

Hans

The following changes since commit e42c8c6eb456f8978de417ea349eef676ef4385c:

  [media] au0828: move dev->boards atribuition to happen earlier (2015-06-10 
12:39:35 -0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git for-v4.2o

for you to fetch changes up to 7d82ba199758c5de8e564b82579e4241d5b152c0:

  Revert "[media] vb2: Push mmap_sem down to memops" (2015-06-15 09:16:32 +0200)


Hans Verkuil (1):
  Revert "[media] vb2: Push mmap_sem down to memops"

 drivers/media/v4l2-core/videobuf2-core.c   | 2 ++
 drivers/media/v4l2-core/videobuf2-dma-contig.c | 7 ---
 drivers/media/v4l2-core/videobuf2-dma-sg.c | 6 --
 drivers/media/v4l2-core/videobuf2-vmalloc.c| 6 +-
 4 files changed, 3 insertions(+), 18 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Revert "[media] vb2: Push mmap_sem down to memops"

2015-06-15 Thread Hans Verkuil
This reverts commit 48b25a3a713b90988b6882d318f7c0a6bed9aabc.

That commit caused two regressions. The first is a BUG:

Jun 14 18:42:15 test-media kernel: [  115.972299] BUG: unable to handle kernel 
NULL pointer dereference at 0100
Jun 14 18:42:15 test-media kernel: [  115.972307] IP: [] 
__lock_acquire+0x2f0/0x2070
Jun 14 18:42:15 test-media kernel: [  115.972316] PGD 0
Jun 14 18:42:15 test-media kernel: [  115.972318] Oops:  [#1] PREEMPT SMP
Jun 14 18:42:15 test-media kernel: [  115.972321] Modules linked in: vivid 
v4l2_dv_timings videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common 
videodev media vmw_balloon vmw_vmci acpi_cpufreq processor button
Jun 14 18:42:15 test-media kernel: [  115.972333] CPU: 0 PID: 1542 Comm: 
v4l2-ctl Not tainted 4.1.0-rc3-test-media #1190
Jun 14 18:42:15 test-media kernel: [  115.972336] Hardware name: VMware, Inc. 
VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014
Jun 14 18:42:15 test-media kernel: [  115.972337] task: 880220ce4200 ti: 
88021d16c000 task.ti: 88021d16c000
Jun 14 18:42:15 test-media kernel: [  115.972339] RIP: 
0010:[]  [] __lock_acquire+0x2f0/0x2070
Jun 14 18:42:15 test-media kernel: [  115.972342] RSP: 0018:88021d16f9b8  
EFLAGS: 00010002
Jun 14 18:42:15 test-media kernel: [  115.972343] RAX: 0046 RBX: 
0292 RCX: 0001
Jun 14 18:42:15 test-media kernel: [  115.972345] RDX:  RSI: 
0001 RDI: 0100
Jun 14 18:42:15 test-media kernel: [  115.972346] RBP: 88021d16fa88 R08: 
0001 R09: 
Jun 14 18:42:15 test-media kernel: [  115.972347] R10: 0001 R11: 
 R12: 0001
Jun 14 18:42:15 test-media kernel: [  115.972348] R13: 880220ce4200 R14: 
0100 R15: 
Jun 14 18:42:15 test-media kernel: [  115.972350] FS:  7f2441e7f740() 
GS:880236e0() knlGS:
Jun 14 18:42:15 test-media kernel: [  115.972351] CS:  0010 DS:  ES:  
CR0: 8005003b
Jun 14 18:42:15 test-media kernel: [  115.972353] CR2: 0100 CR3: 
01e0b000 CR4: 001406f0
Jun 14 18:42:15 test-media kernel: [  115.972424] Stack:
Jun 14 18:42:15 test-media kernel: [  115.972427]  88021d16fa98 
810d6543 0006 0246
Jun 14 18:42:15 test-media kernel: [  115.972431]  88021d16fa08 
810d532d 880220ce4a78 8802
Jun 14 18:42:15 test-media kernel: [  115.972433]  88020001 
 0001 0093a4a0
Jun 14 18:42:15 test-media kernel: [  115.972436] Call Trace:
Jun 14 18:42:15 test-media kernel: [  115.972440]  [] ? 
__lock_acquire+0xb63/0x2070
Jun 14 18:42:15 test-media kernel: [  115.972443]  [] ? 
mark_held_locks+0x6d/0xa0
Jun 14 18:42:15 test-media kernel: [  115.972445]  [] ? 
__lock_is_held+0x58/0x80
Jun 14 18:42:15 test-media kernel: [  115.972447]  [] 
lock_acquire+0x6c/0xa0
Jun 14 18:42:15 test-media kernel: [  115.972452]  [] ? 
vb2_vmalloc_put_userptr+0x36/0x110 [videobuf2_vmalloc]
Jun 14 18:42:15 test-media kernel: [  115.972458]  [] 
down_read+0x42/0x60
Jun 14 18:42:15 test-media kernel: [  115.972460]  [] ? 
vb2_vmalloc_put_userptr+0x36/0x110 [videobuf2_vmalloc]
Jun 14 18:42:15 test-media kernel: [  115.972463]  [] ? 
mutex_lock_nested+0x2b1/0x560
Jun 14 18:42:15 test-media kernel: [  115.972467]  [] ? 
vb2_queue_release+0x25/0x40 [videobuf2_core]
Jun 14 18:42:15 test-media kernel: [  115.972469]  [] 
vb2_vmalloc_put_userptr+0x36/0x110 [videobuf2_vmalloc]
Jun 14 18:42:15 test-media kernel: [  115.972472]  [] 
__vb2_queue_free+0x146/0x5e0 [videobuf2_core]
Jun 14 18:42:15 test-media kernel: [  115.972475]  [] 
vb2_queue_release+0x33/0x40 [videobuf2_core]
Jun 14 18:42:15 test-media kernel: [  115.972478]  [] 
_vb2_fop_release+0x95/0xb0 [videobuf2_core]
Jun 14 18:42:15 test-media kernel: [  115.972481]  [] 
vb2_fop_release+0x29/0x50 [videobuf2_core]
Jun 14 18:42:15 test-media kernel: [  115.972485]  [] 
vivid_fop_release+0x92/0x230 [vivid]
Jun 14 18:42:15 test-media kernel: [  115.972491]  [] 
v4l2_release+0x30/0x80 [videodev]
Jun 14 18:42:15 test-media kernel: [  115.972496]  [] 
__fput+0xe5/0x200
Jun 14 18:42:15 test-media kernel: [  115.972498]  [] 
fput+0x9/0x10
Jun 14 18:42:15 test-media kernel: [  115.972501]  [] 
task_work_run+0xc4/0xf0
Jun 14 18:42:15 test-media kernel: [  115.972504]  [] 
do_exit+0x3a0/0xaf0
Jun 14 18:42:15 test-media kernel: [  115.972507]  [] ? 
_raw_spin_unlock_irq+0x2b/0x60
Jun 14 18:42:15 test-media kernel: [  115.972509]  [] 
do_group_exit+0x4f/0xe0
Jun 14 18:42:15 test-media kernel: [  115.972511]  [] 
get_signal+0x200/0x8c0
Jun 14 18:42:15 test-media kernel: [  115.972514]  [] ? 
__mutex_unlock_slowpath+0xf5/0x240
Jun 14 18:42:15 test-media kernel: [  115.972518]  [] 
do_signal+0x23/0x820
Jun 14 18:42:15 test-media kernel: [  115.972521]  [] ? 
mutex_unlock+0x9/0x10
Jun 14 18:42: