Merge tag 'drm-next-2025-07-30' of https://gitlab.freedesktop.org/drm/kernel
Pull drm updates from Dave Airlie:
"Highlights:
- Intel xe enable Panthor Lake, started adding WildCat Lake
- amdgpu has a bunch of reset improvments along with the usual IP
updates
- msm got VM_BIND support which is important for vulkan sparse memory
- more drm_panic users
- gpusvm common code to handle a bunch of core SVM work outside
drivers.
Detail summary:
Changes outside drm subdirectory:
- 'shrink_shmem_memory()' for better shmem/hibernate interaction
- Rust support infrastructure:
- make ETIMEDOUT available
- add size constants up to SZ_2G
- add DMA coherent allocation bindings
- mtd driver for Intel GPU non-volatile storage
- i2c designware quirk for Intel xe
core:
- atomic helpers: tune enable/disable sequences
- add task info to wedge API
- refactor EDID quirks
- connector: move HDR sink to drm_display_info
- fourcc: half-float and 32-bit float formats
- mode_config: pass format info to simplify
dma-buf:
- heaps: Give CMA heap a stable name
ci:
- add device tree validation and kunit
displayport:
- change AUX DPCD access probe address
- add quirk for DPCD probe
- add panel replay definitions
- backlight control helpers
fbdev:
- make CONFIG_FIRMWARE_EDID available on all arches
fence:
- fix UAF issues
format-helper:
- improve tests
gpusvm:
- introduce devmem only flag for allocation
- add timeslicing support to GPU SVM
ttm:
- improve eviction
sched:
- tracing improvements
- kunit improvements
- memory leak fixes
- reset handling improvements
color mgmt:
- add hardware gamma LUT handling helpers
bridge:
- add destroy hook
- switch to reference counted drm_bridge allocations
- tc358767: convert to devm_drm_bridge_alloc
- improve CEC handling
panel:
- switch to reference counter drm_panel allocations
- fwnode panel lookup
- Huiling hl055fhv028c support
- Raspberry Pi 7" 720x1280 support
- edp: KDC KD116N3730A05, N160JCE-ELL CMN, N116BCJ-EAK
- simple: AUO P238HAN01
- st7701: Winstar wf40eswaa6mnn0
- visionox: rm69299-shift
- Renesas R61307, Renesas R69328 support
- DJN HX83112B
hdmi:
- add CEC handling
- YUV420 output support
xe:
- WildCat Lake support
- Enable PanthorLake by default
- mark BMG as SRIOV capable
- update firmware recommendations
- Expose media OA units
- aux-bux support for non-volatile memory
- MTD intel-dg driver for non-volatile memory
- Expose fan control and voltage regulator in sysfs
- restructure migration for multi-device
- Restore GuC submit UAF fix
- make GEM shrinker drm managed
- SRIOV VF Post-migration recovery of GGTT nodes
- W/A additions/reworks
- Prefetch support for svm ranges
- Don't allocate managed BO for each policy change
- HWMON fixes for BMG
- Create LRC BO without VM
- PCI ID updates
- make SLPC debugfs files optional
- rework eviction rejection of bound external BOs
- consolidate PAT programming logic for pre/post Xe2
- init changes for flicker-free boot
- Enable GuC Dynamic Inhibit Context switch
i915:
- drm_panic support for i915/xe
- initial flip queue off by default for LNL/PNL
- Wildcat Lake Display support
- Support for DSC fractional link bpp
- Support for simultaneous Panel Replay and Adaptive sync
- Support for PTL+ double buffer LUT
- initial PIPEDMC event handling
- drm_panel_follower support
- DPLL interface renames
- allocate struct intel_display dynamically
- flip queue preperation
- abstract DRAM detection better
- avoid GuC scheduling stalls
- remove DG1 force probe requirement
- fix MEI interrupt handler on RT kernels
- use backlight control helpers for eDP
- more shared display code refactoring
amdgpu:
- add userq slot to INFO ioctl
- SR-IOV hibernation support
- Suspend improvements
- Backlight improvements
- Use scaling for non-native eDP modes
- cleaner shader updates for GC 9.x
- Remove fence slab
- SDMA fw checks for userq support
- RAS updates
- DMCUB updates
- DP tunneling fixes
- Display idle D3 support
- Per queue reset improvements
- initial smartmux support
amdkfd:
- enable KFD on loongarch
- mtype fix for ext coherent system memory
radeon:
- CS validation additional GL extensions
- drop console lock during suspend/resume
- bump driver version
msm:
- VM BIND support
- CI: infrastructure updates
- UBWC single source of truth
- decouple GPU and KMS support
- DP: rework I/O accessors
- DPU: SM8750 support
- DSI: SM8750 support
- GPU: X1-45 support and speedbin support for X1-85
- MDSS: SM8750 support
nova:
- register! macro improvements
- DMA object abstraction
- VBIOS parser + fwsec lookup
- sysmem flush page support
- falcon: generic falcon boot code and HAL
- FWSEC-FRTS: fb setup and load/execute
ivpu:
- Add Wildcat Lake support
- Add turbo flag
ast:
- improve hardware generations implementation
imx:
- IMX8qxq Display Controller support
lima:
- Rockchip RK3528 GPU support
nouveau:
- fence handling cleanup
panfrost:
- MT8370 support
- bo labeling
- 64-bit register access
qaic:
- add RAS support
rockchip:
- convert inno_hdmi to a bridge
rz-du:
- add RZ/V2H(P) support
- MIPI-DSI DCS support
sitronix:
- ST7567 support
sun4i:
- add H616 support
tidss:
- add TI AM62L support
- AM65x OLDI bridge support
bochs:
- drm panic support
vkms:
- YUV and R* format support
- use faux device
vmwgfx:
- fence improvements
hyperv:
- move out of simple
- add drm_panic support"
* tag 'drm-next-2025-07-30' of https://gitlab.freedesktop.org/drm/kernel: (1479 commits)
drm/tidss: oldi: convert to devm_drm_bridge_alloc() API
drm/tidss: encoder: convert to devm_drm_bridge_alloc()
drm/amdgpu: move reset support type checks into the caller
drm/amdgpu/sdma7: re-emit unprocessed state on ring reset
drm/amdgpu/sdma6: re-emit unprocessed state on ring reset
drm/amdgpu/sdma5.2: re-emit unprocessed state on ring reset
drm/amdgpu/sdma5: re-emit unprocessed state on ring reset
drm/amdgpu/gfx12: re-emit unprocessed state on ring reset
drm/amdgpu/gfx11: re-emit unprocessed state on ring reset
drm/amdgpu/gfx10: re-emit unprocessed state on ring reset
drm/amdgpu/gfx9.4.3: re-emit unprocessed state on kcq reset
drm/amdgpu/gfx9: re-emit unprocessed state on kcq reset
drm/amdgpu: Add WARN_ON to the resource clear function
drm/amd/pm: Use cached metrics data on SMUv13.0.6
drm/amd/pm: Use cached data for min/max clocks
gpu: nova-core: fix bounds check in PmuLookupTableEntry::new
drm/amdgpu: Replace HQD terminology with slots naming
drm/amdgpu: Add user queue instance count in HW IP info
drm/amd/amdgpu: Add helper functions for isp buffers
drm/amd/amdgpu: Initialize swnode for ISP MFD device
...
This commit is contained in:
@@ -1493,6 +1493,8 @@ struct drm_amdgpu_info_hw_ip {
|
||||
__u32 available_rings;
|
||||
/** version info: bits 23:16 major, 15:8 minor, 7:0 revision */
|
||||
__u32 ip_discovery_version;
|
||||
/* Userq available slots */
|
||||
__u32 userq_num_slots;
|
||||
};
|
||||
|
||||
/* GFX metadata BO sizes and alignment info (in bytes) */
|
||||
|
||||
@@ -210,6 +210,10 @@ extern "C" {
|
||||
#define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */
|
||||
#define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */
|
||||
|
||||
/* 48 bpp RGB */
|
||||
#define DRM_FORMAT_RGB161616 fourcc_code('R', 'G', '4', '8') /* [47:0] R:G:B 16:16:16 little endian */
|
||||
#define DRM_FORMAT_BGR161616 fourcc_code('B', 'G', '4', '8') /* [47:0] B:G:R 16:16:16 little endian */
|
||||
|
||||
/* 64 bpp RGB */
|
||||
#define DRM_FORMAT_XRGB16161616 fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */
|
||||
#define DRM_FORMAT_XBGR16161616 fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */
|
||||
@@ -218,7 +222,7 @@ extern "C" {
|
||||
#define DRM_FORMAT_ABGR16161616 fourcc_code('A', 'B', '4', '8') /* [63:0] A:B:G:R 16:16:16:16 little endian */
|
||||
|
||||
/*
|
||||
* Floating point 64bpp RGB
|
||||
* Half-Floating point - 16b/component
|
||||
* IEEE 754-2008 binary16 half-precision float
|
||||
* [15:0] sign:exponent:mantissa 1:5:10
|
||||
*/
|
||||
@@ -228,6 +232,20 @@ extern "C" {
|
||||
#define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H') /* [63:0] A:R:G:B 16:16:16:16 little endian */
|
||||
#define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */
|
||||
|
||||
#define DRM_FORMAT_R16F fourcc_code('R', ' ', ' ', 'H') /* [15:0] R 16 little endian */
|
||||
#define DRM_FORMAT_GR1616F fourcc_code('G', 'R', ' ', 'H') /* [31:0] G:R 16:16 little endian */
|
||||
#define DRM_FORMAT_BGR161616F fourcc_code('B', 'G', 'R', 'H') /* [47:0] B:G:R 16:16:16 little endian */
|
||||
|
||||
/*
|
||||
* Floating point - 32b/component
|
||||
* IEEE 754-2008 binary32 float
|
||||
* [31:0] sign:exponent:mantissa 1:8:23
|
||||
*/
|
||||
#define DRM_FORMAT_R32F fourcc_code('R', ' ', ' ', 'F') /* [31:0] R 32 little endian */
|
||||
#define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] R:G 32:32 little endian */
|
||||
#define DRM_FORMAT_BGR323232F fourcc_code('B', 'G', 'R', 'F') /* [95:0] R:G:B 32:32:32 little endian */
|
||||
#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') /* [127:0] R:G:B:A 32:32:32:32 little endian */
|
||||
|
||||
/*
|
||||
* RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits
|
||||
* of unused padding per component:
|
||||
@@ -377,6 +395,42 @@ extern "C" {
|
||||
*/
|
||||
#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1')
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr LSB aligned
|
||||
* In order to use these formats in a similar fashion to MSB aligned ones
|
||||
* implementation can multiply the values by 2^6=64. For that reason the padding
|
||||
* must only contain zeros.
|
||||
* index 0 = Y plane, [15:0] z:Y [6:10] little endian
|
||||
* index 1 = Cr plane, [15:0] z:Cr [6:10] little endian
|
||||
* index 2 = Cb plane, [15:0] z:Cb [6:10] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_S010 fourcc_code('S', '0', '1', '0') /* 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel */
|
||||
#define DRM_FORMAT_S210 fourcc_code('S', '2', '1', '0') /* 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel */
|
||||
#define DRM_FORMAT_S410 fourcc_code('S', '4', '1', '0') /* non-subsampled Cb (1) and Cr (2) planes 10 bits per channel */
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr LSB aligned
|
||||
* In order to use these formats in a similar fashion to MSB aligned ones
|
||||
* implementation can multiply the values by 2^4=16. For that reason the padding
|
||||
* must only contain zeros.
|
||||
* index 0 = Y plane, [15:0] z:Y [4:12] little endian
|
||||
* index 1 = Cr plane, [15:0] z:Cr [4:12] little endian
|
||||
* index 2 = Cb plane, [15:0] z:Cb [4:12] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_S012 fourcc_code('S', '0', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel */
|
||||
#define DRM_FORMAT_S212 fourcc_code('S', '2', '1', '2') /* 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel */
|
||||
#define DRM_FORMAT_S412 fourcc_code('S', '4', '1', '2') /* non-subsampled Cb (1) and Cr (2) planes 12 bits per channel */
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr
|
||||
* index 0 = Y plane, [15:0] Y little endian
|
||||
* index 1 = Cr plane, [15:0] Cr little endian
|
||||
* index 2 = Cb plane, [15:0] Cb little endian
|
||||
*/
|
||||
#define DRM_FORMAT_S016 fourcc_code('S', '0', '1', '6') /* 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel */
|
||||
#define DRM_FORMAT_S216 fourcc_code('S', '2', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel */
|
||||
#define DRM_FORMAT_S416 fourcc_code('S', '4', '1', '6') /* non-subsampled Cb (1) and Cr (2) planes 16 bits per channel */
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr
|
||||
* index 0: Y plane, [7:0] Y
|
||||
|
||||
@@ -445,6 +445,9 @@ struct drm_ivpu_metric_streamer_get_data {
|
||||
__u64 data_size;
|
||||
};
|
||||
|
||||
/* Command queue flags */
|
||||
#define DRM_IVPU_CMDQ_FLAG_TURBO 0x00000001
|
||||
|
||||
/**
|
||||
* struct drm_ivpu_cmdq_create - Create command queue for job submission
|
||||
*/
|
||||
@@ -462,6 +465,17 @@ struct drm_ivpu_cmdq_create {
|
||||
* %DRM_IVPU_JOB_PRIORITY_REALTIME
|
||||
*/
|
||||
__u32 priority;
|
||||
/**
|
||||
* @flags:
|
||||
*
|
||||
* Supported flags:
|
||||
*
|
||||
* %DRM_IVPU_CMDQ_FLAG_TURBO
|
||||
*
|
||||
* Enable low-latency mode for the command queue. The NPU will maximize performance
|
||||
* when executing jobs from such queue at the cost of increased power usage.
|
||||
*/
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+134
-15
@@ -91,6 +91,32 @@ struct drm_msm_timespec {
|
||||
#define MSM_PARAM_UBWC_SWIZZLE 0x12 /* RO */
|
||||
#define MSM_PARAM_MACROTILE_MODE 0x13 /* RO */
|
||||
#define MSM_PARAM_UCHE_TRAP_BASE 0x14 /* RO */
|
||||
/* PRR (Partially Resident Region) is required for sparse residency: */
|
||||
#define MSM_PARAM_HAS_PRR 0x15 /* RO */
|
||||
/* MSM_PARAM_EN_VM_BIND is set to 1 to enable VM_BIND ops.
|
||||
*
|
||||
* With VM_BIND enabled, userspace is required to allocate iova and use the
|
||||
* VM_BIND ops for map/unmap ioctls. MSM_INFO_SET_IOVA and MSM_INFO_GET_IOVA
|
||||
* will be rejected. (The latter does not have a sensible meaning when a BO
|
||||
* can have multiple and/or partial mappings.)
|
||||
*
|
||||
* With VM_BIND enabled, userspace does not include a submit_bo table in the
|
||||
* SUBMIT ioctl (this will be rejected), the resident set is determined by
|
||||
* the the VM_BIND ops.
|
||||
*
|
||||
* Enabling VM_BIND will fail on devices which do not have per-process pgtables.
|
||||
* And it is not allowed to disable VM_BIND once it has been enabled.
|
||||
*
|
||||
* Enabling VM_BIND should be done (attempted) prior to allocating any BOs or
|
||||
* submitqueues of type MSM_SUBMITQUEUE_VM_BIND.
|
||||
*
|
||||
* Relatedly, when VM_BIND mode is enabled, the kernel will not try to recover
|
||||
* from GPU faults or failed async VM_BIND ops, in particular because it is
|
||||
* difficult to communicate to userspace which op failed so that userspace
|
||||
* could rewind and try again. When the VM is marked unusable, the SUBMIT
|
||||
* ioctl will throw -EPIPE.
|
||||
*/
|
||||
#define MSM_PARAM_EN_VM_BIND 0x16 /* WO, once */
|
||||
|
||||
/* For backwards compat. The original support for preemption was based on
|
||||
* a single ring per priority level so # of priority levels equals the #
|
||||
@@ -114,6 +140,19 @@ struct drm_msm_param {
|
||||
|
||||
#define MSM_BO_SCANOUT 0x00000001 /* scanout capable */
|
||||
#define MSM_BO_GPU_READONLY 0x00000002
|
||||
/* Private buffers do not need to be explicitly listed in the SUBMIT
|
||||
* ioctl, unless referenced by a drm_msm_gem_submit_cmd. Private
|
||||
* buffers may NOT be imported/exported or used for scanout (or any
|
||||
* other situation where buffers can be indefinitely pinned, but
|
||||
* cases other than scanout are all kernel owned BOs which are not
|
||||
* visible to userspace).
|
||||
*
|
||||
* In exchange for those constraints, all private BOs associated with
|
||||
* a single context (drm_file) share a single dma_resv, and if there
|
||||
* has been no eviction since the last submit, there are no per-BO
|
||||
* bookeeping to do, significantly cutting the SUBMIT overhead.
|
||||
*/
|
||||
#define MSM_BO_NO_SHARE 0x00000004
|
||||
#define MSM_BO_CACHE_MASK 0x000f0000
|
||||
/* cache modes */
|
||||
#define MSM_BO_CACHED 0x00010000
|
||||
@@ -123,6 +162,7 @@ struct drm_msm_param {
|
||||
|
||||
#define MSM_BO_FLAGS (MSM_BO_SCANOUT | \
|
||||
MSM_BO_GPU_READONLY | \
|
||||
MSM_BO_NO_SHARE | \
|
||||
MSM_BO_CACHE_MASK)
|
||||
|
||||
struct drm_msm_gem_new {
|
||||
@@ -180,6 +220,17 @@ struct drm_msm_gem_cpu_fini {
|
||||
* Cmdstream Submission:
|
||||
*/
|
||||
|
||||
#define MSM_SYNCOBJ_RESET 0x00000001 /* Reset syncobj after wait. */
|
||||
#define MSM_SYNCOBJ_FLAGS ( \
|
||||
MSM_SYNCOBJ_RESET | \
|
||||
0)
|
||||
|
||||
struct drm_msm_syncobj {
|
||||
__u32 handle; /* in, syncobj handle. */
|
||||
__u32 flags; /* in, from MSM_SUBMIT_SYNCOBJ_FLAGS */
|
||||
__u64 point; /* in, timepoint for timeline syncobjs. */
|
||||
};
|
||||
|
||||
/* The value written into the cmdstream is logically:
|
||||
*
|
||||
* ((relocbuf->gpuaddr + reloc_offset) << shift) | or
|
||||
@@ -221,7 +272,10 @@ struct drm_msm_gem_submit_cmd {
|
||||
__u32 size; /* in, cmdstream size */
|
||||
__u32 pad;
|
||||
__u32 nr_relocs; /* in, number of submit_reloc's */
|
||||
__u64 relocs; /* in, ptr to array of submit_reloc's */
|
||||
union {
|
||||
__u64 relocs; /* in, ptr to array of submit_reloc's */
|
||||
__u64 iova; /* cmdstream address (for VM_BIND contexts) */
|
||||
};
|
||||
};
|
||||
|
||||
/* Each buffer referenced elsewhere in the cmdstream submit (ie. the
|
||||
@@ -269,17 +323,6 @@ struct drm_msm_gem_submit_bo {
|
||||
MSM_SUBMIT_FENCE_SN_IN | \
|
||||
0)
|
||||
|
||||
#define MSM_SUBMIT_SYNCOBJ_RESET 0x00000001 /* Reset syncobj after wait. */
|
||||
#define MSM_SUBMIT_SYNCOBJ_FLAGS ( \
|
||||
MSM_SUBMIT_SYNCOBJ_RESET | \
|
||||
0)
|
||||
|
||||
struct drm_msm_gem_submit_syncobj {
|
||||
__u32 handle; /* in, syncobj handle. */
|
||||
__u32 flags; /* in, from MSM_SUBMIT_SYNCOBJ_FLAGS */
|
||||
__u64 point; /* in, timepoint for timeline syncobjs. */
|
||||
};
|
||||
|
||||
/* Each cmdstream submit consists of a table of buffers involved, and
|
||||
* one or more cmdstream buffers. This allows for conditional execution
|
||||
* (context-restore), and IB buffers needed for per tile/bin draw cmds.
|
||||
@@ -293,13 +336,80 @@ struct drm_msm_gem_submit {
|
||||
__u64 cmds; /* in, ptr to array of submit_cmd's */
|
||||
__s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */
|
||||
__u32 queueid; /* in, submitqueue id */
|
||||
__u64 in_syncobjs; /* in, ptr to array of drm_msm_gem_submit_syncobj */
|
||||
__u64 out_syncobjs; /* in, ptr to array of drm_msm_gem_submit_syncobj */
|
||||
__u64 in_syncobjs; /* in, ptr to array of drm_msm_syncobj */
|
||||
__u64 out_syncobjs; /* in, ptr to array of drm_msm_syncobj */
|
||||
__u32 nr_in_syncobjs; /* in, number of entries in in_syncobj */
|
||||
__u32 nr_out_syncobjs; /* in, number of entries in out_syncobj. */
|
||||
__u32 syncobj_stride; /* in, stride of syncobj arrays. */
|
||||
__u32 pad; /*in, reserved for future use, always 0. */
|
||||
};
|
||||
|
||||
#define MSM_VM_BIND_OP_UNMAP 0
|
||||
#define MSM_VM_BIND_OP_MAP 1
|
||||
#define MSM_VM_BIND_OP_MAP_NULL 2
|
||||
|
||||
#define MSM_VM_BIND_OP_DUMP 1
|
||||
#define MSM_VM_BIND_OP_FLAGS ( \
|
||||
MSM_VM_BIND_OP_DUMP | \
|
||||
0)
|
||||
|
||||
/**
|
||||
* struct drm_msm_vm_bind_op - bind/unbind op to run
|
||||
*/
|
||||
struct drm_msm_vm_bind_op {
|
||||
/** @op: one of MSM_VM_BIND_OP_x */
|
||||
__u32 op;
|
||||
/** @handle: GEM object handle, MBZ for UNMAP or MAP_NULL */
|
||||
__u32 handle;
|
||||
/** @obj_offset: Offset into GEM object, MBZ for UNMAP or MAP_NULL */
|
||||
__u64 obj_offset;
|
||||
/** @iova: Address to operate on */
|
||||
__u64 iova;
|
||||
/** @range: Number of bites to to map/unmap */
|
||||
__u64 range;
|
||||
/** @flags: Bitmask of MSM_VM_BIND_OP_FLAG_x */
|
||||
__u32 flags;
|
||||
/** @pad: MBZ */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define MSM_VM_BIND_FENCE_FD_IN 0x00000001
|
||||
#define MSM_VM_BIND_FENCE_FD_OUT 0x00000002
|
||||
#define MSM_VM_BIND_FLAGS ( \
|
||||
MSM_VM_BIND_FENCE_FD_IN | \
|
||||
MSM_VM_BIND_FENCE_FD_OUT | \
|
||||
0)
|
||||
|
||||
/**
|
||||
* struct drm_msm_vm_bind - Input of &DRM_IOCTL_MSM_VM_BIND
|
||||
*/
|
||||
struct drm_msm_vm_bind {
|
||||
/** @flags: in, bitmask of MSM_VM_BIND_x */
|
||||
__u32 flags;
|
||||
/** @nr_ops: the number of bind ops in this ioctl */
|
||||
__u32 nr_ops;
|
||||
/** @fence_fd: in/out fence fd (see MSM_VM_BIND_FENCE_FD_IN/OUT) */
|
||||
__s32 fence_fd;
|
||||
/** @queue_id: in, submitqueue id */
|
||||
__u32 queue_id;
|
||||
/** @in_syncobjs: in, ptr to array of drm_msm_gem_syncobj */
|
||||
__u64 in_syncobjs;
|
||||
/** @out_syncobjs: in, ptr to array of drm_msm_gem_syncobj */
|
||||
__u64 out_syncobjs;
|
||||
/** @nr_in_syncobjs: in, number of entries in in_syncobj */
|
||||
__u32 nr_in_syncobjs;
|
||||
/** @nr_out_syncobjs: in, number of entries in out_syncobj */
|
||||
__u32 nr_out_syncobjs;
|
||||
/** @syncobj_stride: in, stride of syncobj arrays */
|
||||
__u32 syncobj_stride;
|
||||
/** @op_stride: sizeof each struct drm_msm_vm_bind_op in @ops */
|
||||
__u32 op_stride;
|
||||
union {
|
||||
/** @op: used if num_ops == 1 */
|
||||
struct drm_msm_vm_bind_op op;
|
||||
/** @ops: userptr to array of drm_msm_vm_bind_op if num_ops > 1 */
|
||||
__u64 ops;
|
||||
};
|
||||
};
|
||||
|
||||
#define MSM_WAIT_FENCE_BOOST 0x00000001
|
||||
@@ -345,12 +455,19 @@ struct drm_msm_gem_madvise {
|
||||
/*
|
||||
* Draw queues allow the user to set specific submission parameter. Command
|
||||
* submissions specify a specific submitqueue to use. ID 0 is reserved for
|
||||
* backwards compatibility as a "default" submitqueue
|
||||
* backwards compatibility as a "default" submitqueue.
|
||||
*
|
||||
* Because VM_BIND async updates happen on the CPU, they must run on a
|
||||
* virtual queue created with the flag MSM_SUBMITQUEUE_VM_BIND. If we had
|
||||
* a way to do pgtable updates on the GPU, we could drop this restriction.
|
||||
*/
|
||||
|
||||
#define MSM_SUBMITQUEUE_ALLOW_PREEMPT 0x00000001
|
||||
#define MSM_SUBMITQUEUE_VM_BIND 0x00000002 /* virtual queue for VM_BIND ops */
|
||||
|
||||
#define MSM_SUBMITQUEUE_FLAGS ( \
|
||||
MSM_SUBMITQUEUE_ALLOW_PREEMPT | \
|
||||
MSM_SUBMITQUEUE_VM_BIND | \
|
||||
0)
|
||||
|
||||
/*
|
||||
@@ -388,6 +505,7 @@ struct drm_msm_submitqueue_query {
|
||||
#define DRM_MSM_SUBMITQUEUE_NEW 0x0A
|
||||
#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B
|
||||
#define DRM_MSM_SUBMITQUEUE_QUERY 0x0C
|
||||
#define DRM_MSM_VM_BIND 0x0D
|
||||
|
||||
#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
|
||||
#define DRM_IOCTL_MSM_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param)
|
||||
@@ -401,6 +519,7 @@ struct drm_msm_submitqueue_query {
|
||||
#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue)
|
||||
#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32)
|
||||
#define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query)
|
||||
#define DRM_IOCTL_MSM_VM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_VM_BIND, struct drm_msm_vm_bind)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ extern "C" {
|
||||
#define DRM_PANFROST_PERFCNT_ENABLE 0x06
|
||||
#define DRM_PANFROST_PERFCNT_DUMP 0x07
|
||||
#define DRM_PANFROST_MADVISE 0x08
|
||||
#define DRM_PANFROST_SET_LABEL_BO 0x09
|
||||
|
||||
#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
|
||||
#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" {
|
||||
#define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param)
|
||||
#define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)
|
||||
#define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise)
|
||||
#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
|
||||
|
||||
/*
|
||||
* Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
|
||||
@@ -227,6 +229,25 @@ struct drm_panfrost_madvise {
|
||||
__u32 retained; /* out, whether backing store still exists */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_panfrost_set_label_bo - ioctl argument for labelling Panfrost BOs.
|
||||
*/
|
||||
struct drm_panfrost_set_label_bo {
|
||||
/** @handle: Handle of the buffer object to label. */
|
||||
__u32 handle;
|
||||
|
||||
/** @pad: MBZ. */
|
||||
__u32 pad;
|
||||
|
||||
/**
|
||||
* @label: User pointer to a NUL-terminated string
|
||||
*
|
||||
* Length cannot be greater than 4096.
|
||||
* NULL is permitted and means clear the label.
|
||||
*/
|
||||
__u64 label;
|
||||
};
|
||||
|
||||
/* Definitions for coredump decoding in user space */
|
||||
#define PANFROSTDUMP_MAJOR 1
|
||||
#define PANFROSTDUMP_MINOR 0
|
||||
|
||||
@@ -130,6 +130,20 @@ enum drm_panthor_ioctl_id {
|
||||
|
||||
/** @DRM_PANTHOR_BO_SET_LABEL: Label a BO. */
|
||||
DRM_PANTHOR_BO_SET_LABEL,
|
||||
|
||||
/**
|
||||
* @DRM_PANTHOR_SET_USER_MMIO_OFFSET: Set the offset to use as the user MMIO offset.
|
||||
*
|
||||
* The default behavior is to pick the MMIO offset based on the size of the pgoff_t
|
||||
* type seen by the process that manipulates the FD, such that a 32-bit process can
|
||||
* always map the user MMIO ranges. But this approach doesn't work well for emulators
|
||||
* like FEX, where the emulator is an 64-bit binary which might be executing 32-bit
|
||||
* code. In that case, the kernel thinks it's the 64-bit process and assumes
|
||||
* DRM_PANTHOR_USER_MMIO_OFFSET_64BIT is in use, but the UMD library expects
|
||||
* DRM_PANTHOR_USER_MMIO_OFFSET_32BIT, because it can't mmap() anything above the
|
||||
* pgoff_t size.
|
||||
*/
|
||||
DRM_PANTHOR_SET_USER_MMIO_OFFSET,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -296,6 +310,9 @@ struct drm_panthor_gpu_info {
|
||||
/** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */
|
||||
__u32 as_present;
|
||||
|
||||
/** @pad0: MBZ. */
|
||||
__u32 pad0;
|
||||
|
||||
/** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */
|
||||
__u64 shader_present;
|
||||
|
||||
@@ -998,6 +1015,28 @@ struct drm_panthor_bo_set_label {
|
||||
__u64 label;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_panthor_set_user_mmio_offset - Arguments passed to
|
||||
* DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET
|
||||
*
|
||||
* This ioctl is only really useful if you want to support userspace
|
||||
* CPU emulation environments where the size of an unsigned long differs
|
||||
* between the host and the guest architectures.
|
||||
*/
|
||||
struct drm_panthor_set_user_mmio_offset {
|
||||
/**
|
||||
* @offset: User MMIO offset to use.
|
||||
*
|
||||
* Must be either DRM_PANTHOR_USER_MMIO_OFFSET_32BIT or
|
||||
* DRM_PANTHOR_USER_MMIO_OFFSET_64BIT.
|
||||
*
|
||||
* Use DRM_PANTHOR_USER_MMIO_OFFSET (which selects OFFSET_32BIT or
|
||||
* OFFSET_64BIT based on the size of an unsigned long) unless you
|
||||
* have a very good reason to overrule this decision.
|
||||
*/
|
||||
__u64 offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number
|
||||
* @__access: Access type. Must be R, W or RW.
|
||||
@@ -1042,6 +1081,8 @@ enum {
|
||||
DRM_IOCTL_PANTHOR(WR, TILER_HEAP_DESTROY, tiler_heap_destroy),
|
||||
DRM_IOCTL_PANTHOR_BO_SET_LABEL =
|
||||
DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),
|
||||
DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET =
|
||||
DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset),
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
@@ -925,9 +925,9 @@ struct drm_xe_gem_mmap_offset {
|
||||
* - %DRM_XE_VM_CREATE_FLAG_LR_MODE - An LR, or Long Running VM accepts
|
||||
* exec submissions to its exec_queues that don't have an upper time
|
||||
* limit on the job execution time. But exec submissions to these
|
||||
* don't allow any of the flags DRM_XE_SYNC_FLAG_SYNCOBJ,
|
||||
* DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ, DRM_XE_SYNC_FLAG_DMA_BUF,
|
||||
* used as out-syncobjs, that is, together with DRM_XE_SYNC_FLAG_SIGNAL.
|
||||
* don't allow any of the sync types DRM_XE_SYNC_TYPE_SYNCOBJ,
|
||||
* DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ, used as out-syncobjs, that is,
|
||||
* together with sync flag DRM_XE_SYNC_FLAG_SIGNAL.
|
||||
* LR VMs can be created in recoverable page-fault mode using
|
||||
* DRM_XE_VM_CREATE_FLAG_FAULT_MODE, if the device supports it.
|
||||
* If that flag is omitted, the UMD can not rely on the slightly
|
||||
@@ -1394,7 +1394,7 @@ struct drm_xe_sync {
|
||||
|
||||
/**
|
||||
* @timeline_value: Input for the timeline sync object. Needs to be
|
||||
* different than 0 when used with %DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ.
|
||||
* different than 0 when used with %DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ.
|
||||
*/
|
||||
__u64 timeline_value;
|
||||
|
||||
@@ -1617,6 +1617,9 @@ enum drm_xe_oa_unit_type {
|
||||
|
||||
/** @DRM_XE_OA_UNIT_TYPE_OAM: OAM OA unit */
|
||||
DRM_XE_OA_UNIT_TYPE_OAM,
|
||||
|
||||
/** @DRM_XE_OA_UNIT_TYPE_OAM_SAG: OAM_SAG OA unit */
|
||||
DRM_XE_OA_UNIT_TYPE_OAM_SAG,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1638,6 +1641,7 @@ struct drm_xe_oa_unit {
|
||||
#define DRM_XE_OA_CAPS_SYNCS (1 << 1)
|
||||
#define DRM_XE_OA_CAPS_OA_BUFFER_SIZE (1 << 2)
|
||||
#define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS (1 << 3)
|
||||
#define DRM_XE_OA_CAPS_OAM (1 << 4)
|
||||
|
||||
/** @oa_timestamp_freq: OA timestamp freq */
|
||||
__u64 oa_timestamp_freq;
|
||||
|
||||
Reference in New Issue
Block a user