summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index db72ca79..53366caf 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -524,56 +524,6 @@ u64 gk20a_gmmu_fixed_map(struct vm_gk20a *vm,
524 bool priv, 524 bool priv,
525 enum nvgpu_aperture aperture); 525 enum nvgpu_aperture aperture);
526 526
527/* Flags for the below gk20a_gmmu_{alloc,alloc_map}_flags* */
528
529/*
530 * Don't create a virtual kernel mapping for the buffer but only allocate it;
531 * this may save some resources. The buffer can be mapped later explicitly.
532 */
533#define NVGPU_DMA_NO_KERNEL_MAPPING (1 << 0)
534/*
535 * Don't allow building the buffer from individual pages but require a
536 * physically contiguous block.
537 */
538#define NVGPU_DMA_FORCE_CONTIGUOUS (1 << 1)
539/*
540 * Make the mapping read-only.
541 */
542#define NVGPU_DMA_READ_ONLY (1 << 2)
543
544int gk20a_gmmu_alloc_map(struct vm_gk20a *vm, size_t size,
545 struct nvgpu_mem *mem);
546int gk20a_gmmu_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags,
547 size_t size, struct nvgpu_mem *mem);
548
549int gk20a_gmmu_alloc_map_sys(struct vm_gk20a *vm, size_t size,
550 struct nvgpu_mem *mem);
551int gk20a_gmmu_alloc_map_flags_sys(struct vm_gk20a *vm, unsigned long flags,
552 size_t size, struct nvgpu_mem *mem);
553
554int gk20a_gmmu_alloc_map_vid(struct vm_gk20a *vm, size_t size,
555 struct nvgpu_mem *mem);
556int gk20a_gmmu_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags,
557 size_t size, struct nvgpu_mem *mem);
558
559void gk20a_gmmu_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem);
560
561int gk20a_gmmu_alloc(struct gk20a *g, size_t size, struct nvgpu_mem *mem);
562int gk20a_gmmu_alloc_flags(struct gk20a *g, unsigned long flags, size_t size,
563 struct nvgpu_mem *mem);
564
565int gk20a_gmmu_alloc_sys(struct gk20a *g, size_t size, struct nvgpu_mem *mem);
566int gk20a_gmmu_alloc_flags_sys(struct gk20a *g, unsigned long flags,
567 size_t size, struct nvgpu_mem *mem);
568
569int gk20a_gmmu_alloc_vid(struct gk20a *g, size_t size, struct nvgpu_mem *mem);
570int gk20a_gmmu_alloc_flags_vid(struct gk20a *g, unsigned long flags,
571 size_t size, struct nvgpu_mem *mem);
572int gk20a_gmmu_alloc_flags_vid_at(struct gk20a *g, unsigned long flags,
573 size_t size, struct nvgpu_mem *mem, dma_addr_t at);
574
575void gk20a_gmmu_free(struct gk20a *g, struct nvgpu_mem *mem);
576
577static inline phys_addr_t gk20a_mem_phys(struct nvgpu_mem *mem) 527static inline phys_addr_t gk20a_mem_phys(struct nvgpu_mem *mem)
578{ 528{
579 /* FIXME: the sgt/sgl may get null if this is accessed e.g. in an isr 529 /* FIXME: the sgt/sgl may get null if this is accessed e.g. in an isr