2 * Copyright © 2014-2015 Broadcom
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 #ifndef _UAPI_VC4_DRM_H_
25 #define _UAPI_VC4_DRM_H_
29 #define DRM_VC4_CREATE_BO 0x03
30 #define DRM_VC4_MMAP_BO 0x04
32 #define DRM_IOCTL_VC4_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo)
33 #define DRM_IOCTL_VC4_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo)
36 * struct drm_vc4_create_bo - ioctl argument for creating VC4 BOs.
38 * There are currently no values for the flags argument, but it may be
39 * used in a future extension.
41 struct drm_vc4_create_bo {
44 /** Returned GEM handle for the BO. */
50 * struct drm_vc4_mmap_bo - ioctl argument for mapping VC4 BOs.
52 * This doesn't actually perform an mmap. Instead, it returns the
53 * offset you need to use in an mmap on the DRM device node. This
54 * means that tools like valgrind end up knowing about the mapped
57 * There are currently no values for the flags argument, but it may be
58 * used in a future extension.
60 struct drm_vc4_mmap_bo {
61 /** Handle for the object being mapped. */
64 /** offset into the drm node to use for subsequent mmap call. */
68 #endif /* _UAPI_VC4_DRM_H_ */