libxcoder 5.6.0
Loading...
Searching...
No Matches
ni_p2p_ioctl.h
Go to the documentation of this file.
1/*******************************************************************************
2 *
3 * Copyright (C) 2022 NETINT Technologies
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18 * SOFTWARE.
19 *
20 ******************************************************************************/
21
22/*!*****************************************************************************
23 * \file ni_p2p_ioctl.h
24 *
25 * \brief Definitions related to NETINT P2P kernel driver interface
26 ******************************************************************************/
27
28#ifndef _NETINT_IOCTL_H
29#define _NETINT_IOCTL_H
30
31#define NI_DMABUF_READ_FENCE (1 << 0)
32#define NI_DMABUF_SYNC_FILE_OUT_FENCE (1 << 1)
33#define NI_DMABUF_SYNC_FILE_IN_FENCE (1 << 2)
34
35#define NI_DMABUF_MAX_SGL_ENTRY 128
36
37enum
38{
41};
42
44{
45 int fd;
46 unsigned int flags;
47 int domain;
48 int bus;
49 int dev;
50 int fn;
51 int bar;
52 unsigned long offset;
53 unsigned long length;
54};
55
57 int fd;
58 unsigned int flags; // reserved for future use
59 int domain;
60 int bus;
61 int dev;
62 int fn;
63 int nents;
65#ifdef __linux__
67#else
69#endif
70};
71
73{
74 int fd;
75 unsigned int len;
76 int dir;
77 unsigned char *data;
78};
79
81{
82 int fd;
84 unsigned int flags;
85};
86
88{
89 int fd;
90};
91
92#define NETINT_IOCTL_ID _IO('N', 0x80)
93#define NETINT_IOCTL_EXPORT_DMABUF \
94 _IOWR('N', 0x81, struct netint_iocmd_export_dmabuf)
95#define NETINT_IOCTL_ATTACH_RFENCE \
96 _IOW('N', 0x82, struct netint_iocmd_attach_rfence)
97#define NETINT_IOCTL_SIGNAL_RFENCE \
98 _IOW('N', 0x83, struct netint_iocmd_signal_rfence)
99#define NETINT_IOCTL_ISSUE_REQ \
100 _IOW('N', 0x85, struct netint_iocmd_issue_request)
101#define NETINT_IOCTL_IMPORT_DMABUF \
102 _IOW('N', 0x88, struct netint_iocmd_import_dmabuf)
103#endif /* _NETINT_IOCTL_H */
#define NI_DMABUF_MAX_SGL_ENTRY
@ NI_DMABUF_WRITE_TO_DEVICE
@ NI_DMABUF_READ_FROM_DEVICE
unsigned long dma_addr[NI_DMABUF_MAX_SGL_ENTRY]
unsigned int dma_len[NI_DMABUF_MAX_SGL_ENTRY]