1. 31 8月, 2018 2 次提交
  2. 07 8月, 2018 1 次提交
    • M
      media: v4l2-mem2mem: add descriptions to MC fields · b07b6849
      Mauro Carvalho Chehab 提交于
      drivers/media/v4l2-core/v4l2-mem2mem.c:90: warning: Function parameter or member 'source_pad' not described in 'v4l2_m2m_dev'
      drivers/media/v4l2-core/v4l2-mem2mem.c:90: warning: Function parameter or member 'sink' not described in 'v4l2_m2m_dev'
      drivers/media/v4l2-core/v4l2-mem2mem.c:90: warning: Function parameter or member 'sink_pad' not described in 'v4l2_m2m_dev'
      drivers/media/v4l2-core/v4l2-mem2mem.c:90: warning: Function parameter or member 'proc' not described in 'v4l2_m2m_dev'
      drivers/media/v4l2-core/v4l2-mem2mem.c:90: warning: Function parameter or member 'proc_pads' not described in 'v4l2_m2m_dev'
      drivers/media/v4l2-core/v4l2-mem2mem.c:90: warning: Function parameter or member 'intf_devnode' not described in 'v4l2_m2m_dev'
      
      Fixes: be2fff65 ("media: add helpers for memory-to-memory media controller")
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      b07b6849
  3. 28 7月, 2018 1 次提交
    • E
      media: v4l2-mem2mem: Fix missing v4l2_m2m_try_run call · 9db3bbf5
      Ezequiel Garcia 提交于
      Commit 34dbb848 ("media: mem2mem: Remove excessive try_run call")
      removed a redundant call to v4l2_m2m_try_run but instead introduced
      a bug. Consider the following case:
      
       1) Context A schedules, queues and runs job A.
       2) While the m2m device is running, context B schedules
          and queues job B. Job B cannot run, because it has to
          wait for job A.
       3) Job A completes, calls v4l2_m2m_job_finish, and tries
          to queue a job for context A, but since the context is
          empty it won't do anything.
      
      In this scenario, queued job B will never run. Fix this by calling
      v4l2_m2m_try_run from v4l2_m2m_try_schedule.
      
      While here, add more documentation to these functions.
      
      Fixes: 34dbb848 ("media: mem2mem: Remove excessive try_run call")
      Signed-off-by: NEzequiel Garcia <ezequiel@collabora.com>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      [hans.verkuil@cisco.com: split >80 cols line]
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      9db3bbf5
  4. 25 7月, 2018 2 次提交
  5. 04 7月, 2018 1 次提交
  6. 28 6月, 2018 1 次提交
  7. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  8. 30 11月, 2017 1 次提交
    • M
      media: v4l2-core: Fix kernel-doc markups · d28b2cf9
      Mauro Carvalho Chehab 提交于
      There are some troubles on kernel-doc markups, as warned:
      
      	drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 't1'
      	drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 't2'
      	drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 'pclock_delta'
      	drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 'match_reduced_fps'
      	drivers/media/v4l2-core/tuner-core.c:242: warning: bad line: internal parameters, like LNA mode
      	drivers/media/v4l2-core/tuner-core.c:765: warning: No description found for parameter 'mode'
      	drivers/media/v4l2-core/videobuf2-memops.c:127: warning: cannot understand function prototype: 'const struct vm_operations_struct vb2_common_vm_ops = '
      	drivers/media/v4l2-core/v4l2-mem2mem.c:190: warning: No description found for parameter 'm2m_dev'
      	drivers/media/v4l2-core/v4l2-mem2mem.c:291: warning: No description found for parameter 'm2m_ctx'
      	drivers/media/v4l2-core/videobuf-core.c:233: warning: No description found for parameter 'q'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      d28b2cf9
  9. 28 11月, 2017 2 次提交
  10. 20 6月, 2017 1 次提交
  11. 09 9月, 2016 1 次提交
  12. 01 10月, 2015 2 次提交
  13. 26 9月, 2015 1 次提交
    • Z
      [media] m2m: fix bad unlock balance · f1a81afc
      Zahari Doychev 提交于
      This patch removes unnecessary mutex queue unlock/lock sequence causing bad
      unlock balance in v4l2_m2m_poll when the last buffer on the destination
      queue has been dequeued and adds spin lock protection for the done list
      list_empty calls.
      
      [  144.990873] =====================================
      [  144.995584] [ BUG: bad unlock balance detected! ]
      [  145.000301] 4.1.0-00137-ga105070 #98 Tainted: G        W
      [  145.006140] -------------------------------------
      [  145.010851] demux:sink/487 is trying to release lock (&dev->dev_mutex) at:
      [  145.017785] [<808cc578>] mutex_unlock+0x18/0x1c
      [  145.022322] but there are no more locks to release!
      [  145.027205]
      [  145.027205] other info that might help us debug this:
      [  145.033741] no locks held by demux:sink/487.
      [  145.038015]
      [  145.038015] stack backtrace:
      [  145.042385] CPU: 2 PID: 487 Comm: demux:sink Tainted: G        W       4.1.0-00137-ga105070 #98
      [  145.051089] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      [  145.057622] Backtrace:
      [  145.060102] [<80014a4c>] (dump_backtrace) from [<80014cc4>] (show_stack+0x20/0x24)
      [  145.067679]  r6:80cedf78 r5:00000000 r4:00000000 r3:00000000
      [  145.073421] [<80014ca4>] (show_stack) from [<808c61e0>] (dump_stack+0x8c/0xa4)
      [  145.080661] [<808c6154>] (dump_stack) from [<80072b64>] (print_unlock_imbalance_bug+0xb8/0xe8)
      [  145.089277]  r6:808cc578 r5:ac6cd050 r4:ac38e400 r3:00000001
      [  145.095020] [<80072aac>] (print_unlock_imbalance_bug) from [<80077db4>] (lock_release+0x1a4/0x250)
      [  145.103983]  r6:808cc578 r5:ac6cd050 r4:ac38e400 r3:00000000
      [  145.109728] [<80077c10>] (lock_release) from [<808cc470>] (__mutex_unlock_slowpath+0xc4/0x1b4)
      [  145.118344]  r9:acb27a41 r8:00000000 r7:81553814 r6:808cc578 r5:60030013 r4:ac6cd01c
      [  145.126190] [<808cc3ac>] (__mutex_unlock_slowpath) from [<808cc578>] (mutex_unlock+0x18/0x1c)
      [  145.134720]  r7:00000000 r6:aced7cd4 r5:00000041 r4:acb87800
      [  145.140468] [<808cc560>] (mutex_unlock) from [<805a98b8>] (v4l2_m2m_fop_poll+0x5c/0x64)
      [  145.148494] [<805a985c>] (v4l2_m2m_fop_poll) from [<805955a0>] (v4l2_poll+0x6c/0xa0)
      [  145.156243]  r6:aced7bec r5:00000000 r4:ac6cc380 r3:805a985c
      [  145.161991] [<80595534>] (v4l2_poll) from [<80156edc>] (do_sys_poll+0x230/0x4c0)
      [  145.169391]  r5:00000000 r4:aced7be4
      [  145.173013] [<80156cac>] (do_sys_poll) from [<801574a8>] (SyS_ppoll+0x1d4/0x1fc)
      [  145.180414]  r10:00000000 r9:aced6000 r8:00000000 r7:00000000 r6:75c04538 r5:00000002
      [  145.188338]  r4:00000000
      [  145.190906] [<801572d4>] (SyS_ppoll) from [<800108c0>] (ret_fast_syscall+0x0/0x54)
      [  145.198481]  r8:80010aa4 r7:00000150 r6:75c04538 r5:00000002 r4:00000008
      Signed-off-by: NZahari Doychev <zahari.doychev@linux.com>
      Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      f1a81afc
  14. 11 8月, 2015 1 次提交
    • H
      [media] v4l2-mem2mem: drop lock in v4l2_m2m_fop_mmap · e752577e
      Hans Verkuil 提交于
      The v4l2_m2m_fop_mmap function takes the core mutex, but this will result in a potential
      circular locking dependency:
      
      [  262.517164] ======================================================
      [  262.517166] [ INFO: possible circular locking dependency detected ]
      [  262.517169] 4.2.0-rc2-koryphon #844 Not tainted
      [  262.517171] -------------------------------------------------------
      [  262.517173] v4l2-compliance/1379 is trying to acquire lock:
      [  262.517175]  (&dev->dev_mutex){+.+.+.}, at: [<ffffffffa000ddab>] v4l2_m2m_fop_mmap+0x2b/0x90 [v4l2_mem2mem]
      [  262.517187]
                     but task is already holding lock:
      [  262.517189]  (&mm->mmap_sem){++++++}, at: [<ffffffff81159309>] vm_mmap_pgoff+0x69/0xc0
      [  262.517199]
                     which lock already depends on the new lock.
      
      [  262.517202]
                     the existing dependency chain (in reverse order) is:
      [  262.517204]
                     -> #1 (&mm->mmap_sem){++++++}:
      [  262.517209]        [<ffffffff810d0e6b>] __lock_acquire+0x62b/0xe80
      [  262.517215]        [<ffffffff810d2095>] lock_acquire+0x65/0x90
      [  262.517218]        [<ffffffff811612e5>] __might_fault+0x75/0xa0
      [  262.517222]        [<ffffffffa06dead9>] video_usercopy+0x3e9/0x4e0 [videodev]
      [  262.517231]        [<ffffffffa06debe0>] video_ioctl2+0x10/0x20 [videodev]
      [  262.517238]        [<ffffffffa06d8663>] v4l2_ioctl+0xc3/0xe0 [videodev]
      [  262.517243]        [<ffffffff811a8cac>] do_vfs_ioctl+0x2fc/0x550
      [  262.517248]        [<ffffffff811a8f74>] SyS_ioctl+0x74/0x80
      [  262.517252]        [<ffffffff81a4d2ee>] entry_SYSCALL_64_fastpath+0x12/0x76
      [  262.517258]
                     -> #0 (&dev->dev_mutex){+.+.+.}:
      [  262.517262]        [<ffffffff810cf464>] validate_chain.isra.38+0xd04/0x1170
      [  262.517266]        [<ffffffff810d0e6b>] __lock_acquire+0x62b/0xe80
      [  262.517270]        [<ffffffff810d2095>] lock_acquire+0x65/0x90
      [  262.517273]        [<ffffffff81a48e3c>] mutex_lock_interruptible_nested+0x6c/0x4b0
      [  262.517279]        [<ffffffffa000ddab>] v4l2_m2m_fop_mmap+0x2b/0x90 [v4l2_mem2mem]
      [  262.517284]        [<ffffffffa06d80ff>] v4l2_mmap+0x4f/0x90 [videodev]
      [  262.517288]        [<ffffffff8116b06c>] mmap_region+0x38c/0x5b0
      [  262.517293]        [<ffffffff8116b585>] do_mmap_pgoff+0x2f5/0x3e0
      [  262.517297]        [<ffffffff8115932a>] vm_mmap_pgoff+0x8a/0xc0
      [  262.517300]        [<ffffffff81169bab>] SyS_mmap_pgoff+0x1cb/0x270
      [  262.517304]        [<ffffffff8100876d>] SyS_mmap+0x1d/0x20
      [  262.517309]        [<ffffffff81a4d2ee>] entry_SYSCALL_64_fastpath+0x12/0x76
      [  262.517313]
                     other info that might help us debug this:
      
      [  262.517315]  Possible unsafe locking scenario:
      
      [  262.517318]        CPU0                    CPU1
      [  262.517319]        ----                    ----
      [  262.517321]   lock(&mm->mmap_sem);
      [  262.517324]                                lock(&dev->dev_mutex);
      [  262.517327]                                lock(&mm->mmap_sem);
      [  262.517329]   lock(&dev->dev_mutex);
      [  262.517332]
                      *** DEADLOCK ***
      
      Since vb2_fop_mmap doesn't take the lock, neither should v4l2_m2m_fop_mmap.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Tested-by: NMikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      e752577e
  15. 17 7月, 2015 1 次提交
  16. 10 6月, 2015 1 次提交
  17. 12 5月, 2015 1 次提交
  18. 10 4月, 2015 1 次提交
  19. 22 7月, 2014 1 次提交
  20. 05 7月, 2014 1 次提交
  21. 05 12月, 2013 1 次提交
  22. 29 10月, 2013 3 次提交
  23. 24 8月, 2013 1 次提交
  24. 26 7月, 2013 1 次提交
    • P
      [media] mem2mem: add support for hardware buffered queue · 33bdd5a8
      Philipp Zabel 提交于
      On mem2mem decoders with a hardware bitstream ringbuffer, to drain the
      buffer at the end of the stream, remaining frames might need to be decoded
      from the bitstream buffer without additional input buffers being provided.
      To achieve this, allow a queue to be marked as buffered by the driver, and
      allow scheduling of device_runs when buffered ready queues are empty.
      This also allows a driver to copy input buffers into their bitstream
      ringbuffer and immediately mark them as done to be dequeued.
      The motivation for this patch is hardware assisted h.264 reordering support
      in the coda driver. For high profile streams, the coda can hold back
      out-of-order frames, causing a few mem2mem device runs in the beginning, that
      don't produce any decompressed buffer at the v4l2 capture side. At the same
      time, the last few frames can be decoded from the bitstream with mem2mem device
      runs that don't need a new input buffer at the v4l2 output side. The decoder
      command ioctl can be used to put the decoder into the ringbuffer draining
      end-of-stream mode.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Acked-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NKamil Debski <k.debski@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      33bdd5a8
  25. 04 6月, 2013 3 次提交
  26. 20 3月, 2013 1 次提交
  27. 19 3月, 2013 1 次提交
  28. 19 12月, 2012 1 次提交
  29. 26 11月, 2012 1 次提交
  30. 29 10月, 2012 1 次提交
  31. 18 9月, 2012 1 次提交
  32. 14 8月, 2012 1 次提交