From 3bc09aab6e2e0c0734df736e6cc2c0d2d94d8b92 Mon Sep 17 00:00:00 2001 From: Sujin Panicker Date: Wed, 8 Dec 2021 15:50:27 +0530 Subject: [PATCH] dsp: Make synchronous call to unmap afe cal data On multiple async unmap_cal calls there are chances hlos releases the ion memory while adsp is still under going the unmap process, in such cases there could be smmu fault due to dsp accessing memory region which is already released by the hlos. Fix this by making synchronous unmap calls to adsp. Change-Id: I88082e989884446546de846097ad7b031496830e Signed-off-by: Sujin Panicker --- dsp/q6afe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsp/q6afe.c b/dsp/q6afe.c index 81c783b84e73..5ebf3e77c185 100755 --- a/dsp/q6afe.c +++ b/dsp/q6afe.c @@ -11582,7 +11582,7 @@ static int afe_unmap_cal_data(int32_t cal_type, atomic_set(&this_afe.mem_map_cal_handles[cal_index], cal_block->map_data.q6map_handle); atomic_set(&this_afe.mem_map_cal_index, cal_index); - ret = afe_cmd_memory_unmap_nowait( + ret = afe_cmd_memory_unmap( cal_block->map_data.q6map_handle); atomic_set(&this_afe.mem_map_cal_index, -1); if (ret < 0) {