diff options
Diffstat (limited to 'src/gal_extension.h')
-rw-r--r-- | src/gal_extension.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/gal_extension.h b/src/gal_extension.h index 6325444..96ac7f4 100644 --- a/src/gal_extension.h +++ b/src/gal_extension.h @@ -8,13 +8,35 @@ #include <gc_hal.h> /* Map a DMABUF fd into galcore */ -struct dmabuf_map { +struct dmabuf_map_old { unsigned zero; unsigned status; int fd; gctPOINTER Info; gctUINT32 Address; }; -#define IOC_GDMABUF_MAP _IOWR('_', 0, struct dmabuf_map) +#define IOC_GDMABUF_MAP_OLD _IOWR('_', 0, struct dmabuf_map_old) + +union gcabi_header { + uint32_t padding[16]; + struct { + uint32_t zero; + uint32_t status; + } v2; + struct { + uint32_t zero; + uint32_t hwtype; + uint32_t status; + } v4; +}; + +struct dmabuf_map { + union gcabi_header hdr; + uint64_t info; + uint64_t address; + int32_t fd; + uint32_t prot; +}; +#define IOC_GDMABUF_MAP _IOWR('_', 0, struct dmabuf_map) #endif |