diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 89a2108b..6c46e113 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/video/tegra/host/gk20a/mm_gk20a.h | ||
3 | * | ||
4 | * GK20A memory management | 2 | * GK20A memory management |
5 | * | 3 | * |
6 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. |
@@ -14,12 +12,11 @@ | |||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
15 | * more details. | 13 | * more details. |
16 | * | 14 | * |
17 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License |
18 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | */ | 17 | */ |
21 | #ifndef __MM_GK20A_H__ | 18 | #ifndef MM_GK20A_H |
22 | #define __MM_GK20A_H__ | 19 | #define MM_GK20A_H |
23 | 20 | ||
24 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
25 | #include <linux/dma-attrs.h> | 22 | #include <linux/dma-attrs.h> |
@@ -210,14 +207,6 @@ struct page_table_gk20a { | |||
210 | size_t size; | 207 | size_t size; |
211 | }; | 208 | }; |
212 | 209 | ||
213 | #ifndef _NVHOST_MEM_MGR_H | ||
214 | enum gk20a_mem_rw_flag { | ||
215 | gk20a_mem_flag_none = 0, | ||
216 | gk20a_mem_flag_read_only = 1, | ||
217 | gk20a_mem_flag_write_only = 2, | ||
218 | }; | ||
219 | #endif | ||
220 | |||
221 | enum gmmu_pgsz_gk20a { | 210 | enum gmmu_pgsz_gk20a { |
222 | gmmu_page_size_small = 0, | 211 | gmmu_page_size_small = 0, |
223 | gmmu_page_size_big = 1, | 212 | gmmu_page_size_big = 1, |
@@ -476,7 +465,7 @@ void gk20a_mm_unpin(struct device *dev, struct dma_buf *dmabuf, | |||
476 | u64 gk20a_vm_map(struct vm_gk20a *vm, | 465 | u64 gk20a_vm_map(struct vm_gk20a *vm, |
477 | struct dma_buf *dmabuf, | 466 | struct dma_buf *dmabuf, |
478 | u64 offset_align, | 467 | u64 offset_align, |
479 | u32 flags /*NVHOST_AS_MAP_BUFFER_FLAGS_*/, | 468 | u32 flags /*NVGPU_AS_MAP_BUFFER_FLAGS_*/, |
480 | int kind, | 469 | int kind, |
481 | struct sg_table **sgt, | 470 | struct sg_table **sgt, |
482 | bool user_mapped, | 471 | bool user_mapped, |
@@ -521,20 +510,20 @@ int gk20a_vm_free_va(struct vm_gk20a *vm, | |||
521 | enum gmmu_pgsz_gk20a pgsz_idx); | 510 | enum gmmu_pgsz_gk20a pgsz_idx); |
522 | 511 | ||
523 | /* vm-as interface */ | 512 | /* vm-as interface */ |
524 | struct nvhost_as_alloc_space_args; | 513 | struct nvgpu_as_alloc_space_args; |
525 | struct nvhost_as_free_space_args; | 514 | struct nvgpu_as_free_space_args; |
526 | int gk20a_vm_alloc_share(struct gk20a_as_share *as_share); | 515 | int gk20a_vm_alloc_share(struct gk20a_as_share *as_share); |
527 | int gk20a_vm_release_share(struct gk20a_as_share *as_share); | 516 | int gk20a_vm_release_share(struct gk20a_as_share *as_share); |
528 | int gk20a_vm_alloc_space(struct gk20a_as_share *as_share, | 517 | int gk20a_vm_alloc_space(struct gk20a_as_share *as_share, |
529 | struct nvhost_as_alloc_space_args *args); | 518 | struct nvgpu_as_alloc_space_args *args); |
530 | int gk20a_vm_free_space(struct gk20a_as_share *as_share, | 519 | int gk20a_vm_free_space(struct gk20a_as_share *as_share, |
531 | struct nvhost_as_free_space_args *args); | 520 | struct nvgpu_as_free_space_args *args); |
532 | int gk20a_vm_bind_channel(struct gk20a_as_share *as_share, | 521 | int gk20a_vm_bind_channel(struct gk20a_as_share *as_share, |
533 | struct channel_gk20a *ch); | 522 | struct channel_gk20a *ch); |
534 | int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, | 523 | int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, |
535 | int dmabuf_fd, | 524 | int dmabuf_fd, |
536 | u64 *offset_align, | 525 | u64 *offset_align, |
537 | u32 flags, /*NVHOST_AS_MAP_BUFFER_FLAGS_*/ | 526 | u32 flags, /* NVGPU_AS_MAP_BUFFER_FLAGS_ */ |
538 | int kind, | 527 | int kind, |
539 | u64 buffer_offset, | 528 | u64 buffer_offset, |
540 | u64 mapping_size); | 529 | u64 mapping_size); |
@@ -570,4 +559,4 @@ void update_gmmu_pde_locked(struct vm_gk20a *vm, u32 i); | |||
570 | 559 | ||
571 | struct gpu_ops; | 560 | struct gpu_ops; |
572 | void gk20a_init_mm(struct gpu_ops *gops); | 561 | void gk20a_init_mm(struct gpu_ops *gops); |
573 | #endif /*_MM_GK20A_H_ */ | 562 | #endif /* MM_GK20A_H */ |