diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 5b1d606a..9c883a93 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -146,6 +146,9 @@ struct nvgpu_gpu_zbc_query_table_args { | |||
146 | #define NVGPU_GPU_FLAGS_SUPPORT_IO_COHERENCE (1ULL << 20) | 146 | #define NVGPU_GPU_FLAGS_SUPPORT_IO_COHERENCE (1ULL << 20) |
147 | /* NVGPU_SUBMIT_GPFIFO_FLAGS_RESCHEDULE_RUNLIST is available */ | 147 | /* NVGPU_SUBMIT_GPFIFO_FLAGS_RESCHEDULE_RUNLIST is available */ |
148 | #define NVGPU_GPU_FLAGS_SUPPORT_RESCHEDULE_RUNLIST (1ULL << 21) | 148 | #define NVGPU_GPU_FLAGS_SUPPORT_RESCHEDULE_RUNLIST (1ULL << 21) |
149 | /* Direct PTE kind control is supported (map_buffer_ex) */ | ||
150 | #define NVGPU_GPU_FLAGS_SUPPORT_MAP_DIRECT_KIND_CTRL (1ULL << 23) | ||
151 | |||
149 | 152 | ||
150 | struct nvgpu_gpu_characteristics { | 153 | struct nvgpu_gpu_characteristics { |
151 | __u32 arch; | 154 | __u32 arch; |
@@ -1751,6 +1754,7 @@ struct nvgpu_as_map_buffer_args { | |||
1751 | #define NVGPU_AS_MAP_BUFFER_FLAGS_IO_COHERENT (1 << 4) | 1754 | #define NVGPU_AS_MAP_BUFFER_FLAGS_IO_COHERENT (1 << 4) |
1752 | #define NVGPU_AS_MAP_BUFFER_FLAGS_UNMAPPED_PTE (1 << 5) | 1755 | #define NVGPU_AS_MAP_BUFFER_FLAGS_UNMAPPED_PTE (1 << 5) |
1753 | #define NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS (1 << 6) | 1756 | #define NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS (1 << 6) |
1757 | #define NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL (1 << 8) | ||
1754 | __u32 reserved; /* in */ | 1758 | __u32 reserved; /* in */ |
1755 | __u32 dmabuf_fd; /* in */ | 1759 | __u32 dmabuf_fd; /* in */ |
1756 | __u32 page_size; /* inout, 0:= best fit to buffer */ | 1760 | __u32 page_size; /* inout, 0:= best fit to buffer */ |
@@ -1760,7 +1764,7 @@ struct nvgpu_as_map_buffer_args { | |||
1760 | } o_a; | 1764 | } o_a; |
1761 | }; | 1765 | }; |
1762 | 1766 | ||
1763 | /* | 1767 | /* |
1764 | * Mapping dmabuf fds into an address space: | 1768 | * Mapping dmabuf fds into an address space: |
1765 | * | 1769 | * |
1766 | * The caller requests a mapping to a particular page 'kind'. | 1770 | * The caller requests a mapping to a particular page 'kind'. |
@@ -1772,7 +1776,37 @@ struct nvgpu_as_map_buffer_args { | |||
1772 | struct nvgpu_as_map_buffer_ex_args { | 1776 | struct nvgpu_as_map_buffer_ex_args { |
1773 | __u32 flags; /* in/out */ | 1777 | __u32 flags; /* in/out */ |
1774 | #define NV_KIND_DEFAULT -1 | 1778 | #define NV_KIND_DEFAULT -1 |
1775 | __s32 kind; /* in (-1 represents default) */ | 1779 | union { |
1780 | /* | ||
1781 | * Used if NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL | ||
1782 | * is not set. | ||
1783 | */ | ||
1784 | __s32 kind; /* in (-1 represents default) */ | ||
1785 | |||
1786 | /* | ||
1787 | * If NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is | ||
1788 | * set, this is used, instead. The rules are: | ||
1789 | * | ||
1790 | * - If both compr_kind and incompr_kind are set | ||
1791 | * (i.e., value is other than NV_KIND_INVALID), | ||
1792 | * kernel attempts to use compr_kind first. | ||
1793 | * | ||
1794 | * - If compr_kind is set, kernel attempts to allocate | ||
1795 | * comptags for the buffer. If successful, | ||
1796 | * compr_kind is used as the PTE kind. | ||
1797 | * | ||
1798 | * - If incompr_kind is set, kernel uses incompr_kind | ||
1799 | * as the PTE kind. Comptags are not allocated. | ||
1800 | * | ||
1801 | * - If neither compr_kind or incompr_kind is set, the | ||
1802 | * map call will fail. | ||
1803 | */ | ||
1804 | #define NV_KIND_INVALID -1 | ||
1805 | struct { | ||
1806 | __s16 compr_kind; | ||
1807 | __s16 incompr_kind; | ||
1808 | }; | ||
1809 | }; | ||
1776 | __u32 dmabuf_fd; /* in */ | 1810 | __u32 dmabuf_fd; /* in */ |
1777 | __u32 page_size; /* inout, 0:= best fit to buffer */ | 1811 | __u32 page_size; /* inout, 0:= best fit to buffer */ |
1778 | 1812 | ||