1. 20 10月, 2014 1 次提交
  2. 05 7月, 2014 1 次提交
  3. 23 5月, 2014 1 次提交
  4. 23 4月, 2014 1 次提交
  5. 17 4月, 2014 1 次提交
  6. 15 4月, 2014 1 次提交
    • L
      [media] media: davinci: vpbe_display: fix releasing of active buffers · b699f09d
      Lad, Prabhakar 提交于
      from commit-id: b3379c62
      "vb2: only call start_streaming if sufficient buffers are queued"
      the vb2 framework warns on (WARN_ON()) if all the active buffers
      are not released when streaming is stopped, initially the vb2 silently
      released the buffer internally if the buffer was not released by
      the driver.
      This patch fixes following issue:
      
      WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
      Modules linked in:
      CPU: 0 PID: 2049 Comm: vpbe_display Tainted: G        W    3.14.0-rc5-00414-ged97a6fe #89
      [<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
      [<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
      [<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
      [<c001adec>] (warn_slowpath_null) from [<c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
      [<c0252e0c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
      [<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpbe_display_release+0x60/0x230)
      [<c025a65c>] (vpbe_display_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
      [<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
      [<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
      [<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
      [<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
      [<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
      [<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
      [<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
      [<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
      ---[ end trace 5faa75e8c2f8a6a1 ]---
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
      Modules linked in:
      CPU: 0 PID: 2049 Comm: vpbe_display Tainted: G        W    3.14.0-rc5-00414-ged97a6fe #89
      [<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
      [<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
      [<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
      [<c001adec>] (warn_slowpath_null) from [<c0252c28>] (vb2_buffer_done+0x1e0/0x224)
      [<c0252c28>] (vb2_buffer_done) from [<c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
      [<c0252e3c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
      [<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpbe_display_release+0x60/0x230)
      [<c025a65c>] (vpbe_display_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
      [<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
      [<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
      [<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
      [<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
      [<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
      [<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
      [<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
      [<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
      ---[ end trace 5faa75e8c2f8a6a2 ]---
      Signed-off-by: NLad, Prabhakar <prabhakar.csengg@gmail.com>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      b699f09d
  7. 14 3月, 2014 1 次提交
  8. 11 3月, 2014 1 次提交
    • H
      [media] vb2: only call start_streaming if sufficient buffers are queued · b3379c62
      Hans Verkuil 提交于
      In commit 02f142ec support was added to
      start_streaming to return -ENOBUFS if insufficient buffers were queued
      for the DMA engine to start. The vb2 core would attempt calling
      start_streaming again if another buffer would be queued up.
      
      Later analysis uncovered problems with the queue management if start_streaming
      would return an error: the buffers are enqueued to the driver before the
      start_streaming op is called, so after an error they are never returned to
      the vb2 core. The solution for this is to let the driver return them to
      the vb2 core in case of an error while starting the DMA engine. However,
      in the case of -ENOBUFS that would be weird: it is not a real error, it
      just says that more buffers are needed. Requiring start_streaming to give
      them back only to have them requeued again the next time the application
      calls QBUF is inefficient.
      
      This patch changes this mechanism: it adds a 'min_buffers_needed' field
      to vb2_queue that drivers can set with the minimum number of buffers
      required to start the DMA engine. The start_streaming op is only called
      if enough buffers are queued. The -ENOBUFS handling has been dropped in
      favor of this new method.
      
      Drivers are expected to return buffers back to vb2 core with state QUEUED
      if start_streaming would return an error. The vb2 core checks for this
      and produces a warning if that didn't happen and it will forcefully
      reclaim such buffers to ensure that the internal vb2 core state remains
      consistent and all buffer-related resources have been correctly freed
      and all op calls have been balanced.
      
      __reqbufs() has been updated to check that at least min_buffers_needed
      buffers could be allocated. If fewer buffers were allocated then __reqbufs
      will free what was allocated and return -ENOMEM. Based on a suggestion from
      Pawel Osciak.
      
      __create_bufs() doesn't do that check, since the use of __create_bufs
      assumes some advance scenario where the user might want more control.
      Instead streamon will check if enough buffers were allocated to prevent
      streaming with fewer than the minimum required number of buffers.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      b3379c62
  9. 06 3月, 2014 1 次提交
  10. 07 1月, 2014 1 次提交
  11. 04 10月, 2013 1 次提交
  12. 27 7月, 2013 1 次提交
  13. 17 6月, 2013 1 次提交
  14. 21 5月, 2013 2 次提交
  15. 24 3月, 2013 2 次提交
  16. 20 3月, 2013 2 次提交
  17. 06 3月, 2013 1 次提交
  18. 04 1月, 2013 1 次提交
    • G
      Drivers: media: remove __dev* attributes. · 4c62e976
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c62e976
  19. 22 12月, 2012 3 次提交
  20. 22 11月, 2012 1 次提交
  21. 21 11月, 2012 1 次提交
  22. 06 10月, 2012 2 次提交
  23. 26 9月, 2012 2 次提交
  24. 16 8月, 2012 1 次提交
  25. 10 8月, 2012 1 次提交
  26. 31 7月, 2012 2 次提交
  27. 14 5月, 2012 1 次提交
    • H
      [media] v4l2-dev: add flag to have the core lock all file operations · 5126f259
      Hans Verkuil 提交于
      This used to be the default if the lock pointer was set, but now that lock is by
      default only used for ioctl serialization. Those drivers that already used
      core locking have this flag set explicitly, except for some drivers where
      it was obvious that there was no need to serialize any file operations other
      than ioctl.
      
      The drivers that didn't need this flag were:
      
      drivers/media/radio/dsbr100.c
      drivers/media/radio/radio-isa.c
      drivers/media/radio/radio-keene.c
      drivers/media/radio/radio-miropcm20.c
      drivers/media/radio/radio-mr800.c
      drivers/media/radio/radio-tea5764.c
      drivers/media/radio/radio-timb.c
      drivers/media/video/vivi.c
      sound/i2c/other/tea575x-tuner.c
      
      The other drivers that use core locking and where it was not immediately
      obvious that this flag wasn't needed were changed so that the flag is set
      together with a comment that that driver needs work to avoid having to
      set that flag. This will often involve taking the core lock in the fops
      themselves.
      
      Eventually this flag should go and it should not be used in new drivers.
      
      There are a few reasons why we want to avoid core locking of non-ioctl
      fops: in the case of mmap this can lead to a deadlock in rare situations
      since when mmap is called the mmap_sem is held and it is possible for
      other parts of the code to take that lock as well (copy_from_user()/copy_to_user()
      perform a down_read(&mm->mmap_sem) when a page fault occurs).
      
      It is very unlikely that that happens since the core lock serializes all
      fops, but the kernel warns about it if lock validation is turned on.
      
      For poll it is also undesirable to take the core lock as that can introduce
      increased latency. The same is true for read/write.
      
      While it was possible to make flags or something to turn on/off taking the
      core lock for each file operation, in practice it is much simpler to just
      not take it at all except for ioctl and leave it to the driver to take the
      lock. There are only a handful fops compared to the zillion ioctls we have.
      
      I also wanted to make it obvious which drivers still take the lock for all
      fops, so that's why I chose to have drivers set it explicitly.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      5126f259
  28. 11 1月, 2012 1 次提交
  29. 07 11月, 2011 1 次提交
  30. 24 9月, 2011 1 次提交
  31. 28 7月, 2011 1 次提交