From 037acea39821674ea0548bd999a4d56f2574db67 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 12 Feb 2020 14:49:37 +0800 Subject: [PATCH] dsp: use dma handle as default input in hab export currently in hab driver, it want to hold all bufs as dmabuf for fulture implement, and it's hard to get dmabuf fd/handle from a kva, so hab need to generate a new dmabuf for itself, and this will intruduce audio crash issue in conclusion, for now hab just accept dma fd/handl as input in KHAB export path. Change-Id: I11715ba966036f7c02b67d0bdae97eb6d7118d5c Signed-off-by: Hui Li --- dsp/msm_audio_ion_vm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dsp/msm_audio_ion_vm.c b/dsp/msm_audio_ion_vm.c index f9635b3328d1..e0e2a29aced6 100644 --- a/dsp/msm_audio_ion_vm.c +++ b/dsp/msm_audio_ion_vm.c @@ -306,7 +306,6 @@ static int msm_audio_ion_smmu_map(void *handle, struct msm_audio_smmu_vm_map_cmd_rsp cmd_rsp; struct msm_audio_alloc_data *alloc_data = NULL; unsigned long delay = jiffies + (HZ / 2); - void *vaddr; *len = ((struct dma_buf*)handle)->size; @@ -315,14 +314,13 @@ static int msm_audio_ion_smmu_map(void *handle, list) { if (alloc_data->handle == handle) { found = true; - vaddr = alloc_data->vaddr; /* Export the buffer to physical VM */ - rc = habmm_export(msm_audio_ion_hab_handle, vaddr, *len, - &export_id, 0); + rc = habmm_export(msm_audio_ion_hab_handle, handle, *len, + &export_id, HABMM_EXPIMP_FLAGS_DMABUF); if (rc) { - pr_err("%s: habmm_export failed vaddr = %pK, len = %zd, rc = %d\n", - __func__, vaddr, *len, rc); + pr_err("%s: habmm_export failed handle = %pK, len = %zd, rc = %d\n", + __func__, handle, *len, rc); goto err; }