summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-07-06 14:52:54 +0100
committerMark Brown <broonie@kernel.org>2026-07-06 14:52:54 +0100
commitc296933a9c675fa64b64b994bd025e2554497009 (patch)
tree7040d05f7ecafaafb811bb225feec2a617accb5f /include/uapi
parent3ff8873965fdfb45ba2976b25758865c20a36358 (diff)
parentb7fcb70162acd7f15ed20bc64a14c150db34256f (diff)
downloadlinux-next-c296933a9c675fa64b64b994bd025e2554497009.tar.gz
linux-next-c296933a9c675fa64b64b994bd025e2554497009.zip
Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/misc/kernel.git
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/drm_mode.h1
-rw-r--r--include/uapi/drm/ethosu_accel.h60
-rw-r--r--include/uapi/drm/panthor_drm.h26
3 files changed, 85 insertions, 2 deletions
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 381a3e857d4e..bd435effdcee 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -155,6 +155,7 @@ extern "C" {
/* Panel type property */
#define DRM_MODE_PANEL_TYPE_UNKNOWN 0
#define DRM_MODE_PANEL_TYPE_OLED 1
+#define DRM_MODE_PANEL_TYPE_LCD 2
/*
* DRM_MODE_ROTATE_<degrees>
diff --git a/include/uapi/drm/ethosu_accel.h b/include/uapi/drm/ethosu_accel.h
index af78bb4686d7..5b97d59a7806 100644
--- a/include/uapi/drm/ethosu_accel.h
+++ b/include/uapi/drm/ethosu_accel.h
@@ -43,6 +43,11 @@ enum drm_ethosu_ioctl_id {
/** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */
DRM_ETHOSU_SUBMIT,
+
+ DRM_ETHOSU_PERFMON_CREATE,
+ DRM_ETHOSU_PERFMON_DESTROY,
+ DRM_ETHOSU_PERFMON_GET_VALUES,
+ DRM_ETHOSU_PERFMON_SET_GLOBAL,
};
/**
@@ -79,6 +84,7 @@ struct drm_ethosu_npu_info {
__u32 config;
__u32 sram_size;
+ __u32 pmu_counters;
};
/**
@@ -220,10 +226,54 @@ struct drm_ethosu_submit {
/** Input: Number of jobs passed in. */
__u32 job_count;
- /** Reserved, must be zero. */
+ /** Input: Id returned by DRM_ETHOSU_PERFMON_CREATE */
+ __u32 perfmon_id;
+};
+
+#define DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS 8
+#define DRM_ETHOSU_MAX_PERF_COUNTERS \
+ (DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS + 1)
+
+struct drm_ethosu_perfmon_create {
+ __u32 id;
+ __u32 ncounters;
+ __u16 counters[DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS];
+};
+
+struct drm_ethosu_perfmon_destroy {
+ __u32 id;
__u32 pad;
};
+/*
+ * Returns the values of the performance counters tracked by this
+ * perfmon (as an array of (ncounters + 1) u64 values).
+ *
+ * No implicit synchronization is performed, so the user has to
+ * guarantee that any jobs using this perfmon have already been
+ * completed.
+ */
+struct drm_ethosu_perfmon_get_values {
+ __u32 id;
+ __u32 pad;
+ __u64 values_ptr;
+};
+
+#define DRM_ETHOSU_PERFMON_CLEAR_GLOBAL 0x0001
+
+/**
+ * struct drm_ethosu_perfmon_set_global - ioctl to define a global performance
+ * monitor
+ *
+ * The global performance monitor will be used for all jobs. If a global
+ * performance monitor is defined, jobs with a self-defined performance
+ * monitor won't be allowed.
+ */
+struct drm_ethosu_perfmon_set_global {
+ __u32 flags;
+ __u32 id;
+};
+
/**
* DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number
* @__access: Access type. Must be R, W or RW.
@@ -252,6 +302,14 @@ enum {
DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),
DRM_IOCTL_ETHOSU_SUBMIT =
DRM_IOCTL_ETHOSU(WR, SUBMIT, submit),
+ DRM_IOCTL_ETHOSU_PERFMON_CREATE =
+ DRM_IOCTL_ETHOSU(WR, PERFMON_CREATE, perfmon_create),
+ DRM_IOCTL_ETHOSU_PERFMON_DESTROY =
+ DRM_IOCTL_ETHOSU(WR, PERFMON_DESTROY, perfmon_destroy),
+ DRM_IOCTL_ETHOSU_PERFMON_GET_VALUES =
+ DRM_IOCTL_ETHOSU(WR, PERFMON_GET_VALUES, perfmon_get_values),
+ DRM_IOCTL_ETHOSU_PERFMON_SET_GLOBAL =
+ DRM_IOCTL_ETHOSU(WR, PERFMON_SET_GLOBAL, perfmon_set_global),
};
#if defined(__cplusplus)
diff --git a/include/uapi/drm/panthor_drm.h b/include/uapi/drm/panthor_drm.h
index 0e455d91e77d..a2ff0f4ec691 100644
--- a/include/uapi/drm/panthor_drm.h
+++ b/include/uapi/drm/panthor_drm.h
@@ -253,6 +253,9 @@ enum drm_panthor_dev_query_type {
* @DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO: Query allowed group priorities information.
*/
DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,
+
+ /** @DRM_PANTHOR_DEV_QUERY_MMU_INFO: Query MMU information. */
+ DRM_PANTHOR_DEV_QUERY_MMU_INFO,
};
/**
@@ -488,6 +491,16 @@ struct drm_panthor_timestamp_info {
};
/**
+ * struct drm_panthor_mmu_info - MMU information
+ *
+ * Structure grouping all queryable information relating to the MMU.
+ */
+struct drm_panthor_mmu_info {
+ /** @page_size_bitmap: Allowed page sizes */
+ __u64 page_size_bitmap;
+};
+
+/**
* struct drm_panthor_group_priorities_info - Group priorities information
*
* Structure grouping all queryable information relating to the allowed group priorities.
@@ -602,6 +615,18 @@ enum drm_panthor_vm_bind_op_flags {
DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED = 1 << 2,
/**
+ * @DRM_PANTHOR_VM_BIND_OP_MAP_SPARSE: Sparsely map a virtual memory range
+ *
+ * Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP.
+ *
+ * When this flag is set, the whole vm_bind range is mapped over a dummy object in a cyclic
+ * fashion, and all GPU reads from addresses in the range return undefined values. This flag
+ * being set means drm_panthor_vm_bind_op::bo_offset and drm_panthor_vm_bind_op::bo_handle
+ * must both be set to 0. DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC must also be set.
+ */
+ DRM_PANTHOR_VM_BIND_OP_MAP_SPARSE = 1 << 3,
+
+ /**
* @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation.
*/
DRM_PANTHOR_VM_BIND_OP_TYPE_MASK = (int)(0xfu << 28),
@@ -664,7 +689,6 @@ struct drm_panthor_vm_bind_op {
* This array shall not be empty for sync-only operations.
*/
struct drm_panthor_obj_array syncs;
-
};
/**