summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/dma.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c
index 832d0f47..7453fdef 100644
--- a/drivers/gpu/nvgpu/common/linux/dma.c
+++ b/drivers/gpu/nvgpu/common/linux/dma.c
@@ -334,7 +334,8 @@ static void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem)
334{ 334{
335 struct device *d = dev_from_gk20a(g); 335 struct device *d = dev_from_gk20a(g);
336 336
337 if (mem->cpu_va || mem->priv.pages) { 337 if (!(mem->mem_flags & NVGPU_MEM_FLAG_SHADOW_COPY) &&
338 (mem->cpu_va || mem->priv.pages)) {
338 if (mem->priv.flags) { 339 if (mem->priv.flags) {
339 DEFINE_DMA_ATTRS(dma_attrs); 340 DEFINE_DMA_ATTRS(dma_attrs);
340 341