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 <quic_spanic@quicinc.com>
This commit is contained in:
Sujin Panicker 2021-12-08 15:50:27 +05:30 • committed by Gerrit - the friendly Code Review server
commit 3bc09aab6e

View file

@ -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) {