1. 14 11月, 2017 15 次提交
  2. 08 11月, 2017 6 次提交
  3. 02 11月, 2017 1 次提交
  4. 31 10月, 2017 1 次提交
  5. 24 10月, 2017 2 次提交
  6. 23 10月, 2017 5 次提交
  7. 20 10月, 2017 2 次提交
    • A
      dmaengine: pl330: fix descriptor allocation fail · e5887103
      Alexander Kochetkov 提交于
      If two concurrent threads call pl330_get_desc() when DMAC descriptor
      pool is empty it is possible that allocation for one of threads will fail
      with message:
      
      kernel: dma-pl330 20078000.dma-controller: pl330_get_desc:2469 ALERT!
      
      Here how that can happen. Thread A calls pl330_get_desc() to get
      descriptor. If DMAC descriptor pool is empty pl330_get_desc() allocates
      new descriptor on shared pool using add_desc() and then get newly
      allocated descriptor using pluck_desc(). At the same time thread B calls
      pluck_desc() and take newly allocated descriptor. In that case descriptor
      allocation for thread A will fail.
      
      Using on-stack pool for new descriptor allow avoid the issue described.
      The patch modify pl330_get_desc() to use on-stack pool for allocation
      new descriptors.
      Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com>
      Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      e5887103
    • H
      dmaengine: rcar-dmac: use TCRB instead of TCR for residue · 847449f2
      Hiroyuki Yokoyama 提交于
      SYS/RT/Audio DMAC includes independent data buffers for reading
      and writing. Therefore, the read transfer counter and write transfer
      counter have different values.
      TCR indicates read counter, and TCRB indicates write counter.
      The relationship is like below.
      
              TCR       TCRB
      [SOURCE] -> [DMAC] -> [SINK]
      
      In the MEM_TO_DEV direction, what really matters is how much data has
      been written to the device. If the DMA is interrupted between read and
      write, then, the data doesn't end up in the destination, so shouldn't
      be counted. TCRB is thus the register we should use in this cases.
      
      In the DEV_TO_MEM direction, the situation is more complex. Both the
      read and write side are important. What matters from a data consumer
      point of view is how much data has been written to memory.
      On the other hand, if the transfer is interrupted between read and
      write, we'll end up losing data. It can also be important to report.
      
      In the MEM_TO_MEM direction, what matters is of course how much data
      has been written to memory from data consumer point of view.
      Here, because read and write have independent data buffers, it will
      take a while for TCR and TCRB to become equal. Thus we should check
      TCRB in this case, too.
      
      Thus, all cases we should check TCRB instead of TCR.
      
      Without this patch, Sound Capture has noise after PluseAudio support
      (= 07b7acb5 ("ASoC: rsnd: update pointer more accurate")), because
      the recorder will use wrong residue counter which indicates transferred
      from sound device, but in reality the data was not yet put to memory
      and recorder will record it.
      Signed-off-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
      [Kuninori: added detail information in log]
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      847449f2
  8. 16 10月, 2017 8 次提交