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
2121 #define DRM_PANFROST_PERFCNT_ENABLE 0x06
2222 #define DRM_PANFROST_PERFCNT_DUMP 0x07
2323 #define DRM_PANFROST_MADVISE 0x08
24+#define DRM_PANFROST_SET_LABEL_BO 0x09
2425
2526 #define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
2627 #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
2930 #define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param)
3031 #define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)
3132 #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)
3234
3335 /*
3436 * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
@@ -227,6 +229,25 @@ struct drm_panfrost_madvise { · 192 unmodified lines
227229 __u32 retained; /* out, whether backing store still exists */
228230 };
229231
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+
230251 /* Definitions for coredump decoding in user space */
231252 #define PANFROSTDUMP_MAJOR 1
232253 #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