summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 94d31273..3cda3034 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -33,6 +33,7 @@
33#include <nvgpu/kmem.h> 33#include <nvgpu/kmem.h>
34#include <nvgpu/timers.h> 34#include <nvgpu/timers.h>
35#include <nvgpu/pramin.h> 35#include <nvgpu/pramin.h>
36#include <nvgpu/list.h>
36#include <nvgpu/allocator.h> 37#include <nvgpu/allocator.h>
37#include <nvgpu/semaphore.h> 38#include <nvgpu/semaphore.h>
38#include <nvgpu/page_allocator.h> 39#include <nvgpu/page_allocator.h>
@@ -2174,7 +2175,8 @@ static u64 gk20a_mm_get_align(struct gk20a *g, struct scatterlist *sgl,
2174 struct nvgpu_page_alloc *alloc = get_vidmem_page_alloc(sgl); 2175 struct nvgpu_page_alloc *alloc = get_vidmem_page_alloc(sgl);
2175 struct page_alloc_chunk *chunk = NULL; 2176 struct page_alloc_chunk *chunk = NULL;
2176 2177
2177 list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { 2178 nvgpu_list_for_each_entry(chunk, &alloc->alloc_chunks,
2179 page_alloc_chunk, list_entry) {
2178 chunk_align = 1ULL << __ffs(chunk->base | chunk->length); 2180 chunk_align = 1ULL << __ffs(chunk->base | chunk->length);
2179 2181
2180 if (align) 2182 if (align)
@@ -2875,7 +2877,8 @@ static int gk20a_gmmu_clear_vidmem_mem(struct gk20a *g, struct mem_desc *mem)
2875 2877
2876 alloc = get_vidmem_page_alloc(mem->sgt->sgl); 2878 alloc = get_vidmem_page_alloc(mem->sgt->sgl);
2877 2879
2878 list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { 2880 nvgpu_list_for_each_entry(chunk, &alloc->alloc_chunks,
2881 page_alloc_chunk, list_entry) {
2879 if (gk20a_last_fence) 2882 if (gk20a_last_fence)
2880 gk20a_fence_put(gk20a_last_fence); 2883 gk20a_fence_put(gk20a_last_fence);
2881 2884
@@ -3732,8 +3735,8 @@ static int update_gmmu_ptes_locked(struct vm_gk20a *vm,
3732 if (sgt) { 3735 if (sgt) {
3733 alloc = get_vidmem_page_alloc(sgt->sgl); 3736 alloc = get_vidmem_page_alloc(sgt->sgl);
3734 3737
3735 list_for_each_entry(chunk, &alloc->alloc_chunks, 3738 nvgpu_list_for_each_entry(chunk, &alloc->alloc_chunks,
3736 list_entry) { 3739 page_alloc_chunk, list_entry) {
3737 if (space_to_skip && 3740 if (space_to_skip &&
3738 space_to_skip > chunk->length) { 3741 space_to_skip > chunk->length) {
3739 space_to_skip -= chunk->length; 3742 space_to_skip -= chunk->length;