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 <vpandura@codeaurora.org>
This commit is contained in:
@@ -142,7 +142,6 @@ static int msm_audio_dma_buf_map(struct dma_buf *dma_buf,
|
|||||||
{
|
{
|
||||||
|
|
||||||
struct msm_audio_alloc_data *alloc_data = NULL;
|
struct msm_audio_alloc_data *alloc_data = NULL;
|
||||||
unsigned long ionflag = 0;
|
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
void *vaddr = NULL;
|
void *vaddr = NULL;
|
||||||
struct device *cb_dev = ion_data->cb_dev;
|
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;
|
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.
|
* Get the scatter-gather list.
|
||||||
* There is no info as this is a write buffer or
|
* There is no info as this is a write buffer or
|
||||||
|
Reference in New Issue
Block a user