summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/nvgpu.h85
1 files changed, 22 insertions, 63 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index b8e1e71c..9d1a5bdb 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -1461,27 +1461,6 @@ struct nvgpu_submit_gpfifo_args {
1461 struct nvgpu_fence fence; 1461 struct nvgpu_fence fence;
1462}; 1462};
1463 1463
1464struct nvgpu_map_buffer_args {
1465 __u32 flags;
1466#define NVGPU_MAP_BUFFER_FLAGS_ALIGN 0x0
1467#define NVGPU_MAP_BUFFER_FLAGS_OFFSET (1 << 0)
1468#define NVGPU_MAP_BUFFER_FLAGS_KIND_PITCH 0x0
1469#define NVGPU_MAP_BUFFER_FLAGS_KIND_SPECIFIED (1 << 1)
1470#define NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_FALSE 0x0
1471#define NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE (1 << 2)
1472 __u32 nvmap_handle;
1473 union {
1474 __u64 offset; /* valid if _offset flag given (in|out) */
1475 __u64 align; /* alignment multiple (0:={1 or n/a}) */
1476 } offset_alignment;
1477 __u32 kind;
1478#define NVGPU_MAP_BUFFER_KIND_GENERIC_16BX2 0xfe
1479};
1480
1481struct nvgpu_unmap_buffer_args {
1482 __u64 offset;
1483};
1484
1485struct nvgpu_wait_args { 1464struct nvgpu_wait_args {
1486#define NVGPU_WAIT_TYPE_NOTIFIER 0x0 1465#define NVGPU_WAIT_TYPE_NOTIFIER 0x0
1487#define NVGPU_WAIT_TYPE_SEMAPHORE 0x1 1466#define NVGPU_WAIT_TYPE_SEMAPHORE 0x1
@@ -1789,22 +1768,12 @@ struct nvgpu_as_bind_channel_args {
1789 * chosen will be returned back to the caller in the 'page_size' parameter in 1768 * chosen will be returned back to the caller in the 'page_size' parameter in
1790 * that case. 1769 * that case.
1791 */ 1770 */
1792struct nvgpu_as_map_buffer_args {
1793 __u32 flags; /* in/out */
1794#define NVGPU_AS_MAP_BUFFER_FLAGS_FIXED_OFFSET (1 << 0) 1771#define NVGPU_AS_MAP_BUFFER_FLAGS_FIXED_OFFSET (1 << 0)
1795#define NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE (1 << 2) 1772#define NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE (1 << 2)
1796#define NVGPU_AS_MAP_BUFFER_FLAGS_IO_COHERENT (1 << 4) 1773#define NVGPU_AS_MAP_BUFFER_FLAGS_IO_COHERENT (1 << 4)
1797#define NVGPU_AS_MAP_BUFFER_FLAGS_UNMAPPED_PTE (1 << 5) 1774#define NVGPU_AS_MAP_BUFFER_FLAGS_UNMAPPED_PTE (1 << 5)
1798#define NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS (1 << 6) 1775#define NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS (1 << 6)
1799#define NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL (1 << 8) 1776#define NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL (1 << 8)
1800 __u32 reserved; /* in */
1801 __u32 dmabuf_fd; /* in */
1802 __u32 page_size; /* inout, 0:= best fit to buffer */
1803 union {
1804 __u64 offset; /* inout, byte address valid iff _FIXED_OFFSET */
1805 __u64 align; /* in, alignment multiple (0:={1 or n/a}) */
1806 } o_a;
1807};
1808 1777
1809/* 1778/*
1810 * Mapping dmabuf fds into an address space: 1779 * Mapping dmabuf fds into an address space:
@@ -1816,39 +1785,29 @@ struct nvgpu_as_map_buffer_args {
1816 * returned back to the caller in the 'page_size' parameter in that case. 1785 * returned back to the caller in the 'page_size' parameter in that case.
1817 */ 1786 */
1818struct nvgpu_as_map_buffer_ex_args { 1787struct nvgpu_as_map_buffer_ex_args {
1788 /* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */
1819 __u32 flags; /* in/out */ 1789 __u32 flags; /* in/out */
1820#define NV_KIND_DEFAULT -1 1790
1821 union { 1791 /*
1822 /* 1792 * - If both compr_kind and incompr_kind are set
1823 * Used if NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL 1793 * (i.e., value is other than NV_KIND_INVALID),
1824 * is not set. 1794 * kernel attempts to use compr_kind first.
1825 */ 1795 *
1826 __s32 kind; /* in (-1 represents default) */ 1796 * - If compr_kind is set, kernel attempts to allocate
1827 1797 * comptags for the buffer. If successful,
1828 /* 1798 * compr_kind is used as the PTE kind.
1829 * If NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is 1799 *
1830 * set, this is used, instead. The rules are: 1800 * - If incompr_kind is set, kernel uses incompr_kind as the
1831 * 1801 * PTE kind, if compr_kind cannot be used. Comptags are not
1832 * - If both compr_kind and incompr_kind are set 1802 * allocated.
1833 * (i.e., value is other than NV_KIND_INVALID), 1803 *
1834 * kernel attempts to use compr_kind first. 1804 * - If neither compr_kind or incompr_kind is set, the
1835 * 1805 * map call will fail.
1836 * - If compr_kind is set, kernel attempts to allocate 1806 */
1837 * comptags for the buffer. If successful,
1838 * compr_kind is used as the PTE kind.
1839 *
1840 * - If incompr_kind is set, kernel uses incompr_kind
1841 * as the PTE kind. Comptags are not allocated.
1842 *
1843 * - If neither compr_kind or incompr_kind is set, the
1844 * map call will fail.
1845 */
1846#define NV_KIND_INVALID -1 1807#define NV_KIND_INVALID -1
1847 struct { 1808 __s16 compr_kind;
1848 __s16 compr_kind; 1809 __s16 incompr_kind;
1849 __s16 incompr_kind; 1810
1850 };
1851 };
1852 __u32 dmabuf_fd; /* in */ 1811 __u32 dmabuf_fd; /* in */
1853 __u32 page_size; /* inout, 0:= best fit to buffer */ 1812 __u32 page_size; /* inout, 0:= best fit to buffer */
1854 1813
@@ -1975,7 +1934,7 @@ struct nvgpu_as_get_va_regions_args {
1975}; 1934};
1976 1935
1977struct nvgpu_as_map_buffer_batch_args { 1936struct nvgpu_as_map_buffer_batch_args {
1978 __u64 unmaps; /* ptr to array of nvgpu_unmap_buffer_args */ 1937 __u64 unmaps; /* ptr to array of nvgpu_as_unmap_buffer_args */
1979 __u64 maps; /* ptr to array of nvgpu_as_map_buffer_ex_args */ 1938 __u64 maps; /* ptr to array of nvgpu_as_map_buffer_ex_args */
1980 __u32 num_unmaps; /* in: number of unmaps 1939 __u32 num_unmaps; /* in: number of unmaps
1981 * out: on error, number of successful unmaps */ 1940 * out: on error, number of successful unmaps */