Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfc919ea authored by Banajit Goswami's avatar Banajit Goswami
Browse files

dsp: msm_audio_ion: check only for probe complete for ION alloc



While allocating and importing ION buffers, make sure to check
for probe complete flag before proceeding instead of checking for
the flag AND smmu_enabled flag. This way the restriction will be
centralized for either types of targets with and without SMMU.

Change-Id: I558e19724d1002a602377a636e274bc90ca8262d
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent ceb09056
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -347,8 +347,7 @@ int msm_audio_ion_alloc(struct dma_buf **dma_buf, size_t bufsz,
	int rc = -EINVAL;
	unsigned long err_ion_ptr = 0;

	if ((msm_audio_ion_data.smmu_enabled == true) &&
	    !(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) {
	if (!(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) {
		pr_debug("%s:probe is not done, deferred\n", __func__);
		return -EPROBE_DEFER;
	}
@@ -412,8 +411,7 @@ int msm_audio_ion_import(struct dma_buf **dma_buf, int fd,
{
	int rc = 0;

	if ((msm_audio_ion_data.smmu_enabled == true) &&
	    !(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) {
	if (!(msm_audio_ion_data.device_status & MSM_AUDIO_ION_PROBED)) {
		pr_debug("%s: probe is not done, deferred\n", __func__);
		return -EPROBE_DEFER;
	}