diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 23420fef..f9c5477e 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -47,12 +47,13 @@ enum gk20a_aperture { | |||
47 | }; | 47 | }; |
48 | 48 | ||
49 | struct mem_desc { | 49 | struct mem_desc { |
50 | void *cpu_va; | 50 | void *cpu_va; /* sysmem only */ |
51 | struct page **pages; | 51 | struct page **pages; /* sysmem only */ |
52 | struct sg_table *sgt; | 52 | struct sg_table *sgt; |
53 | enum gk20a_aperture aperture; | 53 | enum gk20a_aperture aperture; |
54 | size_t size; | 54 | size_t size; |
55 | u64 gpu_va; | 55 | u64 gpu_va; |
56 | bool fixed; /* vidmem only */ | ||
56 | }; | 57 | }; |
57 | 58 | ||
58 | struct mem_desc_sub { | 59 | struct mem_desc_sub { |
@@ -371,6 +372,7 @@ struct mm_gk20a { | |||
371 | #endif | 372 | #endif |
372 | 373 | ||
373 | size_t vidmem_size; | 374 | size_t vidmem_size; |
375 | struct device vidmem_dev; | ||
374 | }; | 376 | }; |
375 | 377 | ||
376 | int gk20a_mm_init(struct mm_gk20a *mm); | 378 | int gk20a_mm_init(struct mm_gk20a *mm); |
@@ -526,6 +528,15 @@ int gk20a_gmmu_alloc_map_attr(struct vm_gk20a *vm, | |||
526 | size_t size, | 528 | size_t size, |
527 | struct mem_desc *mem); | 529 | struct mem_desc *mem); |
528 | 530 | ||
531 | int gk20a_gmmu_alloc_map_vid(struct vm_gk20a *vm, | ||
532 | size_t size, | ||
533 | struct mem_desc *mem); | ||
534 | |||
535 | int gk20a_gmmu_alloc_map_attr_vid(struct vm_gk20a *vm, | ||
536 | enum dma_attr attr, | ||
537 | size_t size, | ||
538 | struct mem_desc *mem); | ||
539 | |||
529 | void gk20a_gmmu_unmap_free(struct vm_gk20a *vm, | 540 | void gk20a_gmmu_unmap_free(struct vm_gk20a *vm, |
530 | struct mem_desc *mem); | 541 | struct mem_desc *mem); |
531 | 542 | ||
@@ -538,6 +549,26 @@ int gk20a_gmmu_alloc_attr(struct gk20a *g, | |||
538 | size_t size, | 549 | size_t size, |
539 | struct mem_desc *mem); | 550 | struct mem_desc *mem); |
540 | 551 | ||
552 | int gk20a_gmmu_alloc_attr_sys(struct gk20a *g, | ||
553 | enum dma_attr attr, | ||
554 | size_t size, | ||
555 | struct mem_desc *mem); | ||
556 | |||
557 | int gk20a_gmmu_alloc_vid(struct gk20a *g, | ||
558 | size_t size, | ||
559 | struct mem_desc *mem); | ||
560 | |||
561 | int gk20a_gmmu_alloc_attr_vid(struct gk20a *g, | ||
562 | enum dma_attr attr, | ||
563 | size_t size, | ||
564 | struct mem_desc *mem); | ||
565 | |||
566 | int gk20a_gmmu_alloc_attr_vid_at(struct gk20a *g, | ||
567 | enum dma_attr attr, | ||
568 | size_t size, | ||
569 | struct mem_desc *mem, | ||
570 | dma_addr_t at); | ||
571 | |||
541 | void gk20a_gmmu_free(struct gk20a *g, | 572 | void gk20a_gmmu_free(struct gk20a *g, |
542 | struct mem_desc *mem); | 573 | struct mem_desc *mem); |
543 | 574 | ||