1. 23 12月, 2012 6 次提交
  2. 28 10月, 2012 1 次提交
  3. 25 10月, 2012 1 次提交
  4. 06 10月, 2012 1 次提交
  5. 03 10月, 2012 1 次提交
  6. 16 8月, 2012 1 次提交
  7. 07 7月, 2012 1 次提交
  8. 22 6月, 2012 1 次提交
  9. 18 6月, 2012 1 次提交
  10. 15 5月, 2012 3 次提交
  11. 11 4月, 2012 3 次提交
  12. 20 3月, 2012 4 次提交
  13. 08 3月, 2012 1 次提交
    • G
      [media] em28xx: pre-allocate DVB isoc transfer buffers · 86d38d1e
      Gianluca Gennari 提交于
      On MIPS/ARM set-top-boxes, as well as old x86 PCs, memory allocation failures
      in the em28xx driver are common, due to memory fragmentation over time, that
      makes impossible to allocate large chunks of coherent memory.
      A typical system with 256/512 MB of RAM fails after just 1 day of uptime (see
      the old thread for detailed reports and crashlogs).
      
      In fact, the em28xx driver allocates memory for USB isoc transfers at runtime,
      as opposite to the dvb-usb drivers that allocates the USB buffers when the
      device is initialized, and frees them when the device is disconnected.
      
      Moreover, in digital mode the USB isoc transfer buffers are freed, allocated
      and cleared every time the user selects a new channel, wasting time and
      resources.
      
      This patch solves both problems by allocating DVB isoc transfer buffers in
      em28xx_usb_probe(), and freeing them in em28xx_usb_disconnect().
      In fact, the buffers size and number depend only on the max USB packet size
      that is parsed from the USB descriptors in em28xx_usb_probe(), so it can
      never change for a given device.
      
      This approach makes no sense in analog mode (as the buffer size depends on
      the alternate mode selected at runtime), the patch creates two separate sets
      of buffers for digital and analog modes.
      
      For digital-only devices, USB buffers are created when the device is probed
      and freed when the device is disconnected.
      For analog-only devices, nothing changes: isoc buffers are created at runtime.
      For hybrid devices, two sets of buffers are maintained: the digital-mode
      buffers are created when the device is probed, and freed when the device is
      disconnected; analog-mode buffers are created/destroyed at runtime as before.
      So, in analog mode, digital and analog buffers coexists at the same time: this
      can be justified by the fact that digital mode is by far more commonly used
      nowadays, so it makes sense to optimize the driver for this use case scenario.
      
      The patch has been tested in the last few days on a x86 PC and a MIPS
      set-top-box, with the PCTV 290e (digital only) and the Terratec Hybrid XS
      (hybrid device). With the latter, I switched several times between analog and
      digital mode (Kaffeine/TvTime) with no issue at all.
      I unplugged/plugged the devices several times with no problem.
      Also, after over 3 days of normal usage in the MPIS set-top-box, the PCTV 290e
      was still up and running.
      Signed-off-by: NGianluca Gennari <gennarone@gmail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      86d38d1e
  14. 11 1月, 2012 4 次提交
  15. 07 1月, 2012 1 次提交
  16. 06 1月, 2012 4 次提交
  17. 31 12月, 2011 1 次提交
  18. 25 11月, 2011 2 次提交
  19. 20 11月, 2011 3 次提交