Browse Source

dsp: remove ION_FLAG_CACHED for DMA buf heap

ION_FLAG_CACHED is no longer supported for DMA
buf heap. Remove cache maintenance as it can be
counter productive for CMA memory.

Change-Id: I13c58a4304269c6140fbca891cf718ab6a0eb2fe
Signed-off-by: Vikram Panduranga <[email protected]>
Vikram Panduranga 3 years ago
parent
commit
1873045b4d
1 changed files with 0 additions and 12 deletions
  1. 0 12
      dsp/msm_audio_ion.c

+ 0 - 12
dsp/msm_audio_ion.c

@@ -142,7 +142,6 @@ static int msm_audio_dma_buf_map(struct dma_buf *dma_buf,
 {
 
 	struct msm_audio_alloc_data *alloc_data = NULL;
-	unsigned long ionflag = 0;
 	int rc = 0;
 	void *vaddr = NULL;
 	struct device *cb_dev = ion_data->cb_dev;
@@ -167,17 +166,6 @@ static int msm_audio_dma_buf_map(struct dma_buf *dma_buf,
 		goto free_alloc_data;
 	}
 
-	/* For uncached buffers, avoid cache maintanance */
-	rc = dma_buf_get_flags(alloc_data->dma_buf, &ionflag);
-	if (rc) {
-		dev_err(cb_dev, "%s: dma_buf_get_flags failed: %d\n",
-			__func__, rc);
-		goto detach_dma_buf;
-	}
-
-	if (!(ionflag & ION_FLAG_CACHED))
-		alloc_data->attach->dma_map_attrs |= DMA_ATTR_SKIP_CPU_SYNC;
-
 	/*
 	 * Get the scatter-gather list.
 	 * There is no info as this is a write buffer or