1. 21 10月, 2016 1 次提交
  2. 09 7月, 2016 1 次提交
  3. 11 1月, 2016 1 次提交
  4. 07 10月, 2015 2 次提交
  5. 26 2月, 2015 1 次提交
  6. 14 2月, 2015 1 次提交
  7. 04 9月, 2014 1 次提交
  8. 02 9月, 2014 2 次提交
  9. 25 10月, 2013 1 次提交
  10. 19 6月, 2013 1 次提交
    • S
      [media] media: dmxdev: remove dvb_ringbuffer_flush() on writer side · 414abbd2
      Soeren Moch 提交于
      In dvb_ringbuffer lock-less synchronizationof reader and writer threads is done
      with separateread and write pointers. Sincedvb_ringbuffer_flush() modifies the
      read pointer, this function must not be called from the writer thread.
      This patch removes the dvb_ringbuffer_flush() calls in the dmxdev ringbuffer
      write functions, this fixes Oopses "Unable to handle kernel paging request"
      I could observe for the call chaindvb_demux_read ->dvb_dmxdev_buffer_read ->
      dvb_ringbuffer_read_user -> __copy_to_user (the reader side of the ringbuffer).
      The flush calls at the write side are not necessary anyway since ringbuffer_flush
      is also called in dvb_dmxdev_buffer_read() when an error condition is set in the
      ringbuffer.
      This patch should also be applied to stable kernels.
      Signed-off-by: NSoeren Moch <smoch@web.de>
      CC: <stable@vger.kernel.org>
      Reviewed-by: NSakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      414abbd2
  11. 08 4月, 2013 1 次提交
    • M
      [media] demux.h: Remove duplicated enum · fde04ab9
      Mauro Carvalho Chehab 提交于
      "enum dmx_ts_pes" and "typedef enum dmx_pes_type_t" are just the
      same enum declared twice, since Kernel (2.6.12). There's no reason
      to duplicate it there, and sparse complains about that:
      	drivers/media/dvb-core/dmxdev.c:600:55: warning: mixing different enum types
      So, remove the internal define, keeping just the external one.
      Internally, use only "enum dmx_ts_pes", as it is too late to drop
      dmx_pes_type_t from the userspace API.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      fde04ab9
  12. 05 3月, 2013 1 次提交
    • M
      [media] mb86a20s: change AGC tuning parameters · 17e67d4c
      Mauro Carvalho Chehab 提交于
      Use the AGC settings present on a newer device.
      The initial settings were taken from one of the first devices with
      mb86a20s, and there are several reports that this is not working
      properly on some places.
      So, instead of keeping using it, get the parameters taken from a
      newer device. Tests are welcomed.
      Tested also with cx231xx PixelView SBTVD Hybrid with no regressions
      noticed so far.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      17e67d4c
  13. 28 10月, 2012 1 次提交
  14. 14 8月, 2012 2 次提交
  15. 29 3月, 2012 1 次提交
  16. 29 12月, 2010 1 次提交
  17. 21 10月, 2010 1 次提交
  18. 19 10月, 2010 1 次提交
    • A
      dvb-core: kill the big kernel lock · 72024f1e
      Arnd Bergmann 提交于
      The dvb core only uses the big kernel lock in the open
      and ioctl functions, which means it can be replaced with
      a dvb specific mutex. Fortunately, all the ioctl functions
      go through dvb_usercopy, so we can move the serialization
      in there.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: linux-media@vger.kernel.org
      72024f1e
  19. 15 10月, 2010 1 次提交
    • A
      llseek: automatically add .llseek fop · 6038f373
      Arnd Bergmann 提交于
      All file_operations should get a .llseek operation so we can make
      nonseekable_open the default for future file operations without a
      .llseek pointer.
      
      The three cases that we can automatically detect are no_llseek, seq_lseek
      and default_llseek. For cases where we can we can automatically prove that
      the file offset is always ignored, we use noop_llseek, which maintains
      the current behavior of not returning an error from a seek.
      
      New drivers should normally not use noop_llseek but instead use no_llseek
      and call nonseekable_open at open time.  Existing drivers can be converted
      to do the same when the maintainer knows for certain that no user code
      relies on calling seek on the device file.
      
      The generated code is often incorrectly indented and right now contains
      comments that clarify for each added line why a specific variant was
      chosen. In the version that gets submitted upstream, the comments will
      be gone and I will manually fix the indentation, because there does not
      seem to be a way to do that using coccinelle.
      
      Some amount of new code is currently sitting in linux-next that should get
      the same modifications, which I will do at the end of the merge window.
      
      Many thanks to Julia Lawall for helping me learn to write a semantic
      patch that does all this.
      
      ===== begin semantic patch =====
      // This adds an llseek= method to all file operations,
      // as a preparation for making no_llseek the default.
      //
      // The rules are
      // - use no_llseek explicitly if we do nonseekable_open
      // - use seq_lseek for sequential files
      // - use default_llseek if we know we access f_pos
      // - use noop_llseek if we know we don't access f_pos,
      //   but we still want to allow users to call lseek
      //
      @ open1 exists @
      identifier nested_open;
      @@
      nested_open(...)
      {
      <+...
      nonseekable_open(...)
      ...+>
      }
      
      @ open exists@
      identifier open_f;
      identifier i, f;
      identifier open1.nested_open;
      @@
      int open_f(struct inode *i, struct file *f)
      {
      <+...
      (
      nonseekable_open(...)
      |
      nested_open(...)
      )
      ...+>
      }
      
      @ read disable optional_qualifier exists @
      identifier read_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      expression E;
      identifier func;
      @@
      ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
      {
      <+...
      (
         *off = E
      |
         *off += E
      |
         func(..., off, ...)
      |
         E = *off
      )
      ...+>
      }
      
      @ read_no_fpos disable optional_qualifier exists @
      identifier read_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      @@
      ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
      {
      ... when != off
      }
      
      @ write @
      identifier write_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      expression E;
      identifier func;
      @@
      ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
      {
      <+...
      (
        *off = E
      |
        *off += E
      |
        func(..., off, ...)
      |
        E = *off
      )
      ...+>
      }
      
      @ write_no_fpos @
      identifier write_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      @@
      ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
      {
      ... when != off
      }
      
      @ fops0 @
      identifier fops;
      @@
      struct file_operations fops = {
       ...
      };
      
      @ has_llseek depends on fops0 @
      identifier fops0.fops;
      identifier llseek_f;
      @@
      struct file_operations fops = {
      ...
       .llseek = llseek_f,
      ...
      };
      
      @ has_read depends on fops0 @
      identifier fops0.fops;
      identifier read_f;
      @@
      struct file_operations fops = {
      ...
       .read = read_f,
      ...
      };
      
      @ has_write depends on fops0 @
      identifier fops0.fops;
      identifier write_f;
      @@
      struct file_operations fops = {
      ...
       .write = write_f,
      ...
      };
      
      @ has_open depends on fops0 @
      identifier fops0.fops;
      identifier open_f;
      @@
      struct file_operations fops = {
      ...
       .open = open_f,
      ...
      };
      
      // use no_llseek if we call nonseekable_open
      ////////////////////////////////////////////
      @ nonseekable1 depends on !has_llseek && has_open @
      identifier fops0.fops;
      identifier nso ~= "nonseekable_open";
      @@
      struct file_operations fops = {
      ...  .open = nso, ...
      +.llseek = no_llseek, /* nonseekable */
      };
      
      @ nonseekable2 depends on !has_llseek @
      identifier fops0.fops;
      identifier open.open_f;
      @@
      struct file_operations fops = {
      ...  .open = open_f, ...
      +.llseek = no_llseek, /* open uses nonseekable */
      };
      
      // use seq_lseek for sequential files
      /////////////////////////////////////
      @ seq depends on !has_llseek @
      identifier fops0.fops;
      identifier sr ~= "seq_read";
      @@
      struct file_operations fops = {
      ...  .read = sr, ...
      +.llseek = seq_lseek, /* we have seq_read */
      };
      
      // use default_llseek if there is a readdir
      ///////////////////////////////////////////
      @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier readdir_e;
      @@
      // any other fop is used that changes pos
      struct file_operations fops = {
      ... .readdir = readdir_e, ...
      +.llseek = default_llseek, /* readdir is present */
      };
      
      // use default_llseek if at least one of read/write touches f_pos
      /////////////////////////////////////////////////////////////////
      @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read.read_f;
      @@
      // read fops use offset
      struct file_operations fops = {
      ... .read = read_f, ...
      +.llseek = default_llseek, /* read accesses f_pos */
      };
      
      @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier write.write_f;
      @@
      // write fops use offset
      struct file_operations fops = {
      ... .write = write_f, ...
      +	.llseek = default_llseek, /* write accesses f_pos */
      };
      
      // Use noop_llseek if neither read nor write accesses f_pos
      ///////////////////////////////////////////////////////////
      
      @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read_no_fpos.read_f;
      identifier write_no_fpos.write_f;
      @@
      // write fops use offset
      struct file_operations fops = {
      ...
       .write = write_f,
       .read = read_f,
      ...
      +.llseek = noop_llseek, /* read and write both use no f_pos */
      };
      
      @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier write_no_fpos.write_f;
      @@
      struct file_operations fops = {
      ... .write = write_f, ...
      +.llseek = noop_llseek, /* write uses no f_pos */
      };
      
      @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read_no_fpos.read_f;
      @@
      struct file_operations fops = {
      ... .read = read_f, ...
      +.llseek = noop_llseek, /* read uses no f_pos */
      };
      
      @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      @@
      struct file_operations fops = {
      ...
      +.llseek = noop_llseek, /* no read or write fn */
      };
      ===== End semantic patch =====
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Christoph Hellwig <hch@infradead.org>
      6038f373
  20. 03 8月, 2010 1 次提交
    • J
      V4L/DVB: DVB: fix dvr node refcounting · 1c488ea9
      Jiri Slaby 提交于
      In dvb_dvr_release, there is a test dvbdev->users==-1, but users are
      never negative. This error results in hung tasks:
        task                        PC stack   pid father
      bash          D ffffffffa000c948     0  3264   3170 0x00000000
       ffff88003aec5ce8 0000000000000086 0000000000011f80 0000000000011f80
       ffff88003aec5fd8 ffff88003aec5fd8 ffff88003b848670 0000000000011f80
       ffff88003aec5fd8 0000000000011f80 ffff88003e02a030 ffff88003b848670
      Call Trace:
       [<ffffffff813dd4a5>] dvb_dmxdev_release+0xc5/0x130
       [<ffffffff8107b750>] ? autoremove_wake_function+0x0/0x40
       [<ffffffffa00013a2>] dvb_usb_adapter_dvb_exit+0x42/0x70 [dvb_usb]
       [<ffffffffa0000525>] dvb_usb_exit+0x55/0xd0 [dvb_usb]
       [<ffffffffa00005ee>] dvb_usb_device_exit+0x4e/0x70 [dvb_usb]
       [<ffffffffa000a065>] af9015_usb_device_exit+0x55/0x60 [dvb_usb_af9015]
       [<ffffffff813a3f05>] usb_unbind_interface+0x55/0x1a0
       [<ffffffff81316000>] __device_release_driver+0x70/0xe0
      ...
      
      So check against 1 there instead.
      
      BTW why's the TODO there? Adding TODOs to the code without
      descriptions is like adding nothing.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      1c488ea9
  21. 17 5月, 2010 1 次提交
  22. 08 2月, 2010 1 次提交
  23. 05 10月, 2009 1 次提交
  24. 02 10月, 2009 1 次提交
  25. 12 9月, 2009 1 次提交
    • A
      V4L/DVB (12275): Add two new ioctls: DMX_ADD_PID and DMX_REMOVE_PID · 1cb662a3
      Andreas Oberritter 提交于
      DMX_ADD_PID allows to add multiple PIDs to a transport stream filter
      previously set up with DMX_SET_PES_FILTER and output=DMX_OUT_TSDEMUX_TAP.
      
      DMX_REMOVE_PID is used to drop a PID from a filter.
      
      These ioctls are to be used by readers of /dev/dvb/adapterX/demuxY. They
      may be called at any time, i.e. before or after the first filter on the
      shared file descriptor was started.
      
      They make it possible to record multiple services without the need to de-
      or re-multiplex TS packets.
      
      To accomplish this, dmxdev_filter->feed.ts has been converted to a list
      of struct dmxdev_feeds, each containing a PID value and a pointer to a
      struct dmx_ts_feed.
      Signed-off-by: NAndreas Oberritter <obi@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      1cb662a3
  26. 17 6月, 2009 1 次提交
  27. 30 3月, 2009 1 次提交
  28. 17 2月, 2009 1 次提交
    • M
      V4L/DVB (10572): Revert commit dda06a8e · 28100165
      Mauro Carvalho Chehab 提交于
      On Mon, 02 Feb 2009, Hartmut wrote:
      
      This change set is wrong. The affected functions cannot be called from
      an interrupt context, because they may process large buffers. In this
      case, interrupts are disabled for a long time. Functions, like
      dvb_dmx_swfilter_packets(), could be called only from a tasklet.
      
      This change set does hide some strong design bugs in dm1105.c and
      au0828-dvb.c.
      
      Please revert this change set and do fix the bugs in dm1105.c and
      au0828-dvb.c (and other files).
      
      On Sun, 15 Feb 2009, Oliver Endriss wrote:
      
      This changeset _must_ be reverted! It breaks all kernels since 2.6.27
      for applications which use DVB and require a low interrupt latency.
      
      It is a very bad idea to call the demuxer to process data buffers with
      interrupts disabled!
      
      On Mon, 16 Feb 2009, Trent Piepho wrote:
      
      I agree, this is bad.  The demuxer is far too much work to be done with
      IRQs off.  IMHO, even doing it under a spin-lock is excessive.  It should
      be a mutex.  Drivers should use a work-queue to feed the demuxer.
      
      Thank you for testing this changeset and discovering the issues on it.
      
      Cc: Trent Piepho <xyzzy@speakeasy.org>
      Cc: Hartmut <e9hack@googlemail.com>
      Cc: Oliver Endriss <o.endriss@gmx.de>
      Cc: Andreas Oberritter <obi@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      28100165
  29. 05 10月, 2008 1 次提交
  30. 04 9月, 2008 1 次提交
  31. 20 7月, 2008 1 次提交
  32. 25 4月, 2008 5 次提交
  33. 10 10月, 2007 1 次提交