1. 16 Feb, 2015 7 commits
  2. 12 Feb, 2015 3 commits
  3. 11 Feb, 2015 1 commit
    • Addy Ke's avatar
      dmaengine: pl330: fix bug that cause start the same descs in cyclic · 0091b9d6
      Addy Ke authored
      This bug will cause NULL pointer after commit dfac17, and cause
      wrong package in I2S DMA transfer before commit dfac17.
      
      Tested on RK3288-pinky2 board.
      
      Detail:
      I2S DMA transfer(sound/core/pcm_dmaengine.c):
      dmaengine_pcm_prepare_and_submit -->
      dmaengine_prep_dma_cyclic -->
      pl330_prep_dma_cyclic -->
      the case:
      1. pl330_submit_req(desc0): thrd->req[0].desc = desc0, thrd->lstenq = 0
      2. pl330_submit_req(desc1): thrd->req[1].desc = desc1, thrd->lstenq = 1
      3. _start(desc0) by submit_req: thrd->req_running = 0
         because: idx = 1 - thrd->lstenq = 0
      4. pl330_update(desc0 OK): thrd->req[0].desc = NULL, desc0 to req_done list
         because: idx = active = thrd->req_running = 0
      5. _start(desc1) by pl330_update: thrd->req_running = 1
         because:
         idx = 1 - thrd->lstenq = 0, but thrd->req[0].desc == NULL,
         so:
         idx = thrd->lstenq = 1
      6. pl330_submit_req(desc2): thrd->req[0].desc = desc2, thrd->lstenq = 0
      7. _start(desc1) by submit_req: thrd->req_running = 1
         because: idx = 1 - thrd->lstenq = 1
         Note: _start started the same descs
               _start should start desc2 here, NOT desc1
      
      8. pl330_update(desc1 OK): thrd->req[1].desc = NULL, desc1 to req_done list
         because: idx = active = thrd->req_running = 1
      9. _start(desc2) by pl330_update : thrd->req_running = 0
         because: idx = 1 - thrd->lstenq = 0
      10.pl330_update(desc1 OK, NOT desc2): thrd->req[0].desc = NULL,
         desc2 to req_done list
         because: idx = active = thrd->req_running = 0
      
      11.pl330_submit_req(desc3): thrd->req[0].desc = desc3, thrd->lstenq = 0
      12.pl330_submit_req(desc4): thrd->req[1].desc = desc4, thrd->lstenq = 1
      13._start(desc3) by submit_req: thrd->req_running = 0
         because: idx = 1 - thrd->lstenq = 0
      14.pl330_update(desc2 OK NOT desc3): thrd->req[0].desc = NULL
         desc3 to req_done list
         because: idx = active = thrd->req_running = 0
      15._start(desc4) by pl330_update: thrd->req_running = 1
         because:
         idx = 1 - thrd->lstenq = 0, but thrd->req[0].desc == NULL,
         so:
         idx = thrd->lstenq = 1
      16.pl330_submit_req(desc5): thrd->req[0].desc = desc5, thrd->lstenq = 0
      17._start(desc4) by submit_req: thrd->req_running = 1
         because: idx = 1 - thrd->lstenq = 1
      18.pl330_update(desc3 OK NOT desc4): thrd->req[1].desc = NULL
         desc4 to req_done list
         because: idx = active = thrd->req_running = 1
      19._start(desc4) by pl330_update: thrd->req_running = 0
         because:
         idx = 1 - thrd->lstenq = 1, but thrd->req[1].desc == NULL,
         so:
         idx = thrd->lstenq = 0
      20.pl330_update(desc4 OK): thrd->req[0].desc = NULL, desc5 to req_done list
         because: idx = active = thrd->req_running = 0
      21.pl330_update(desc4 OK):
         1) before commit dfac17(set req_running -1 in pl330_update/mark_free()):
            because: active = -1, abort
            result: desc0-desc5's callback are all called,
      	      but step 10 and step 18 go wrong.
         2) before commit dfac17:
            idx = active = thrd->req_runnig = 0 -->
            descdone = thrd->req[0] = NULL -->
            list_add_tail(&descdone->rqd, &pl330->req_done); -->
            got NULL pointer!!!
      Signed-off-by: default avatarAddy Ke <addy.ke@rock-chips.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      0091b9d6
  4. 05 Feb, 2015 12 commits
  5. 04 Feb, 2015 3 commits
  6. 03 Feb, 2015 2 commits
  7. 26 Jan, 2015 3 commits
  8. 19 Jan, 2015 1 commit
  9. 18 Jan, 2015 4 commits
  10. 13 Jan, 2015 4 commits
    • Ludovic Desroches's avatar
      dmaengine: at_hdmac: declare slave capabilities · 816070ed
      Ludovic Desroches authored
      Declare slave capabilities to suppress "this driver doesn't support generic
      slave capabilities reporting" warning.
      Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      816070ed
    • Paul Walmsley's avatar
      dmaengine: tegra: add slave capabilities reporting · 891653ab
      Paul Walmsley authored
      After commit ecc19d17 ("dmaengine: Add
      a warning for drivers not using the generic slave caps retrieval"),
      the Tegra APB DMA driver causes this warning during boot:
      
      WARNING: CPU: 0 PID: 1 at drivers/dma/dmaengine.c:830 dma_async_device_register+0x294/0x538()
      this driver doesn't support generic slave capabilities reporting
      
      Fix by setting the appropriate reporting structure fields that are
      passed to dma_async_device_register().
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Tested-by: default avatarThierry Reding <treding@nvidia.com>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      891653ab
    • Kevin Hao's avatar
      dmaengine: fsldma: remove the unused variable · 0fdd244f
      Kevin Hao authored
      Fix the following build warning:
        drivers/dma/fsldma.c: In function 'fsl_dma_device_terminate_all':
        drivers/dma/fsldma.c:947:6: warning: unused variable 'size' [-Wunused-variable]
      Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      0fdd244f
    • Kevin Hao's avatar
      dmaengine: fsldma: declare slave capabilities for the generic code · 75dc1775
      Kevin Hao authored
      Since commit ecc19d17 ("dmaengine: Add a warning for drivers not
      using the generic slave caps retrieval"), the dma drivers are required
      to fill the caps infos in order to support generic slaves caps
      retrieval. Otherwise we will get a warning like this:
        WARNING: at drivers/dma/dmaengine.c:830
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W       3.19.0-rc2-next-20150106-dirty #271
        task: c0000001f70a0000 ti: c0000001f7044000 task.ti: c0000001f7044000
        NIP: c00000000032b238 LR: c00000000032b234 CTR: c00000000001d258
        REGS: c0000001f7047330 TRAP: 0700   Tainted: G        W        (3.19.0-rc2-next-20150106-dirty)
        MSR: 0000000080029000 <CE,EE,ME>  CR: 24adbe22  XER: 20000000
        SOFTE: 1
        GPR00: c00000000032b234 c0000001f70475b0 c0000000009b4848 0000000000000040
        GPR04: 0000000000000001 0000000000000001 0000000000000000 000000000000000f
        GPR08: 0000000000000000 c000000000902988 c000000000902988 00000000000052c8
        GPR12: 0000000024adbe22 c00000000fff4000 c000000000002038 0000000000000000
        GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
        GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
        GPR24: 0000000000000000 0000000000000000 c000000000972dc8 c0000000007e6fd0
        GPR28: c0000001f76d1d30 c0000001f76d1c10 c0000001f76d1c00 0000000000000000
        NIP [c00000000032b238] .dma_async_device_register+0x3f8/0x5b8
        LR [c00000000032b234] .dma_async_device_register+0x3f4/0x5b8
        Call Trace:
        [c0000001f70475b0] [c00000000032b234] .dma_async_device_register+0x3f4/0x5b8 (unreliable)
        [c0000001f70476a0] [c00000000032ca78] .fsldma_of_probe+0x298/0x438
        [c0000001f7047750] [c00000000037080c] .platform_drv_probe+0x50/0x9c
        [c0000001f70477d0] [c00000000036e74c] .really_probe+0xa4/0x29c
        [c0000001f7047870] [c00000000036eae4] .__driver_attach+0x100/0x104
        [c0000001f7047900] [c00000000036c1f0] .bus_for_each_dev+0x84/0xe4
        [c0000001f70479a0] [c00000000036e164] .driver_attach+0x24/0x38
        [c0000001f7047a10] [c00000000036dcc8] .bus_add_driver+0x1c8/0x2ac
        [c0000001f7047ab0] [c00000000036f14c] .driver_register+0x8c/0x158
        [c0000001f7047b30] [c0000000003707a8] .__platform_driver_register+0x6c/0x80
        [c0000001f7047ba0] [c000000000898a3c] .fsldma_init+0x2c/0x40
        [c0000001f7047c10] [c000000000001818] .do_one_initcall+0xb8/0x234
        [c0000001f7047d00] [c000000000878e2c] .kernel_init_freeable+0x188/0x268
        [c0000001f7047db0] [c000000000002054] .kernel_init+0x1c/0xfc8
        [c0000001f7047e30] [c000000000000884] .ret_from_kernel_thread+0x58/0xd4
        Instruction dump:
        7fb9f840 3bffffe0 409effac 7f54d378 48000060 813d0050 2f890000 40befdd0
        3c62ffe3 38632450 482f0aa9 60000000 <0fe00000> 4bfffdb8 7f03c378 482ed465
      Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      75dc1775