diff options
author | John Stultz <john.stultz@linaro.org> | 2016-08-29 10:30:51 -0700 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-08-31 10:09:32 +0530 |
commit | 36387a2b1f62b5c087c5fe6f0f7b23b94f722ad7 (patch) | |
tree | 44e1b2bb543d2b4f9c80aef802dfd6cd17c36399 /tools | |
parent | b77f262ae351d467c22b056f6d13afeeab7ea69a (diff) | |
download | linux-36387a2b1f62b5c087c5fe6f0f7b23b94f722ad7.tar.bz2 |
k3dma: Fix memory handling in preparation for cyclic mode
With cyclic mode, the shared virt-dma logic doesn't actually
manage the descriptor state, nor the calling of the descriptor
free callback. This results in leaking a desc structure every
time we start an audio transfer.
Thus we must manage it ourselves. The k3dma driver already keeps
track of the active and finished descriptors via ds_run and ds_done
pointers, so cleanup how we handle those two values, so when we
tear down everything in terminate_all, call free_desc on the ds_run
and ds_done pointers if they are not null.
NOTE: HiKey doesn't use the non-cyclic dma modes, so I'm not been
able to test those modes. But with this patch we no longer leak
the desc structures.
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Andy Green <andy@warmcat.com>
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions