diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 08fbfb80..876f3115 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -148,7 +148,8 @@ static inline void pramin_access_batched(struct gk20a *g, struct mem_desc *mem, | |||
148 | struct page_alloc_chunk *chunk = NULL; | 148 | struct page_alloc_chunk *chunk = NULL; |
149 | u32 byteoff, start_reg, until_end, n; | 149 | u32 byteoff, start_reg, until_end, n; |
150 | 150 | ||
151 | alloc = (struct gk20a_page_alloc *)sg_dma_address(mem->sgt->sgl); | 151 | alloc = (struct gk20a_page_alloc *)(uintptr_t) |
152 | sg_dma_address(mem->sgt->sgl); | ||
152 | list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { | 153 | list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { |
153 | if (offset >= chunk->length) | 154 | if (offset >= chunk->length) |
154 | offset -= chunk->length; | 155 | offset -= chunk->length; |
@@ -2191,7 +2192,7 @@ static u64 gk20a_mm_get_align(struct gk20a *g, struct scatterlist *sgl, | |||
2191 | 2192 | ||
2192 | if (aperture == APERTURE_VIDMEM) { | 2193 | if (aperture == APERTURE_VIDMEM) { |
2193 | struct gk20a_page_alloc *alloc = (struct gk20a_page_alloc *) | 2194 | struct gk20a_page_alloc *alloc = (struct gk20a_page_alloc *) |
2194 | sg_dma_address(sgl); | 2195 | (uintptr_t)sg_dma_address(sgl); |
2195 | struct page_alloc_chunk *chunk = NULL; | 2196 | struct page_alloc_chunk *chunk = NULL; |
2196 | 2197 | ||
2197 | list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { | 2198 | list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { |
@@ -2899,7 +2900,7 @@ static int gk20a_gmmu_clear_vidmem_mem(struct gk20a *g, struct mem_desc *mem) | |||
2899 | if (g->mm.vidmem.ce_ctx_id == ~0) | 2900 | if (g->mm.vidmem.ce_ctx_id == ~0) |
2900 | return -EINVAL; | 2901 | return -EINVAL; |
2901 | 2902 | ||
2902 | alloc = (struct gk20a_page_alloc *) | 2903 | alloc = (struct gk20a_page_alloc *)(uintptr_t) |
2903 | sg_dma_address(mem->sgt->sgl); | 2904 | sg_dma_address(mem->sgt->sgl); |
2904 | 2905 | ||
2905 | list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { | 2906 | list_for_each_entry(chunk, &alloc->alloc_chunks, list_entry) { |
@@ -3100,8 +3101,8 @@ u64 gk20a_mem_get_base_addr(struct gk20a *g, struct mem_desc *mem, | |||
3100 | u64 addr; | 3101 | u64 addr; |
3101 | 3102 | ||
3102 | if (mem->aperture == APERTURE_VIDMEM) { | 3103 | if (mem->aperture == APERTURE_VIDMEM) { |
3103 | alloc = (struct gk20a_page_alloc *) | 3104 | alloc = (struct gk20a_page_alloc *)(uintptr_t) |
3104 | sg_dma_address(mem->sgt->sgl); | 3105 | sg_dma_address(mem->sgt->sgl); |
3105 | 3106 | ||
3106 | /* This API should not be used with > 1 chunks */ | 3107 | /* This API should not be used with > 1 chunks */ |
3107 | WARN_ON(alloc->nr_chunks != 1); | 3108 | WARN_ON(alloc->nr_chunks != 1); |
@@ -3718,7 +3719,7 @@ static int update_gmmu_ptes_locked(struct vm_gk20a *vm, | |||
3718 | pgsz_idx, gpu_va, gpu_end-1, iova); | 3719 | pgsz_idx, gpu_va, gpu_end-1, iova); |
3719 | 3720 | ||
3720 | if (sgt) { | 3721 | if (sgt) { |
3721 | alloc = (struct gk20a_page_alloc *) | 3722 | alloc = (struct gk20a_page_alloc *)(uintptr_t) |
3722 | sg_dma_address(sgt->sgl); | 3723 | sg_dma_address(sgt->sgl); |
3723 | 3724 | ||
3724 | list_for_each_entry(chunk, &alloc->alloc_chunks, | 3725 | list_for_each_entry(chunk, &alloc->alloc_chunks, |