2 * include/linux/tegra_ion.h
4 * Copyright (C) 2011, NVIDIA Corporation.
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #include <linux/types.h>
18 #include <linux/ion.h>
20 #if !defined(__KERNEL__)
24 #ifndef _LINUX_TEGRA_ION_H
25 #define _LINUX_TEGRA_ION_H
27 struct tegra_ion_id_data {
28 struct ion_handle *handle;
33 struct tegra_ion_pin_data {
34 struct ion_handle **handles; /* array of handles to pin/unpin */
35 unsigned long *addr; /* array pf addresses to return */
36 unsigned long count; /* number of entries in handles */
39 /* Cache operations. */
41 TEGRA_ION_CACHE_OP_WB = 0,
42 TEGRA_ION_CACHE_OP_INV,
43 TEGRA_ION_CACHE_OP_WB_INV,
46 struct tegra_ion_cache_maint_data {
48 struct ion_handle *handle;
53 struct tegra_ion_rw_data {
54 unsigned long addr; /* user pointer*/
55 struct ion_handle *handle;
56 unsigned int offset; /* offset into handle mem */
57 unsigned int elem_size; /* individual atome size */
58 unsigned int mem_stride; /*delta in bytes between atoms in handle mem*/
59 unsigned int user_stride; /* delta in bytes between atoms in user */
60 unsigned int count; /* number of atoms to copy */
63 struct tegra_ion_get_params_data {
64 struct ion_handle *handle;
73 TEGRA_ION_ALLOC_FROM_ID = 0,
77 TEGRA_ION_CACHE_MAINT,
83 /* List of heaps in the system. */
85 TEGRA_ION_HEAP_CARVEOUT = 0,
91 #endif /* _LINUX_TEGRA_ION_H */