From 1b7b271980094637cf34a9d8ad14cb36f2c36363 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 20 Mar 2015 12:59:09 -0700 Subject: gpu: nvgpu: Use common allocator for context Reduce amount of duplicate code around memory allocation by using common helpers, and common data structure for storing results of allocations. Bug 1605769 Change-Id: I10c226e2377aa867a5cf11be61d08a9d67206b1d Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/720507 --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index e2e5fdd7..c86fee45 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -1581,7 +1581,7 @@ void gk20a_gmmu_free_attr(struct gk20a *g, enum dma_attr attr, { struct device *d = dev_from_gk20a(g); - if (mem->cpu_va) { + if (mem->cpu_va || mem->pages) { if (attr) { DEFINE_DMA_ATTRS(attrs); dma_set_attr(attr, &attrs); -- cgit v1.2.2