History

drm/panfrost: Add driver IOCTL for setting BO labels

Allow UM to label a BO for which it possesses a DRM handle.

Adrián Larumbe committed 1 year ago

Commit 2f684bb1 parent ca8b3213 files · +66 −1Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/drm/panfrost_drm.h+21−0
@@ -21,6 +21,7 @@ extern "C" { · 20 unmodified lines
21#define DRM_PANFROST_PERFCNT_ENABLE 0x0621#define DRM_PANFROST_PERFCNT_ENABLE 0x06
22#define DRM_PANFROST_PERFCNT_DUMP 0x0722#define DRM_PANFROST_PERFCNT_DUMP 0x07
23#define DRM_PANFROST_MADVISE 0x0823#define DRM_PANFROST_MADVISE 0x08
24#define DRM_PANFROST_SET_LABEL_BO 0x09
24 25
25#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)26#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
26#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)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#define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param)30#define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param)
30#define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)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#define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise)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 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module36 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
@@ -227,6 +229,25 @@ struct drm_panfrost_madvise { · 192 unmodified lines
227 __u32 retained; /* out, whether backing store still exists */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 */
235struct 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/* Definitions for coredump decoding in user space */251/* Definitions for coredump decoding in user space */
231#define PANFROSTDUMP_MAJOR 1252#define PANFROSTDUMP_MAJOR 1
232#define PANFROSTDUMP_MINOR 0253#define PANFROSTDUMP_MINOR 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t