Allow UM to label a BO for which it possesses a DRM handle.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -21,6 +21,7 @@ extern "C" { · 20 unmodified lines | ||
| 21 | 21 | #define DRM_PANFROST_PERFCNT_ENABLE 0x06 |
| 22 | 22 | #define DRM_PANFROST_PERFCNT_DUMP 0x07 |
| 23 | 23 | #define DRM_PANFROST_MADVISE 0x08 |
| 24 | +#define DRM_PANFROST_SET_LABEL_BO 0x09 | |
| 24 | 25 | |
| 25 | 26 | #define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit) |
| 26 | 27 | #define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo) |
| @@ -29,6 +30,7 @@ extern "C" { · 2 unmodified lines | ||
| 29 | 30 | #define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param) |
| 30 | 31 | #define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset) |
| 31 | 32 | #define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise) |
| 33 | +#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo) | |
| 32 | 34 | |
| 33 | 35 | /* |
| 34 | 36 | * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module |
| @@ -227,6 +229,25 @@ struct drm_panfrost_madvise { · 192 unmodified lines | ||
| 227 | 229 | __u32 retained; /* out, whether backing store still exists */ |
| 228 | 230 | }; |
| 229 | 231 | |
| 232 | +/** | |
| 233 | + * struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs. | |
| 234 | + */ | |
| 235 | +struct drm_panfrost_set_label_bo { | |
| 236 | + /** @handle: Handle of the buffer object to label. */ | |
| 237 | + __u32 handle; | |
| 238 | + | |
| 239 | + /** @pad: MBZ. */ | |
| 240 | + __u32 pad; | |
| 241 | + | |
| 242 | + /** | |
| 243 | + * @label: User pointer to a NUL-terminated string | |
| 244 | + * | |
| 245 | + * Length cannot be greater than 4096. | |
| 246 | + * NULL is permitted and means clear the label. | |
| 247 | + */ | |
| 248 | + __u64 label; | |
| 249 | +}; | |
| 250 | + | |
| 230 | 251 | /* Definitions for coredump decoding in user space */ |
| 231 | 252 | #define PANFROSTDUMP_MAJOR 1 |
| 232 | 253 | #define PANFROSTDUMP_MINOR 0 |