1*4d010861SVivek Kasireddy /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4d010861SVivek Kasireddy #ifndef _LINUX_UDMABUF_H 3*4d010861SVivek Kasireddy #define _LINUX_UDMABUF_H 4*4d010861SVivek Kasireddy 5*4d010861SVivek Kasireddy #include "standard-headers/linux/types.h" 6*4d010861SVivek Kasireddy 7*4d010861SVivek Kasireddy #define UDMABUF_FLAGS_CLOEXEC 0x01 8*4d010861SVivek Kasireddy 9*4d010861SVivek Kasireddy struct udmabuf_create { 10*4d010861SVivek Kasireddy uint32_t memfd; 11*4d010861SVivek Kasireddy uint32_t flags; 12*4d010861SVivek Kasireddy uint64_t offset; 13*4d010861SVivek Kasireddy uint64_t size; 14*4d010861SVivek Kasireddy }; 15*4d010861SVivek Kasireddy 16*4d010861SVivek Kasireddy struct udmabuf_create_item { 17*4d010861SVivek Kasireddy uint32_t memfd; 18*4d010861SVivek Kasireddy uint32_t __pad; 19*4d010861SVivek Kasireddy uint64_t offset; 20*4d010861SVivek Kasireddy uint64_t size; 21*4d010861SVivek Kasireddy }; 22*4d010861SVivek Kasireddy 23*4d010861SVivek Kasireddy struct udmabuf_create_list { 24*4d010861SVivek Kasireddy uint32_t flags; 25*4d010861SVivek Kasireddy uint32_t count; 26*4d010861SVivek Kasireddy struct udmabuf_create_item list[]; 27*4d010861SVivek Kasireddy }; 28*4d010861SVivek Kasireddy 29*4d010861SVivek Kasireddy #define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create) 30*4d010861SVivek Kasireddy #define UDMABUF_CREATE_LIST _IOW('u', 0x43, struct udmabuf_create_list) 31*4d010861SVivek Kasireddy 32*4d010861SVivek Kasireddy #endif /* _LINUX_UDMABUF_H */ 33