History

Merge drm/drm-next into drm-misc-next

Backmerging to get a late RC of v6.10 before moving into v6.11.

Thomas Zimmermann committed 2 years ago

Commit 0e8655b2 parents 0c3f3a8 d4ef5d22694 files · +387545 −28717Browse files

Showing the changes to include/uapi (13 of 2694 files). Show all

Unified · Split

13 files
  1. include/uapi/asm-generic/unistd.h +1 −1
  2. include/uapi/drm/amdgpu_drm.h +15 −1
  3. include/uapi/drm/drm_fourcc.h +18 −0
  4. include/uapi/drm/i915_drm.h +27 −0
  5. include/uapi/drm/msm_drm.h +1 −0
  6. include/uapi/drm/xe_drm.h +312 −0
  7. include/uapi/linux/cn_proc.h +1 −2
  8. include/uapi/linux/input-event-codes.h +2 −0
  9. include/uapi/linux/kd.h +47 −49
  10. include/uapi/linux/kfd_ioctl.h +4 −1
  11. include/uapi/linux/kfd_sysfs.h +10 −9
  12. include/uapi/linux/netdev.h +1 −0
  13. include/uapi/linux/stat.h +1 −1
include/uapi/asm-generic/unistd.h+1−1
@@ -737,7 +737,7 @@ __SC_COMP(__NR_pselect6_time64, sys_pselect6, compat_sys_pselect6_time64) · 736 unmodified lines
737737 #define __NR_ppoll_time64 414
738738 __SC_COMP(__NR_ppoll_time64, sys_ppoll, compat_sys_ppoll_time64)
739739 #define __NR_io_pgetevents_time64 416
740−__SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents)
740+__SC_COMP(__NR_io_pgetevents_time64, sys_io_pgetevents, compat_sys_io_pgetevents_time64)
741741 #define __NR_recvmmsg_time64 417
742742 __SC_COMP(__NR_recvmmsg_time64, sys_recvmmsg, compat_sys_recvmmsg_time64)
743743 #define __NR_mq_timedsend_time64 418
include/uapi/drm/amdgpu_drm.h+15−1
@@ -171,6 +171,8 @@ extern "C" { · 170 unmodified lines
171171 * may override the MTYPE selected in AMDGPU_VA_OP_MAP.
172172 */
173173 #define AMDGPU_GEM_CREATE_EXT_COHERENT (1 << 15)
174+/* Set PTE.D and recompress during GTT->VRAM moves according to TILING flags. */
175+#define AMDGPU_GEM_CREATE_GFX12_DCC (1 << 16)
174176
175177 struct drm_amdgpu_gem_create_in {
176178 /** the requested memory size */
@@ -392,7 +394,7 @@ struct drm_amdgpu_gem_userptr { · 215 unmodified lines
392394 #define AMDGPU_TILING_NUM_BANKS_SHIFT 21
393395 #define AMDGPU_TILING_NUM_BANKS_MASK 0x3
394396
395−/* GFX9 and later: */
397+/* GFX9 - GFX11: */
396398 #define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0
397399 #define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f
398400 #define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT 5
@@ -406,6 +408,17 @@ struct drm_amdgpu_gem_userptr { · 7 unmodified lines
406408 #define AMDGPU_TILING_SCANOUT_SHIFT 63
407409 #define AMDGPU_TILING_SCANOUT_MASK 0x1
408410
411+/* GFX12 and later: */
412+#define AMDGPU_TILING_GFX12_SWIZZLE_MODE_SHIFT 0
413+#define AMDGPU_TILING_GFX12_SWIZZLE_MODE_MASK 0x7
414+/* These are DCC recompression setting for memory management: */
415+#define AMDGPU_TILING_GFX12_DCC_MAX_COMPRESSED_BLOCK_SHIFT 3
416+#define AMDGPU_TILING_GFX12_DCC_MAX_COMPRESSED_BLOCK_MASK 0x3 /* 0:64B, 1:128B, 2:256B */
417+#define AMDGPU_TILING_GFX12_DCC_NUMBER_TYPE_SHIFT 5
418+#define AMDGPU_TILING_GFX12_DCC_NUMBER_TYPE_MASK 0x7 /* CB_COLOR0_INFO.NUMBER_TYPE */
419+#define AMDGPU_TILING_GFX12_DCC_DATA_FORMAT_SHIFT 8
420+#define AMDGPU_TILING_GFX12_DCC_DATA_FORMAT_MASK 0x3f /* [0:4]:CB_COLOR0_INFO.FORMAT, [5]:MM */
421+
409422 /* Set/Get helpers for tiling flags. */
410423 #define AMDGPU_TILING_SET(field, value) \
411424 (((__u64)(value) & AMDGPU_TILING_##field##_MASK) << AMDGPU_TILING_##field##_SHIFT)
@@ -1268,6 +1281,7 @@ struct drm_amdgpu_info_gpuvm_fault { · 856 unmodified lines
12681281 #define AMDGPU_FAMILY_GC_10_3_6 149 /* GC 10.3.6 */
12691282 #define AMDGPU_FAMILY_GC_10_3_7 151 /* GC 10.3.7 */
12701283 #define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */
1284+#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
12711285
12721286 /* FIXME wrong namespace! */
12731287 struct drm_color_ctm_3x4 {
include/uapi/drm/drm_fourcc.h+18−0
@@ -1476,6 +1476,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 1475 unmodified lines
14761476 #define AMD_FMT_MOD_TILE_VER_GFX10 2
14771477 #define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 3
14781478 #define AMD_FMT_MOD_TILE_VER_GFX11 4
1479+#define AMD_FMT_MOD_TILE_VER_GFX12 5
14791480
14801481 /*
14811482 * 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical
@@ -1486,6 +1487,8 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 4 unmodified lines
14861487 /*
14871488 * 64K_D for non-32 bpp is the same for GFX9/GFX10/GFX10_RBPLUS and hence has
14881489 * GFX9 as canonical version.
1490+ *
1491+ * 64K_D_2D on GFX12 is identical to 64K_D on GFX11.
14891492 */
14901493 #define AMD_FMT_MOD_TILE_GFX9_64K_D 10
14911494 #define AMD_FMT_MOD_TILE_GFX9_64K_S_X 25
@@ -1493,6 +1496,21 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 1 unmodified line
14931496 #define AMD_FMT_MOD_TILE_GFX9_64K_R_X 27
14941497 #define AMD_FMT_MOD_TILE_GFX11_256K_R_X 31
14951498
1499+/* Gfx12 swizzle modes:
1500+ * 0 - LINEAR
1501+ * 1 - 256B_2D - 2D block dimensions
1502+ * 2 - 4KB_2D
1503+ * 3 - 64KB_2D
1504+ * 4 - 256KB_2D
1505+ * 5 - 4KB_3D - 3D block dimensions
1506+ * 6 - 64KB_3D
1507+ * 7 - 256KB_3D
1508+ */
1509+#define AMD_FMT_MOD_TILE_GFX12_256B_2D 1
1510+#define AMD_FMT_MOD_TILE_GFX12_4K_2D 2
1511+#define AMD_FMT_MOD_TILE_GFX12_64K_2D 3
1512+#define AMD_FMT_MOD_TILE_GFX12_256K_2D 4
1513+
14961514 #define AMD_FMT_MOD_DCC_BLOCK_64B 0
14971515 #define AMD_FMT_MOD_DCC_BLOCK_128B 1
14981516 #define AMD_FMT_MOD_DCC_BLOCK_256B 2
include/uapi/drm/i915_drm.h+27−0
@@ -2163,6 +2163,15 @@ struct drm_i915_gem_context_param { · 2162 unmodified lines
21632163 * supports this per context flag.
21642164 */
21652165 #define I915_CONTEXT_PARAM_LOW_LATENCY 0xe
2166+
2167+/*
2168+ * I915_CONTEXT_PARAM_CONTEXT_IMAGE:
2169+ *
2170+ * Allows userspace to provide own context images.
2171+ *
2172+ * Note that this is a debug API not available on production kernel builds.
2173+ */
2174+#define I915_CONTEXT_PARAM_CONTEXT_IMAGE 0xf
21662175 /* Must be kept compact -- no holes and well documented */
21672176
21682177 /** @value: Context parameter value to be set or queried */
@@ -2564,6 +2573,24 @@ struct i915_context_param_engines { · 395 unmodified lines
25642573 struct i915_engine_class_instance engines[N__]; \
25652574 } __attribute__((packed)) name__
25662575
2576+struct i915_gem_context_param_context_image {
2577+ /** @engine: Engine class & instance to be configured. */
2578+ struct i915_engine_class_instance engine;
2579+
2580+ /** @flags: One of the supported flags or zero. */
2581+ __u32 flags;
2582+#define I915_CONTEXT_IMAGE_FLAG_ENGINE_INDEX (1u << 0)
2583+
2584+ /** @size: Size of the image blob pointed to by @image. */
2585+ __u32 size;
2586+
2587+ /** @mbz: Must be zero. */
2588+ __u32 mbz;
2589+
2590+ /** @image: Userspace memory containing the context image. */
2591+ __u64 image;
2592+} __attribute__((packed));
2593+
25672594 /**
25682595 * struct drm_i915_gem_context_create_ext_setparam - Context parameter
25692596 * to set or query during context creation.
include/uapi/drm/msm_drm.h+1−0
@@ -87,6 +87,7 @@ struct drm_msm_timespec { · 86 unmodified lines
8787 #define MSM_PARAM_VA_START 0x0e /* RO: start of valid GPU iova range */
8888 #define MSM_PARAM_VA_SIZE 0x0f /* RO: size of valid GPU iova range (bytes) */
8989 #define MSM_PARAM_HIGHEST_BANK_BIT 0x10 /* RO */
90+#define MSM_PARAM_RAYTRACING 0x11 /* RO */
9091
9192 /* For backwards compat. The original support for preemption was based on
9293 * a single ring per priority level so # of priority levels equals the #
include/uapi/drm/xe_drm.h+312−0
@@ -80,6 +80,7 @@ extern "C" { · 79 unmodified lines
8080 * - &DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY
8181 * - &DRM_IOCTL_XE_EXEC
8282 * - &DRM_IOCTL_XE_WAIT_USER_FENCE
83+ * - &DRM_IOCTL_XE_OBSERVATION
8384 */
8485
8586 /*
@@ -100,6 +101,8 @@ extern "C" { · 14 unmodified lines
100101 #define DRM_XE_EXEC_QUEUE_GET_PROPERTY 0x08
101102 #define DRM_XE_EXEC 0x09
102103 #define DRM_XE_WAIT_USER_FENCE 0x0a
104+#define DRM_XE_OBSERVATION 0x0b
105+
103106 /* Must be kept compact -- no holes */
104107
105108 #define DRM_IOCTL_XE_DEVICE_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_DEVICE_QUERY, struct drm_xe_device_query)
@@ -113,6 +116,7 @@ extern "C" { · 7 unmodified lines
113116 #define DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_GET_PROPERTY, struct drm_xe_exec_queue_get_property)
114117 #define DRM_IOCTL_XE_EXEC DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec)
115118 #define DRM_IOCTL_XE_WAIT_USER_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence)
119+#define DRM_IOCTL_XE_OBSERVATION DRM_IOW(DRM_COMMAND_BASE + DRM_XE_OBSERVATION, struct drm_xe_observation_param)
116120
117121 /**
118122 * DOC: Xe IOCTL Extensions
@@ -508,6 +512,7 @@ struct drm_xe_query_gt_list { · 389 unmodified lines
508512 * containing the following in mask:
509513 * ``DSS_COMPUTE ff ff ff ff 00 00 00 00``
510514 * means 32 DSS are available for compute.
515+ * - %DRM_XE_TOPO_L3_BANK - To query the mask of enabled L3 banks
511516 * - %DRM_XE_TOPO_EU_PER_DSS - To query the mask of Execution Units (EU)
512517 * available per Dual Sub Slices (DSS). For example a query response
513518 * containing the following in mask:
@@ -520,6 +525,7 @@ struct drm_xe_query_topology_mask { · 6 unmodified lines
520525
521526 #define DRM_XE_TOPO_DSS_GEOMETRY 1
522527 #define DRM_XE_TOPO_DSS_COMPUTE 2
528+#define DRM_XE_TOPO_L3_BANK 3
523529 #define DRM_XE_TOPO_EU_PER_DSS 4
524530 /** @type: type of mask */
525531 __u16 type;
@@ -683,6 +689,7 @@ struct drm_xe_device_query { · 157 unmodified lines
683689 #define DRM_XE_DEVICE_QUERY_GT_TOPOLOGY 5
684690 #define DRM_XE_DEVICE_QUERY_ENGINE_CYCLES 6
685691 #define DRM_XE_DEVICE_QUERY_UC_FW_VERSION 7
692+#define DRM_XE_DEVICE_QUERY_OA_UNITS 8
686693 /** @query: The type of data to query */
687694 __u32 query;
688695
@@ -1368,6 +1375,311 @@ struct drm_xe_wait_user_fence { · 679 unmodified lines
13681375 __u64 reserved[2];
13691376 };
13701377
1378+/**
1379+ * enum drm_xe_observation_type - Observation stream types
1380+ */
1381+enum drm_xe_observation_type {
1382+ /** @DRM_XE_OBSERVATION_TYPE_OA: OA observation stream type */
1383+ DRM_XE_OBSERVATION_TYPE_OA,
1384+};
1385+
1386+/**
1387+ * enum drm_xe_observation_op - Observation stream ops
1388+ */
1389+enum drm_xe_observation_op {
1390+ /** @DRM_XE_OBSERVATION_OP_STREAM_OPEN: Open an observation stream */
1391+ DRM_XE_OBSERVATION_OP_STREAM_OPEN,
1392+
1393+ /** @DRM_XE_OBSERVATION_OP_ADD_CONFIG: Add observation stream config */
1394+ DRM_XE_OBSERVATION_OP_ADD_CONFIG,
1395+
1396+ /** @DRM_XE_OBSERVATION_OP_REMOVE_CONFIG: Remove observation stream config */
1397+ DRM_XE_OBSERVATION_OP_REMOVE_CONFIG,
1398+};
1399+
1400+/**
1401+ * struct drm_xe_observation_param - Input of &DRM_XE_OBSERVATION
1402+ *
1403+ * The observation layer enables multiplexing observation streams of
1404+ * multiple types. The actual params for a particular stream operation are
1405+ * supplied via the @param pointer (use __copy_from_user to get these
1406+ * params).
1407+ */
1408+struct drm_xe_observation_param {
1409+ /** @extensions: Pointer to the first extension struct, if any */
1410+ __u64 extensions;
1411+ /** @observation_type: observation stream type, of enum @drm_xe_observation_type */
1412+ __u64 observation_type;
1413+ /** @observation_op: observation stream op, of enum @drm_xe_observation_op */
1414+ __u64 observation_op;
1415+ /** @param: Pointer to actual stream params */
1416+ __u64 param;
1417+};
1418+
1419+/**
1420+ * enum drm_xe_observation_ioctls - Observation stream fd ioctl's
1421+ *
1422+ * Information exchanged between userspace and kernel for observation fd
1423+ * ioctl's is stream type specific
1424+ */
1425+enum drm_xe_observation_ioctls {
1426+ /** @DRM_XE_OBSERVATION_IOCTL_ENABLE: Enable data capture for an observation stream */
1427+ DRM_XE_OBSERVATION_IOCTL_ENABLE = _IO('i', 0x0),
1428+
1429+ /** @DRM_XE_OBSERVATION_IOCTL_DISABLE: Disable data capture for a observation stream */
1430+ DRM_XE_OBSERVATION_IOCTL_DISABLE = _IO('i', 0x1),
1431+
1432+ /** @DRM_XE_OBSERVATION_IOCTL_CONFIG: Change observation stream configuration */
1433+ DRM_XE_OBSERVATION_IOCTL_CONFIG = _IO('i', 0x2),
1434+
1435+ /** @DRM_XE_OBSERVATION_IOCTL_STATUS: Return observation stream status */
1436+ DRM_XE_OBSERVATION_IOCTL_STATUS = _IO('i', 0x3),
1437+
1438+ /** @DRM_XE_OBSERVATION_IOCTL_INFO: Return observation stream info */
1439+ DRM_XE_OBSERVATION_IOCTL_INFO = _IO('i', 0x4),
1440+};
1441+
1442+/**
1443+ * enum drm_xe_oa_unit_type - OA unit types
1444+ */
1445+enum drm_xe_oa_unit_type {
1446+ /**
1447+ * @DRM_XE_OA_UNIT_TYPE_OAG: OAG OA unit. OAR/OAC are considered
1448+ * sub-types of OAG. For OAR/OAC, use OAG.
1449+ */
1450+ DRM_XE_OA_UNIT_TYPE_OAG,
1451+
1452+ /** @DRM_XE_OA_UNIT_TYPE_OAM: OAM OA unit */
1453+ DRM_XE_OA_UNIT_TYPE_OAM,
1454+};
1455+
1456+/**
1457+ * struct drm_xe_oa_unit - describe OA unit
1458+ */
1459+struct drm_xe_oa_unit {
1460+ /** @extensions: Pointer to the first extension struct, if any */
1461+ __u64 extensions;
1462+
1463+ /** @oa_unit_id: OA unit ID */
1464+ __u32 oa_unit_id;
1465+
1466+ /** @oa_unit_type: OA unit type of @drm_xe_oa_unit_type */
1467+ __u32 oa_unit_type;
1468+
1469+ /** @capabilities: OA capabilities bit-mask */
1470+ __u64 capabilities;
1471+#define DRM_XE_OA_CAPS_BASE (1 << 0)
1472+
1473+ /** @oa_timestamp_freq: OA timestamp freq */
1474+ __u64 oa_timestamp_freq;
1475+
1476+ /** @reserved: MBZ */
1477+ __u64 reserved[4];
1478+
1479+ /** @num_engines: number of engines in @eci array */
1480+ __u64 num_engines;
1481+
1482+ /** @eci: engines attached to this OA unit */
1483+ struct drm_xe_engine_class_instance eci[];
1484+};
1485+
1486+/**
1487+ * struct drm_xe_query_oa_units - describe OA units
1488+ *
1489+ * If a query is made with a struct drm_xe_device_query where .query
1490+ * is equal to DRM_XE_DEVICE_QUERY_OA_UNITS, then the reply uses struct
1491+ * drm_xe_query_oa_units in .data.
1492+ *
1493+ * OA unit properties for all OA units can be accessed using a code block
1494+ * such as the one below:
1495+ *
1496+ * .. code-block:: C
1497+ *
1498+ * struct drm_xe_query_oa_units *qoa;
1499+ * struct drm_xe_oa_unit *oau;
1500+ * u8 *poau;
1501+ *
1502+ * // malloc qoa and issue DRM_XE_DEVICE_QUERY_OA_UNITS. Then:
1503+ * poau = (u8 *)&qoa->oa_units[0];
1504+ * for (int i = 0; i < qoa->num_oa_units; i++) {
1505+ * oau = (struct drm_xe_oa_unit *)poau;
1506+ * // Access 'struct drm_xe_oa_unit' fields here
1507+ * poau += sizeof(*oau) + oau->num_engines * sizeof(oau->eci[0]);
1508+ * }
1509+ */
1510+struct drm_xe_query_oa_units {
1511+ /** @extensions: Pointer to the first extension struct, if any */
1512+ __u64 extensions;
1513+ /** @num_oa_units: number of OA units returned in oau[] */
1514+ __u32 num_oa_units;
1515+ /** @pad: MBZ */
1516+ __u32 pad;
1517+ /**
1518+ * @oa_units: struct @drm_xe_oa_unit array returned for this device.
1519+ * Written below as a u64 array to avoid problems with nested flexible
1520+ * arrays with some compilers
1521+ */
1522+ __u64 oa_units[];
1523+};
1524+
1525+/**
1526+ * enum drm_xe_oa_format_type - OA format types as specified in PRM/Bspec
1527+ * 52198/60942
1528+ */
1529+enum drm_xe_oa_format_type {
1530+ /** @DRM_XE_OA_FMT_TYPE_OAG: OAG report format */
1531+ DRM_XE_OA_FMT_TYPE_OAG,
1532+ /** @DRM_XE_OA_FMT_TYPE_OAR: OAR report format */
1533+ DRM_XE_OA_FMT_TYPE_OAR,
1534+ /** @DRM_XE_OA_FMT_TYPE_OAM: OAM report format */
1535+ DRM_XE_OA_FMT_TYPE_OAM,
1536+ /** @DRM_XE_OA_FMT_TYPE_OAC: OAC report format */
1537+ DRM_XE_OA_FMT_TYPE_OAC,
1538+ /** @DRM_XE_OA_FMT_TYPE_OAM_MPEC: OAM SAMEDIA or OAM MPEC report format */
1539+ DRM_XE_OA_FMT_TYPE_OAM_MPEC,
1540+ /** @DRM_XE_OA_FMT_TYPE_PEC: PEC report format */
1541+ DRM_XE_OA_FMT_TYPE_PEC,
1542+};
1543+
1544+/**
1545+ * enum drm_xe_oa_property_id - OA stream property id's
1546+ *
1547+ * Stream params are specified as a chain of @drm_xe_ext_set_property
1548+ * struct's, with @property values from enum @drm_xe_oa_property_id and
1549+ * @drm_xe_user_extension base.name set to @DRM_XE_OA_EXTENSION_SET_PROPERTY.
1550+ * @param field in struct @drm_xe_observation_param points to the first
1551+ * @drm_xe_ext_set_property struct.
1552+ *
1553+ * Exactly the same mechanism is also used for stream reconfiguration using the
1554+ * @DRM_XE_OBSERVATION_IOCTL_CONFIG observation stream fd ioctl, though only a
1555+ * subset of properties below can be specified for stream reconfiguration.
1556+ */
1557+enum drm_xe_oa_property_id {
1558+#define DRM_XE_OA_EXTENSION_SET_PROPERTY 0
1559+ /**
1560+ * @DRM_XE_OA_PROPERTY_OA_UNIT_ID: ID of the OA unit on which to open
1561+ * the OA stream, see @oa_unit_id in 'struct
1562+ * drm_xe_query_oa_units'. Defaults to 0 if not provided.
1563+ */
1564+ DRM_XE_OA_PROPERTY_OA_UNIT_ID = 1,
1565+
1566+ /**
1567+ * @DRM_XE_OA_PROPERTY_SAMPLE_OA: A value of 1 requests inclusion of raw
1568+ * OA unit reports or stream samples in a global buffer attached to an
1569+ * OA unit.
1570+ */
1571+ DRM_XE_OA_PROPERTY_SAMPLE_OA,
1572+
1573+ /**
1574+ * @DRM_XE_OA_PROPERTY_OA_METRIC_SET: OA metrics defining contents of OA
1575+ * reports, previously added via @DRM_XE_OBSERVATION_OP_ADD_CONFIG.
1576+ */
1577+ DRM_XE_OA_PROPERTY_OA_METRIC_SET,
1578+
1579+ /** @DRM_XE_OA_PROPERTY_OA_FORMAT: OA counter report format */
1580+ DRM_XE_OA_PROPERTY_OA_FORMAT,
1581+ /*
1582+ * OA_FORMAT's are specified the same way as in PRM/Bspec 52198/60942,
1583+ * in terms of the following quantities: a. enum @drm_xe_oa_format_type
1584+ * b. Counter select c. Counter size and d. BC report. Also refer to the
1585+ * oa_formats array in drivers/gpu/drm/xe/xe_oa.c.
1586+ */
1587+#define DRM_XE_OA_FORMAT_MASK_FMT_TYPE (0xff << 0)
1588+#define DRM_XE_OA_FORMAT_MASK_COUNTER_SEL (0xff << 8)
1589+#define DRM_XE_OA_FORMAT_MASK_COUNTER_SIZE (0xff << 16)
1590+#define DRM_XE_OA_FORMAT_MASK_BC_REPORT (0xff << 24)
1591+
1592+ /**
1593+ * @DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT: Requests periodic OA unit
1594+ * sampling with sampling frequency proportional to 2^(period_exponent + 1)
1595+ */
1596+ DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT,
1597+
1598+ /**
1599+ * @DRM_XE_OA_PROPERTY_OA_DISABLED: A value of 1 will open the OA
1600+ * stream in a DISABLED state (see @DRM_XE_OBSERVATION_IOCTL_ENABLE).
1601+ */
1602+ DRM_XE_OA_PROPERTY_OA_DISABLED,
1603+
1604+ /**
1605+ * @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID: Open the stream for a specific
1606+ * @exec_queue_id. OA queries can be executed on this exec queue.
1607+ */
1608+ DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID,
1609+
1610+ /**
1611+ * @DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE: Optional engine instance to
1612+ * pass along with @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
1613+ */
1614+ DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE,
1615+
1616+ /**
1617+ * @DRM_XE_OA_PROPERTY_NO_PREEMPT: Allow preemption and timeslicing
1618+ * to be disabled for the stream exec queue.
1619+ */
1620+ DRM_XE_OA_PROPERTY_NO_PREEMPT,
1621+};
1622+
1623+/**
1624+ * struct drm_xe_oa_config - OA metric configuration
1625+ *
1626+ * Multiple OA configs can be added using @DRM_XE_OBSERVATION_OP_ADD_CONFIG. A
1627+ * particular config can be specified when opening an OA stream using
1628+ * @DRM_XE_OA_PROPERTY_OA_METRIC_SET property.
1629+ */
1630+struct drm_xe_oa_config {
1631+ /** @extensions: Pointer to the first extension struct, if any */
1632+ __u64 extensions;
1633+
1634+ /** @uuid: String formatted like "%\08x-%\04x-%\04x-%\04x-%\012x" */
1635+ char uuid[36];
1636+
1637+ /** @n_regs: Number of regs in @regs_ptr */
1638+ __u32 n_regs;
1639+
1640+ /**
1641+ * @regs_ptr: Pointer to (register address, value) pairs for OA config
1642+ * registers. Expected length of buffer is: (2 * sizeof(u32) * @n_regs).
1643+ */
1644+ __u64 regs_ptr;
1645+};
1646+
1647+/**
1648+ * struct drm_xe_oa_stream_status - OA stream status returned from
1649+ * @DRM_XE_OBSERVATION_IOCTL_STATUS observation stream fd ioctl. Userspace can
1650+ * call the ioctl to query stream status in response to EIO errno from
1651+ * observation fd read().
1652+ */
1653+struct drm_xe_oa_stream_status {
1654+ /** @extensions: Pointer to the first extension struct, if any */
1655+ __u64 extensions;
1656+
1657+ /** @oa_status: OA stream status (see Bspec 46717/61226) */
1658+ __u64 oa_status;
1659+#define DRM_XE_OASTATUS_MMIO_TRG_Q_FULL (1 << 3)
1660+#define DRM_XE_OASTATUS_COUNTER_OVERFLOW (1 << 2)
1661+#define DRM_XE_OASTATUS_BUFFER_OVERFLOW (1 << 1)
1662+#define DRM_XE_OASTATUS_REPORT_LOST (1 << 0)
1663+
1664+ /** @reserved: reserved for future use */
1665+ __u64 reserved[3];
1666+};
1667+
1668+/**
1669+ * struct drm_xe_oa_stream_info - OA stream info returned from
1670+ * @DRM_XE_OBSERVATION_IOCTL_INFO observation stream fd ioctl
1671+ */
1672+struct drm_xe_oa_stream_info {
1673+ /** @extensions: Pointer to the first extension struct, if any */
1674+ __u64 extensions;
1675+
1676+ /** @oa_buf_size: OA buffer size */
1677+ __u64 oa_buf_size;
1678+
1679+ /** @reserved: reserved for future use */
1680+ __u64 reserved[3];
1681+};
1682+
13711683 #if defined(__cplusplus)
13721684 }
13731685 #endif
include/uapi/linux/cn_proc.h+1−2
@@ -69,8 +69,7 @@ struct proc_input { · 68 unmodified lines
6969
7070 static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type)
7171 {
72− ev_type &= PROC_EVENT_ALL;
73− return ev_type;
72+ return (enum proc_cn_event)(ev_type & PROC_EVENT_ALL);
7473 }
7574
7675 /*
include/uapi/linux/input-event-codes.h+2−0
@@ -618,6 +618,8 @@ · 617 unmodified lines
618618 #define KEY_CAMERA_ACCESS_ENABLE 0x24b /* Enables programmatic access to camera devices. (HUTRR72) */
619619 #define KEY_CAMERA_ACCESS_DISABLE 0x24c /* Disables programmatic access to camera devices. (HUTRR72) */
620620 #define KEY_CAMERA_ACCESS_TOGGLE 0x24d /* Toggles the current state of the camera access control. (HUTRR72) */
621+#define KEY_ACCESSIBILITY 0x24e /* Toggles the system bound accessibility UI/command (HUTRR116) */
622+#define KEY_DO_NOT_DISTURB 0x24f /* Toggles the system-wide "Do Not Disturb" control (HUTRR94)*/
621623
622624 #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */
623625 #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */
include/uapi/linux/kd.h+47−49
@@ -5,61 +5,60 @@ · 4 unmodified lines
55 #include <linux/compiler.h>
66
77 /* 0x4B is 'K', to avoid collision with termios and vt */
8−#define KD_IOCTL_BASE 'K'
98
10−#define GIO_FONT _IO(KD_IOCTL_BASE, 0x60) /* gets font in expanded form */
11−#define PIO_FONT _IO(KD_IOCTL_BASE, 0x61) /* use font in expanded form */
9+#define GIO_FONT 0x4B60 /* gets font in expanded form */
10+#define PIO_FONT 0x4B61 /* use font in expanded form */
1211
13−#define GIO_FONTX _IO(KD_IOCTL_BASE, 0x6B) /* get font using struct consolefontdesc */
14−#define PIO_FONTX _IO(KD_IOCTL_BASE, 0x6C) /* set font using struct consolefontdesc */
12+#define GIO_FONTX 0x4B6B /* get font using struct consolefontdesc */
13+#define PIO_FONTX 0x4B6C /* set font using struct consolefontdesc */
1514 struct consolefontdesc {
1615 unsigned short charcount; /* characters in font (256 or 512) */
1716 unsigned short charheight; /* scan lines per character (1-32) */
1817 char __user *chardata; /* font data in expanded form */
1918 };
2019
21−#define PIO_FONTRESET _IO(KD_IOCTL_BASE, 0x6D) /* reset to default font */
20+#define PIO_FONTRESET 0x4B6D /* reset to default font */
2221
23−#define GIO_CMAP _IO(KD_IOCTL_BASE, 0x70) /* gets colour palette on VGA+ */
24−#define PIO_CMAP _IO(KD_IOCTL_BASE, 0x71) /* sets colour palette on VGA+ */
22+#define GIO_CMAP 0x4B70 /* gets colour palette on VGA+ */
23+#define PIO_CMAP 0x4B71 /* sets colour palette on VGA+ */
2524
26−#define KIOCSOUND _IO(KD_IOCTL_BASE, 0x2F) /* start sound generation (0 for off) */
27−#define KDMKTONE _IO(KD_IOCTL_BASE, 0x30) /* generate tone */
25+#define KIOCSOUND 0x4B2F /* start sound generation (0 for off) */
26+#define KDMKTONE 0x4B30 /* generate tone */
2827
29−#define KDGETLED _IO(KD_IOCTL_BASE, 0x31) /* return current led state */
30−#define KDSETLED _IO(KD_IOCTL_BASE, 0x32) /* set led state [lights, not flags] */
28+#define KDGETLED 0x4B31 /* return current led state */
29+#define KDSETLED 0x4B32 /* set led state [lights, not flags] */
3130 #define LED_SCR 0x01 /* scroll lock led */
3231 #define LED_NUM 0x02 /* num lock led */
3332 #define LED_CAP 0x04 /* caps lock led */
3433
35−#define KDGKBTYPE _IO(KD_IOCTL_BASE, 0x33) /* get keyboard type */
34+#define KDGKBTYPE 0x4B33 /* get keyboard type */
3635 #define KB_84 0x01
3736 #define KB_101 0x02 /* this is what we always answer */
3837 #define KB_OTHER 0x03
3938
40−#define KDADDIO _IO(KD_IOCTL_BASE, 0x34) /* add i/o port as valid */
41−#define KDDELIO _IO(KD_IOCTL_BASE, 0x35) /* del i/o port as valid */
42−#define KDENABIO _IO(KD_IOCTL_BASE, 0x36) /* enable i/o to video board */
43−#define KDDISABIO _IO(KD_IOCTL_BASE, 0x37) /* disable i/o to video board */
39+#define KDADDIO 0x4B34 /* add i/o port as valid */
40+#define KDDELIO 0x4B35 /* del i/o port as valid */
41+#define KDENABIO 0x4B36 /* enable i/o to video board */
42+#define KDDISABIO 0x4B37 /* disable i/o to video board */
4443
45−#define KDSETMODE _IO(KD_IOCTL_BASE, 0x3A) /* set text/graphics mode */
44+#define KDSETMODE 0x4B3A /* set text/graphics mode */
4645 #define KD_TEXT 0x00
4746 #define KD_GRAPHICS 0x01
4847 #define KD_TEXT0 0x02 /* obsolete */
4948 #define KD_TEXT1 0x03 /* obsolete */
50−#define KDGETMODE _IO(KD_IOCTL_BASE, 0x3B) /* get current mode */
49+#define KDGETMODE 0x4B3B /* get current mode */
5150
52−#define KDMAPDISP _IO(KD_IOCTL_BASE, 0x3C) /* map display into address space */
53−#define KDUNMAPDISP _IO(KD_IOCTL_BASE, 0x3D) /* unmap display from address space */
51+#define KDMAPDISP 0x4B3C /* map display into address space */
52+#define KDUNMAPDISP 0x4B3D /* unmap display from address space */
5453
5554 typedef char scrnmap_t;
5655 #define E_TABSZ 256
57−#define GIO_SCRNMAP _IO(KD_IOCTL_BASE, 0x40) /* get screen mapping from kernel */
58−#define PIO_SCRNMAP _IO(KD_IOCTL_BASE, 0x41) /* put screen mapping table in kernel */
59−#define GIO_UNISCRNMAP _IO(KD_IOCTL_BASE, 0x69) /* get full Unicode screen mapping */
60−#define PIO_UNISCRNMAP _IO(KD_IOCTL_BASE, 0x6A) /* set full Unicode screen mapping */
56+#define GIO_SCRNMAP 0x4B40 /* get screen mapping from kernel */
57+#define PIO_SCRNMAP 0x4B41 /* put screen mapping table in kernel */
58+#define GIO_UNISCRNMAP 0x4B69 /* get full Unicode screen mapping */
59+#define PIO_UNISCRNMAP 0x4B6A /* set full Unicode screen mapping */
6160
62−#define GIO_UNIMAP _IO(KD_IOCTL_BASE, 0x66) /* get unicode-to-font mapping from kernel */
61+#define GIO_UNIMAP 0x4B66 /* get unicode-to-font mapping from kernel */
6362 struct unipair {
6463 unsigned short unicode;
6564 unsigned short fontpos;
@@ -68,8 +67,8 @@ struct unimapdesc { · 2 unmodified lines
6867 unsigned short entry_ct;
6968 struct unipair __user *entries;
7069 };
71−#define PIO_UNIMAP _IO(KD_IOCTL_BASE, 0x67) /* put unicode-to-font mapping in kernel */
72−#define PIO_UNIMAPCLR _IO(KD_IOCTL_BASE, 0x68) /* clear table, possibly advise hash algorithm */
70+#define PIO_UNIMAP 0x4B67 /* put unicode-to-font mapping in kernel */
71+#define PIO_UNIMAPCLR 0x4B68 /* clear table, possibly advise hash algorithm */
7372 struct unimapinit {
7473 unsigned short advised_hashsize; /* 0 if no opinion */
7574 unsigned short advised_hashstep; /* 0 if no opinion */
@@ -84,19 +83,19 @@ struct unimapinit { · 8 unmodified lines
8483 #define K_MEDIUMRAW 0x02
8584 #define K_UNICODE 0x03
8685 #define K_OFF 0x04
87−#define KDGKBMODE _IO(KD_IOCTL_BASE, 0x44) /* gets current keyboard mode */
88−#define KDSKBMODE _IO(KD_IOCTL_BASE, 0x45) /* sets current keyboard mode */
86+#define KDGKBMODE 0x4B44 /* gets current keyboard mode */
87+#define KDSKBMODE 0x4B45 /* sets current keyboard mode */
8988
9089 #define K_METABIT 0x03
9190 #define K_ESCPREFIX 0x04
92−#define KDGKBMETA _IO(KD_IOCTL_BASE, 0x62) /* gets meta key handling mode */
93−#define KDSKBMETA _IO(KD_IOCTL_BASE, 0x63) /* sets meta key handling mode */
91+#define KDGKBMETA 0x4B62 /* gets meta key handling mode */
92+#define KDSKBMETA 0x4B63 /* sets meta key handling mode */
9493
9594 #define K_SCROLLLOCK 0x01
9695 #define K_NUMLOCK 0x02
9796 #define K_CAPSLOCK 0x04
98−#define KDGKBLED _IO(KD_IOCTL_BASE, 0x64) /* get led flags (not lights) */
99−#define KDSKBLED _IO(KD_IOCTL_BASE, 0x65) /* set led flags (not lights) */
97+#define KDGKBLED 0x4B64 /* get led flags (not lights) */
98+#define KDSKBLED 0x4B65 /* set led flags (not lights) */
10099
101100 struct kbentry {
102101 unsigned char kb_table;
@@ -108,15 +107,15 @@ struct kbentry { · 5 unmodified lines
108107 #define K_ALTTAB 0x02
109108 #define K_ALTSHIFTTAB 0x03
110109
111−#define KDGKBENT _IO(KD_IOCTL_BASE, 0x46) /* gets one entry in translation table */
112−#define KDSKBENT _IO(KD_IOCTL_BASE, 0x47) /* sets one entry in translation table */
110+#define KDGKBENT 0x4B46 /* gets one entry in translation table */
111+#define KDSKBENT 0x4B47 /* sets one entry in translation table */
113112
114113 struct kbsentry {
115114 unsigned char kb_func;
116115 unsigned char kb_string[512];
117116 };
118−#define KDGKBSENT _IO(KD_IOCTL_BASE, 0x48) /* gets one function key string entry */
119−#define KDSKBSENT _IO(KD_IOCTL_BASE, 0x49) /* sets one function key string entry */
117+#define KDGKBSENT 0x4B48 /* gets one function key string entry */
118+#define KDSKBSENT 0x4B49 /* sets one function key string entry */
120119
121120 struct kbdiacr {
122121 unsigned char diacr, base, result;
@@ -125,8 +124,8 @@ struct kbdiacrs { · 2 unmodified lines
125124 unsigned int kb_cnt; /* number of entries in following array */
126125 struct kbdiacr kbdiacr[256]; /* MAX_DIACR from keyboard.h */
127126 };
128−#define KDGKBDIACR _IO(KD_IOCTL_BASE, 0x4A) /* read kernel accent table */
129−#define KDSKBDIACR _IO(KD_IOCTL_BASE, 0x4B) /* write kernel accent table */
127+#define KDGKBDIACR 0x4B4A /* read kernel accent table */
128+#define KDSKBDIACR 0x4B4B /* write kernel accent table */
130129
131130 struct kbdiacruc {
132131 unsigned int diacr, base, result;
@@ -135,16 +134,16 @@ struct kbdiacrsuc { · 2 unmodified lines
135134 unsigned int kb_cnt; /* number of entries in following array */
136135 struct kbdiacruc kbdiacruc[256]; /* MAX_DIACR from keyboard.h */
137136 };
138−#define KDGKBDIACRUC _IO(KD_IOCTL_BASE, 0xFA) /* read kernel accent table - UCS */
139−#define KDSKBDIACRUC _IO(KD_IOCTL_BASE, 0xFB) /* write kernel accent table - UCS */
137+#define KDGKBDIACRUC 0x4BFA /* read kernel accent table - UCS */
138+#define KDSKBDIACRUC 0x4BFB /* write kernel accent table - UCS */
140139
141140 struct kbkeycode {
142141 unsigned int scancode, keycode;
143142 };
144−#define KDGETKEYCODE _IO(KD_IOCTL_BASE, 0x4C) /* read kernel keycode table entry */
145−#define KDSETKEYCODE _IO(KD_IOCTL_BASE, 0x4D) /* write kernel keycode table entry */
143+#define KDGETKEYCODE 0x4B4C /* read kernel keycode table entry */
144+#define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */
146145
147−#define KDSIGACCEPT _IO(KD_IOCTL_BASE, 0x4E) /* accept kbd generated signals */
146+#define KDSIGACCEPT 0x4B4E /* accept kbd generated signals */
148147
149148 struct kbd_repeat {
150149 int delay; /* in msec; <= 0: don't change */
@@ -152,11 +151,10 @@ struct kbd_repeat { · 1 unmodified line
152151 /* earlier this field was misnamed "rate" */
153152 };
154153
155−#define KDKBDREP _IO(KD_IOCTL_BASE, 0x52) /* set keyboard delay/repeat rate;
156− * actually used values are returned
157− */
154+#define KDKBDREP 0x4B52 /* set keyboard delay/repeat rate;
155+ * actually used values are returned */
158156
159−#define KDFONTOP _IO(KD_IOCTL_BASE, 0x72) /* font operations */
157+#define KDFONTOP 0x4B72 /* font operations */
160158
161159 struct console_font_op {
162160 unsigned int op; /* operation code KD_FONT_OP_* */
include/uapi/linux/kfd_ioctl.h+4−1
@@ -41,9 +41,10 @@ · 40 unmodified lines
4141 * - 1.13 - Add debugger API
4242 * - 1.14 - Update kfd_event_data
4343 * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl
44+ * - 1.16 - Add contiguous VRAM allocation flag
4445 */
4546 #define KFD_IOCTL_MAJOR_VERSION 1
46−#define KFD_IOCTL_MINOR_VERSION 15
47+#define KFD_IOCTL_MINOR_VERSION 16
4748
4849 struct kfd_ioctl_get_version_args {
4950 __u32 major_version; /* from KFD */
@@ -407,6 +408,7 @@ struct kfd_ioctl_acquire_vm_args { · 357 unmodified lines
407408 #define KFD_IOC_ALLOC_MEM_FLAGS_COHERENT (1 << 26)
408409 #define KFD_IOC_ALLOC_MEM_FLAGS_UNCACHED (1 << 25)
409410 #define KFD_IOC_ALLOC_MEM_FLAGS_EXT_COHERENT (1 << 24)
411+#define KFD_IOC_ALLOC_MEM_FLAGS_CONTIGUOUS (1 << 23)
410412
411413 /* Allocate memory for later SVM (shared virtual memory) mapping.
412414 *
@@ -852,6 +854,7 @@ enum kfd_dbg_trap_address_watch_mode { · 439 unmodified lines
852854 /* Additional wave settings */
853855 enum kfd_dbg_trap_flags {
854856 KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP = 1,
857+ KFD_DBG_TRAP_FLAG_SINGLE_ALU_OP = 2,
855858 };
856859
857860 /* Trap exceptions */
include/uapi/linux/kfd_sysfs.h+10−9
@@ -51,15 +51,16 @@ · 50 unmodified lines
5151 /* Old buggy user mode depends on this being 0 */
5252 #define HSA_CAP_RESERVED_WAS_SRAM_EDCSUPPORTED 0x00080000
5353
54−#define HSA_CAP_MEM_EDCSUPPORTED 0x00100000
55−#define HSA_CAP_RASEVENTNOTIFY 0x00200000
56−#define HSA_CAP_ASIC_REVISION_MASK 0x03c00000
57−#define HSA_CAP_ASIC_REVISION_SHIFT 22
58−#define HSA_CAP_SRAM_EDCSUPPORTED 0x04000000
59−#define HSA_CAP_SVMAPI_SUPPORTED 0x08000000
60−#define HSA_CAP_FLAGS_COHERENTHOSTACCESS 0x10000000
61−#define HSA_CAP_TRAP_DEBUG_FIRMWARE_SUPPORTED 0x20000000
62−#define HSA_CAP_RESERVED 0xe00f8000
54+#define HSA_CAP_MEM_EDCSUPPORTED 0x00100000
55+#define HSA_CAP_RASEVENTNOTIFY 0x00200000
56+#define HSA_CAP_ASIC_REVISION_MASK 0x03c00000
57+#define HSA_CAP_ASIC_REVISION_SHIFT 22
58+#define HSA_CAP_SRAM_EDCSUPPORTED 0x04000000
59+#define HSA_CAP_SVMAPI_SUPPORTED 0x08000000
60+#define HSA_CAP_FLAGS_COHERENTHOSTACCESS 0x10000000
61+#define HSA_CAP_TRAP_DEBUG_FIRMWARE_SUPPORTED 0x20000000
62+#define HSA_CAP_TRAP_DEBUG_PRECISE_ALU_OPERATIONS_SUPPORTED 0x40000000
63+#define HSA_CAP_RESERVED 0x800f8000
6364
6465 /* debug_prop bits in node properties */
6566 #define HSA_DBG_WATCH_ADDR_MASK_LO_BIT_MASK 0x0000000f
include/uapi/linux/netdev.h+1−0
@@ -148,6 +148,7 @@ enum { · 147 unmodified lines
148148 NETDEV_A_QSTATS_RX_ALLOC_FAIL,
149149 NETDEV_A_QSTATS_RX_HW_DROPS,
150150 NETDEV_A_QSTATS_RX_HW_DROP_OVERRUNS,
151+ NETDEV_A_QSTATS_RX_CSUM_COMPLETE,
151152 NETDEV_A_QSTATS_RX_CSUM_UNNECESSARY,
152153 NETDEV_A_QSTATS_RX_CSUM_NONE,
153154 NETDEV_A_QSTATS_RX_CSUM_BAD,
include/uapi/linux/stat.h+1−1
@@ -126,8 +126,8 @@ struct statx { · 125 unmodified lines
126126 __u64 stx_mnt_id;
127127 __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */
128128 __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */
129− __u64 stx_subvol; /* Subvolume identifier */
130129 /* 0xa0 */
130+ __u64 stx_subvol; /* Subvolume identifier */
131131 __u64 __spare3[11]; /* Spare space for future expansion */
132132 /* 0x100 */
133133 };