mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
Merge tag 'drm-next-2026-06-17' of https://gitlab.freedesktop.org/drm/kernel
Pull drm updates from Dave Airlie:
"Highlights:
- xe: add initial CRI platform support
- amdgpu: initial HDMI 2.1 FRL support
- rust: add some new type concepts for device lifetimes
- scheduler: moves to a fair algorithm and lots of cleanups
But it's mostly the usual mountain of changes across the board.
core:
- add docbook for DRM_IOCTL_SYNCOBJ_EVENTFD
- change signature of drm_connector_attach_hdr_output_metadata_property
- dedup counter and timestamp retrieval in vblank code
- parse AMD VSDB v3 in CTA extension blocks
- add P230, Y7, XYYY2101010, T430, XVUY210101010 formats
- don't call drop master on file close if not master
- use drm_printf_indent in atomic / bridge
- fix 32b format descriptions
- docs: fix toctree
- hdmi: add common TMDS character rates
- fix drm_syncobj_find_fence leak
rust:
- introduce Higher-Ranked lifetime types
- replace drvdata with scoped registration data
- add GPUVM immediate mode abstraction for rust GPU drivers
- introduce DeviceContext type state for drm::Device
bridge:
- clarify drm_bridge_get/put
- create drm_get_bridge_by_endpoint and use it
- analogix_dp: add panel probing
- ite-it6211 - use drm audio hdmi helpers
buddy:
- add lockdep annotations
dp:
- add PR and VRR updates
- mst: fix buffer overflows
- add Adaptive Sync SDP decoding support
- fix OOB reads in dp-mst
ttm:
- bump fpfn/lpfn to 64-bit
scheduler:
- change default to fair scheduler
- map runqueue 1:1 with scheduler
dma-buf:
- port selftests to kunit
- convert dma-buf system/heap allocators to module
- add separate DMABUF_HEAPS_SYSTEM_CC_SHARED Kconfig
udmabuf:
- revert hugetlb support
- fix error with CONFIG_DMA_API_DEBUG
dma-fence:
- fix tracepoints lifetime
- remove unused signal on any support
ras:
- add clear error counter netlink command to drm ras
gpusvm:
- reject VMAs with VM_IO or VM_PFNMAP when creating SVM ranges
- use IOVA allocations
pagemap:
- use IOVA allocations
panels:
- update to use ref counts
- add support for CSW PNB601LS1-2, LGD LP116WHA-SPB1
- add support for waveshare panels
- CMN N116BCN-EA1, CMN N140HCA-EEK, IVO M140NWFQ R5,
- IVO, R140NWFW R0, BOE NT140*, BOE NV133FHM-N4F,
- AUO B140*, AUO B133HAN06.6 and AUO B116XTN02.3 eDP panels
- Surface Pro 12 Panel
xe:
- add CRI PCI-IDs
- debugfs add multi-lrc info
- engine init cleanup
- PF fair scheduling auto provisioning
- system controller support for CRI/Xe3p
- PXP state machine fixes
- Reset/wedge/unload corner case fixes
- Wedge path memory allocation fixes
- PAT type cleanups
- Reject unsafe PAT for CPU cached memory
- OA improvements for CRI device memory
- kernel doc syntax in xe headers
- xe_drm.h documentation fixes
- include guard cleanups
- VF CCS memory pool
- i915/xe step unification
- Xe3p GT tuning fixes
- forcewake cleanup in GT and GuC
- admin-only PF mode
- enable hwmon energy attributes for CRI
- enable GT_MI_USER_INTERRUPT
- refactor emit functions
- oa workarounds
- multi_queue: allow QUEUE_TIMESTAMP register
- convert stolen memory to ttm range manager
- use xe2 style blitter as a feature flag
- make drm_driver const
- add/use IRQ page to HW engine definition
- fix oops when display disabled
i915:
- enable PIPEDMC_ERROR interrupt
- more common display code refactoring
- restructure DP/HDMI sink format handling
- eliminate FB usage from lowlevel pinning code
- panel replay bw optimization
- integrate sharpness filter into the scaler
- new fb_pin abstraction for xe/i915 fb transparent handling
- skip inactive MST connectors on HDCP
- start switching to display specific registers
- use polling when irq unavailable
- Adaptive-sync SDP prep
amdgpu:
- use drm_display_info for AMD VSDB data
- Initial HDMI 2.1 FRL support
- Initial DCN 4.2.1 support
- GART fixes for non-4k pages
- GC 11.5.6/SDMA 6.4.0/and other new IPs
- GFX9/DCE6/Hawaii/SDMA4/GART/Userq fixes
- Finish support for using multiple SDMA queues for TTM operations
- SWSMU updates
- GC 12.1 updates
- SMU 15.0.8 updates
- DCN 4.2 updates
- DC type conversion fixes
- Enable DC power module
- Replay/PSR updates
- SMU 13.x updates
- Compute queue quantum MQD updates
- ASPM fix
- Align VKMS with common implementation
- DC analog support fixes
- UVD 3 fixes
- TCC harvesting fixes for SI
- GC 11 APU module reload fix
- NBIO 6.3.2 support
- IH 7.1 updates
- DC cursor fixes
- VCN/JPEG user fence fixes
- DC support for connectors without DDC
- Prefer ROM BAR for default VGA device
- DC bandwidth fixes
- Add PTL support for profiler
- Introduce dc_plane_cm and migrate surface update color path
- Add FRL registers for HDMI 2.1
- Restructure VM state machine
- Auxless ALPM support
- GEM_OP locking/warning fixes
- switch to system_dfl_wq
amdkfd:
- GPUVM TLB flush fix
- Hotplug fix
- Boundary check fixes
- SVM fixes
- CRIU fixes
- add profiler API
- MES 12.1 updates
msm:
- core:
- fix shrinker documentation
- IFPC enabled for gen8
- PERFCNTR_CONFIG ioctl support
- GPU:
- reworked UBWC handling
- a810 support
- MDSS:
- add support for Milos platform
- reworked UBWC handling
- DisplayPort:
- reworked HPD handling as prep for MST
- DPU:
- Milos platform support
- reworked UBWC handling
- DSI:
- Milos platform support
nova:
- Hopper/Blackwell enablement (GH100/GB100/GB202)
- FSP support
- 32-bit firmware support
- HAL functions
- refactor GSP boot/unload
- GA100 support
- VBIOS hardening/refactoring
- Adopt higher order lifetime types
tyr:
- define register blocks
- add shmem backed GEM objects
- adopt higher order lifetime types
- move clock cleanup into Drop
radeon:
- Hawaii SMU fixes
- CS parser fix
- use struct drm_edid instead of edid
amdxdna:
- export per-client BO memory via fdinfo
- AIE4 device support
- support medium/lower power modes
- expandable device heap support
- revert read-only user-pointer BO mappings
ivpu:
- support frequency limiting
panthor:
- enable GEM shrinker support
- add eviction and reclaim info to fdinfo
v3d:
- enable runtime PM
mgag200:
- support XRGB1555 + C8
ast:
- support XRGB1555 + C8
- use constants for lots of registers
- fix register handling
imagination:
- fence handling refactoring
nouveau:
- fix sched double call
- expose VBIOS on GSP-RM systems
- add GA100 support
virtio:
- add VIRTIO_GPU_F_BLOB_ALIGNMENT flag
- add deferred mapping support
gud:
- add RCade Display Adapter
hibmc:
- fix no connectors usage
mediatek:
- hdmi: convert error handling
- simplify mtk_crtc allocation
exynos:
- move fbdev emulation to drm client buffers
- use drm format helpers for geometry/size
- adopt core DMA tracking
- fix framebuffer offset handling
renesas:
- add RZ/T2H SOC support
versilicon:
- add cursor plane support
tegra:
- use drm client for framebuffer"
* tag 'drm-next-2026-06-17' of https://gitlab.freedesktop.org/drm/kernel: (1731 commits)
dma-buf: move system_cc_shared heap under separate Kconfig
accel/amdxdna: Clear sva pointer after unbind
agp/amd64: Fix broken error propagation in agp_amd64_probe()
accel/amdxdna: Require carveout when PASID and force_iova are disabled
drm/amdkfd: always resume_all after suspend_all
drm/amdgpu/gfx: move fault and EOP IRQ get/put to hw_init/hw_fini
drm/amd/display: Consult MCCS FreeSync cap only if requested & supported
drm/amd/pm: Use strscpy in profile mode parsing
drm/amdkfd: Fix infinite loop parsing CRAT with zero subtype length
drm/amdkfd: fix sysfs topology prop length on buffer truncation
drm/amdgpu: drop retry loop in amdgpu_hmm_range_get_pages
drm/amd/pm: bound OD parameter parsing to stack array size
drm/amd/pm: Stop pp_od_clk_voltage emit at PAGE_SIZE
drm/amdkfd: Unwind debug trap enable on copy_to_user failure
drm/amdgpu: validate the mes firmware version for gfx12.1
drm/amdgpu: validate the mes firmware version for gfx12
drm/amdgpu: compare MES firmware version ucode for gfx11
drm/amdkfd: Add bounds check for AMDKFD_IOC_WAIT_EVENTS
drm/amdgpu: restart the CS if some parts of the VM are still invalidated
drm/amd/display: use unsigned types for local pipe and REG_GET counters
...
This commit is contained in:
@@ -18,6 +18,7 @@ extern "C" {
|
||||
#define AMDXDNA_INVALID_CTX_HANDLE 0
|
||||
#define AMDXDNA_INVALID_BO_HANDLE 0
|
||||
#define AMDXDNA_INVALID_FENCE_HANDLE 0
|
||||
#define AMDXDNA_INVALID_DOORBELL_OFFSET (~0U)
|
||||
|
||||
/*
|
||||
* Define hardware context priority
|
||||
@@ -29,7 +30,9 @@ extern "C" {
|
||||
|
||||
enum amdxdna_device_type {
|
||||
AMDXDNA_DEV_TYPE_UNKNOWN = -1,
|
||||
AMDXDNA_DEV_TYPE_KMQ,
|
||||
AMDXDNA_DEV_TYPE_KMQ = 0,
|
||||
AMDXDNA_DEV_TYPE_UMQ = 1,
|
||||
AMDXDNA_DEV_TYPE_PF = 2,
|
||||
};
|
||||
|
||||
enum amdxdna_drm_ioctl_id {
|
||||
@@ -42,7 +45,8 @@ enum amdxdna_drm_ioctl_id {
|
||||
DRM_AMDXDNA_EXEC_CMD,
|
||||
DRM_AMDXDNA_GET_INFO,
|
||||
DRM_AMDXDNA_SET_STATE,
|
||||
DRM_AMDXDNA_GET_ARRAY = 10,
|
||||
DRM_AMDXDNA_WAIT_CMD,
|
||||
DRM_AMDXDNA_GET_ARRAY,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -271,6 +275,21 @@ struct amdxdna_drm_exec_cmd {
|
||||
__u64 seq;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct amdxdna_drm_wait_cmd - Wait execution command.
|
||||
*
|
||||
* @hwctx: Context handle.
|
||||
* @timeout: timeout in ms, 0 implies infinite wait.
|
||||
* @seq: sequence number of the command returned by execute command.
|
||||
*
|
||||
* Wait a command specified by seq to be completed.
|
||||
*/
|
||||
struct amdxdna_drm_wait_cmd {
|
||||
__u32 hwctx;
|
||||
__u32 timeout;
|
||||
__u64 seq;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct amdxdna_drm_query_aie_status - Query the status of the AIE hardware
|
||||
* @buffer: The user space buffer that will return the AIE status.
|
||||
@@ -736,6 +755,10 @@ struct amdxdna_drm_set_power_mode {
|
||||
DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDXDNA_GET_ARRAY, \
|
||||
struct amdxdna_drm_get_array)
|
||||
|
||||
#define DRM_IOCTL_AMDXDNA_WAIT_CMD \
|
||||
DRM_IOW(DRM_COMMAND_BASE + DRM_AMDXDNA_WAIT_CMD, \
|
||||
struct amdxdna_drm_wait_cmd)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern c end */
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Header for the Direct Rendering Manager
|
||||
*
|
||||
@@ -11,25 +12,6 @@
|
||||
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DRM_H_
|
||||
@@ -1323,6 +1305,13 @@ extern "C" {
|
||||
*/
|
||||
#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2)
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_SYNCOBJ_EVENTFD - Register an eventfd to be signalled by a syncobj.
|
||||
*
|
||||
* This can be used to integrate a syncobj in an event loop.
|
||||
*
|
||||
* The IOCTL argument is a struct drm_syncobj_eventfd.
|
||||
*/
|
||||
#define DRM_IOCTL_SYNCOBJ_EVENTFD DRM_IOWR(0xCF, struct drm_syncobj_eventfd)
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,24 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright 2011 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef DRM_FOURCC_H
|
||||
@@ -242,9 +224,9 @@ extern "C" {
|
||||
* [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 */
|
||||
#define DRM_FORMAT_GR3232F fourcc_code('G', 'R', ' ', 'F') /* [63:0] G:R 32:32 little endian */
|
||||
#define DRM_FORMAT_BGR323232F fourcc_code('B', 'G', 'R', 'F') /* [95:0] B:G:R 32:32:32 little endian */
|
||||
#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') /* [127:0] A:B:G:R 32:32:32:32 little endian */
|
||||
|
||||
/*
|
||||
* RGBA format with 10-bit components packed in 64-bit per pixel, with 6 bits
|
||||
@@ -264,6 +246,7 @@ extern "C" {
|
||||
#define DRM_FORMAT_XVUY8888 fourcc_code('X', 'V', 'U', 'Y') /* [31:0] X:Cr:Cb:Y 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4') /* [23:0] Cr:Cb:Y 8:8:8 little endian */
|
||||
#define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0') /* Y followed by U then V, 10:10:10. Non-linear modifier only */
|
||||
#define DRM_FORMAT_XVUY2101010 fourcc_code('X', 'Y', '3', '0') /* [31:0] x:Cr:Cb:Y 2:10:10:10 little endian */
|
||||
|
||||
/*
|
||||
* packed Y2xx indicate for each component, xx valid data occupy msb
|
||||
@@ -379,6 +362,14 @@ extern "C" {
|
||||
*/
|
||||
#define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr422.
|
||||
* 3 10 bit components and 2 padding bits packed into 4 bytes.
|
||||
* index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian
|
||||
* index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_P230 fourcc_code('P', '2', '3', '0') /* 2x1 subsampled Cr:Cb plane 10 bits per channel packed */
|
||||
|
||||
/* 3 plane non-subsampled (444) YCbCr
|
||||
* 16 bits per component, but only 10 bits are used and 6 bits are padded
|
||||
* index 0: Y plane, [15:0] Y:x [10:6] little endian
|
||||
@@ -395,6 +386,15 @@ extern "C" {
|
||||
*/
|
||||
#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1')
|
||||
|
||||
/*
|
||||
* 3 plane non-subsampled (444) YCbCr LSB aligned
|
||||
* 10 bpc, 30 bits per sample image data in a single contiguous buffer.
|
||||
* index 0: Y plane, [31:0] x:Y2:Y1:Y0 [2:10:10:10] little endian
|
||||
* index 1: Cb plane, [31:0] x:Cb2:Cb1:Cb0 [2:10:10:10] little endian
|
||||
* index 2: Cr plane, [31:0] x:Cr2:Cr1:Cr0 [2:10:10:10] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_T430 fourcc_code('T', '4', '3', '0')
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr LSB aligned
|
||||
* In order to use these formats in a similar fashion to MSB aligned ones
|
||||
@@ -451,6 +451,16 @@ extern "C" {
|
||||
#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
|
||||
#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
|
||||
|
||||
/*
|
||||
* Y-only (greyscale) formats
|
||||
*
|
||||
* The Y-only formats are handled similarly to the YCbCr formats in the display
|
||||
* pipeline, with the Cb and Cr implicitly neutral (0.0 in nominal values). This
|
||||
* also means that COLOR_RANGE property applies to the Y-only formats.
|
||||
*/
|
||||
|
||||
#define DRM_FORMAT_Y8 fourcc_code('G', 'R', 'E', 'Y') /* 8-bit Y-only */
|
||||
#define DRM_FORMAT_XYYY2101010 fourcc_code('Y', 'P', 'A', '4') /* [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian */
|
||||
|
||||
/*
|
||||
* Format Modifiers:
|
||||
|
||||
@@ -1,27 +1,10 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
|
||||
* Copyright (c) 2007 Jakob Bornecrantz <wallbraker@gmail.com>
|
||||
* Copyright (c) 2008 Red Hat Inc.
|
||||
* Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
|
||||
* Copyright (c) 2007-2008 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DRM_MODE_H
|
||||
|
||||
@@ -41,6 +41,7 @@ enum {
|
||||
enum {
|
||||
DRM_RAS_CMD_LIST_NODES = 1,
|
||||
DRM_RAS_CMD_GET_ERROR_COUNTER,
|
||||
DRM_RAS_CMD_CLEAR_ERROR_COUNTER,
|
||||
|
||||
__DRM_RAS_CMD_MAX,
|
||||
DRM_RAS_CMD_MAX = (__DRM_RAS_CMD_MAX - 1)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/**
|
||||
* \file drm_sarea.h
|
||||
* \brief SAREA definitions
|
||||
@@ -8,25 +9,6 @@
|
||||
/*
|
||||
* Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DRM_SAREA_H_
|
||||
|
||||
@@ -491,6 +491,52 @@ struct drm_msm_submitqueue_query {
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define MSM_PERFCNTR_STREAM 0x00000001
|
||||
#define MSM_PERFCNTR_UPDATE 0x00000002
|
||||
#define MSM_PERFCNTR_FLAGS ( \
|
||||
MSM_PERFCNTR_STREAM | \
|
||||
MSM_PERFCNTR_UPDATE | \
|
||||
0)
|
||||
|
||||
struct drm_msm_perfcntr_group {
|
||||
char group_name[16];
|
||||
__u32 nr_countables;
|
||||
__u32 pad; /* mbz */
|
||||
__u64 countables; /* pointer to an array of nr_countables u32 */
|
||||
};
|
||||
|
||||
/*
|
||||
* Note, for MSM_PERFCNTR_STREAM, the ioctl returns an fd to read recorded
|
||||
* counters. This only works because the ioctl is DRM_IOW(), if we returned
|
||||
* a out param in the ioctl struct the copy_to_user() (in drm_ioctl())
|
||||
* could fault, causing us to leak the fd.
|
||||
*
|
||||
* If the ioctl returns with error E2BIG, that means more counters/countables
|
||||
* are requested than are currently available. If MSM_PERFCNTR_UPDATE flag
|
||||
* is set, drm_msm_perfcntr_group::nr_countables will be updated to return
|
||||
* the actual # of counters available.
|
||||
*
|
||||
* The data read from the has the following format for each sampling period:
|
||||
*
|
||||
* uint64_t timestamp; // CP_ALWAYS_ON_COUNTER captured at sample time
|
||||
* uint32_t seqno; // increments by 1 each period, reset to 0 on discontinuity
|
||||
* uint32_t mbz; // pad out counters to 64b
|
||||
* struct {
|
||||
* uint64_t counter[nr_countables];
|
||||
* } groups[nr_groups];
|
||||
*
|
||||
* The ordering of groups and counters matches the order in PERFCNTR_CONFIG
|
||||
* ioctl.
|
||||
*/
|
||||
struct drm_msm_perfcntr_config {
|
||||
__u32 flags; /* bitmask of MSM_PERFCNTR_x */
|
||||
__u32 nr_groups; /* # of entries in groups array */
|
||||
__u64 groups; /* pointer to array of drm_msm_perfcntr_group */
|
||||
__u64 period; /* sampling period in ns */
|
||||
__u32 bufsz_shift; /* sample buffer size in bytes is 1<<bufsz_shift */
|
||||
__u32 group_stride; /* sizeof(struct drm_msm_perfcntr_group) */
|
||||
};
|
||||
|
||||
#define DRM_MSM_GET_PARAM 0x00
|
||||
#define DRM_MSM_SET_PARAM 0x01
|
||||
#define DRM_MSM_GEM_NEW 0x02
|
||||
@@ -507,6 +553,7 @@ struct drm_msm_submitqueue_query {
|
||||
#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B
|
||||
#define DRM_MSM_SUBMITQUEUE_QUERY 0x0C
|
||||
#define DRM_MSM_VM_BIND 0x0D
|
||||
#define DRM_MSM_PERFCNTR_CONFIG 0x0E
|
||||
|
||||
#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)
|
||||
@@ -521,6 +568,7 @@ struct drm_msm_submitqueue_query {
|
||||
#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)
|
||||
#define DRM_IOCTL_MSM_PERFCNTR_CONFIG DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_PERFCNTR_CONFIG, struct drm_msm_perfcntr_config)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -304,6 +304,7 @@ struct drm_tegra_cmdbuf {
|
||||
* struct drm_tegra_reloc - GEM object relocation structure
|
||||
*/
|
||||
struct drm_tegra_reloc {
|
||||
/** @cmdbuf: cmd information */
|
||||
struct {
|
||||
/**
|
||||
* @cmdbuf.handle:
|
||||
@@ -321,6 +322,7 @@ struct drm_tegra_reloc {
|
||||
*/
|
||||
__u32 offset;
|
||||
} cmdbuf;
|
||||
/** @target: relocate target information */
|
||||
struct {
|
||||
/**
|
||||
* @target.handle:
|
||||
@@ -778,6 +780,9 @@ struct drm_tegra_channel_unmap {
|
||||
/* Submission */
|
||||
|
||||
/**
|
||||
* define DRM_TEGRA_SUBMIT_RELOC_SECTOR_LAYOUT - \
|
||||
* Select sector layout swizzling for in-memory buffers.
|
||||
*
|
||||
* Specify that bit 39 of the patched-in address should be set to switch
|
||||
* swizzling between Tegra and non-Tegra sector layout on systems that store
|
||||
* surfaces in system memory in non-Tegra sector layout.
|
||||
@@ -830,16 +835,27 @@ struct drm_tegra_submit_buf {
|
||||
};
|
||||
|
||||
/**
|
||||
* define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR - \
|
||||
* Execute Host1x opcodes from user pointer.
|
||||
*
|
||||
* Execute `words` words of Host1x opcodes specified in the `gather_data_ptr`
|
||||
* buffer. Each GATHER_UPTR command uses successive words from the buffer.
|
||||
*/
|
||||
#define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR 0
|
||||
|
||||
/**
|
||||
* define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT - \
|
||||
* Wait for syncpoint (absolute).
|
||||
*
|
||||
* Wait for a syncpoint to reach a value before continuing with further
|
||||
* commands.
|
||||
*/
|
||||
#define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT 1
|
||||
|
||||
/**
|
||||
* define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT_RELATIVE - \
|
||||
* Wait for syncpoint (relative).
|
||||
*
|
||||
* Wait for a syncpoint to reach a value before continuing with further
|
||||
* commands. The threshold is calculated relative to the start of the job.
|
||||
*/
|
||||
|
||||
@@ -98,6 +98,7 @@ struct drm_virtgpu_execbuffer {
|
||||
#define VIRTGPU_PARAM_CONTEXT_INIT 6 /* DRM_VIRTGPU_CONTEXT_INIT */
|
||||
#define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs 7 /* Bitmask of supported capability set ids */
|
||||
#define VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME 8 /* Ability to set debug name from userspace */
|
||||
#define VIRTGPU_PARAM_BLOB_ALIGNMENT 9 /* Device alignment requirements for blobs */
|
||||
|
||||
struct drm_virtgpu_getparam {
|
||||
__u64 param;
|
||||
@@ -200,6 +201,10 @@ struct drm_virtgpu_resource_create_blob {
|
||||
__u32 cmd_size;
|
||||
__u64 cmd;
|
||||
__u64 blob_id;
|
||||
|
||||
#define DRM_VIRTGPU_BLOB_FLAG_HINT_DEFER_MAPPING 0x0001
|
||||
__u32 blob_hints;
|
||||
__u32 pad2;
|
||||
};
|
||||
|
||||
#define VIRTGPU_CONTEXT_PARAM_CAPSET_ID 0x0001
|
||||
|
||||
@@ -83,6 +83,7 @@ extern "C" {
|
||||
* - &DRM_IOCTL_XE_OBSERVATION
|
||||
* - &DRM_IOCTL_XE_MADVISE
|
||||
* - &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
|
||||
* - &DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY
|
||||
* - &DRM_IOCTL_XE_VM_GET_PROPERTY
|
||||
*/
|
||||
|
||||
@@ -167,7 +168,7 @@ extern "C" {
|
||||
* Typically the struct drm_xe_user_extension would be embedded in some uAPI
|
||||
* struct, and in this case we would feed it the head of the chain(i.e ext1),
|
||||
* which would then apply all of the above extensions.
|
||||
*/
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct drm_xe_user_extension - Base class for defining a chain of extensions
|
||||
@@ -229,9 +230,9 @@ struct drm_xe_ext_set_property {
|
||||
/**
|
||||
* struct drm_xe_engine_class_instance - instance of an engine class
|
||||
*
|
||||
* It is returned as part of the @drm_xe_engine, but it also is used as
|
||||
* the input of engine selection for both @drm_xe_exec_queue_create and
|
||||
* @drm_xe_query_engine_cycles
|
||||
* It is returned as part of the &struct drm_xe_engine, but it also is used as
|
||||
* the input of engine selection for both &struct drm_xe_exec_queue_create and
|
||||
* &struct drm_xe_query_engine_cycles
|
||||
*
|
||||
* The @engine_class can be:
|
||||
* - %DRM_XE_ENGINE_CLASS_RENDER
|
||||
@@ -264,7 +265,7 @@ struct drm_xe_engine_class_instance {
|
||||
* struct drm_xe_engine - describe hardware engine
|
||||
*/
|
||||
struct drm_xe_engine {
|
||||
/** @instance: The @drm_xe_engine_class_instance */
|
||||
/** @instance: The &struct drm_xe_engine_class_instance */
|
||||
struct drm_xe_engine_class_instance instance;
|
||||
|
||||
/** @reserved: Reserved */
|
||||
@@ -274,9 +275,9 @@ struct drm_xe_engine {
|
||||
/**
|
||||
* struct drm_xe_query_engines - describe engines
|
||||
*
|
||||
* If a query is made with a struct @drm_xe_device_query where .query
|
||||
* If a query is made with a &struct drm_xe_device_query where .query
|
||||
* is equal to %DRM_XE_DEVICE_QUERY_ENGINES, then the reply uses an array of
|
||||
* struct @drm_xe_query_engines in .data.
|
||||
* &struct drm_xe_query_engines in .data.
|
||||
*/
|
||||
struct drm_xe_query_engines {
|
||||
/** @num_engines: number of engines returned in @engines */
|
||||
@@ -349,7 +350,7 @@ struct drm_xe_mem_region {
|
||||
* is smaller than @total_size then this is referred to as a
|
||||
* small BAR system.
|
||||
*
|
||||
* On systems without small BAR (full BAR), the probed_size will
|
||||
* On systems without small BAR (full BAR), the @cpu_visible_size will
|
||||
* always equal the @total_size, since all of it will be CPU
|
||||
* accessible.
|
||||
*
|
||||
@@ -410,7 +411,7 @@ struct drm_xe_query_mem_regions {
|
||||
* device supports the userspace hint %DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION.
|
||||
* This is exposed only on Xe2+.
|
||||
* - %DRM_XE_QUERY_CONFIG_FLAG_HAS_DISABLE_STATE_CACHE_PERF_FIX - Flag is set
|
||||
* if a queue can be creaed with
|
||||
* if a queue can be created with
|
||||
* %DRM_XE_EXEC_QUEUE_SET_DISABLE_STATE_CACHE_PERF_FIX
|
||||
* - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment
|
||||
* required by this device, typically SZ_4K or SZ_64K
|
||||
@@ -705,7 +706,10 @@ struct drm_xe_query_pxp_status {
|
||||
* attributes.
|
||||
* - %DRM_XE_DEVICE_QUERY_GT_TOPOLOGY
|
||||
* - %DRM_XE_DEVICE_QUERY_ENGINE_CYCLES
|
||||
* - %DRM_XE_DEVICE_QUERY_UC_FW_VERSION
|
||||
* - %DRM_XE_DEVICE_QUERY_OA_UNITS
|
||||
* - %DRM_XE_DEVICE_QUERY_PXP_STATUS
|
||||
* - %DRM_XE_DEVICE_QUERY_EU_STALL
|
||||
*
|
||||
* If size is set to 0, the driver fills it with the required size for
|
||||
* the requested type of data to query. If size is equal to the required
|
||||
@@ -825,7 +829,7 @@ struct drm_xe_device_query {
|
||||
*
|
||||
* This ioctl supports setting the following properties via the
|
||||
* %DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY extension, which uses the
|
||||
* generic @drm_xe_ext_set_property struct:
|
||||
* generic &struct drm_xe_ext_set_property:
|
||||
*
|
||||
* - %DRM_XE_GEM_CREATE_SET_PROPERTY_PXP_TYPE - set the type of PXP session
|
||||
* this object will be used with. Valid values are listed in enum
|
||||
@@ -862,8 +866,7 @@ struct drm_xe_gem_create {
|
||||
#define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2)
|
||||
#define DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION (1 << 3)
|
||||
/**
|
||||
* @flags: Flags, currently a mask of memory instances of where BO can
|
||||
* be placed
|
||||
* @flags: Flags for the GEM object, see DRM_XE_GEM_CREATE_FLAG_*
|
||||
*/
|
||||
__u32 flags;
|
||||
|
||||
@@ -888,7 +891,7 @@ struct drm_xe_gem_create {
|
||||
#define DRM_XE_GEM_CPU_CACHING_WC 2
|
||||
/**
|
||||
* @cpu_caching: The CPU caching mode to select for this object. If
|
||||
* mmaping the object the mode selected here will also be used. The
|
||||
* mmapping the object the mode selected here will also be used. The
|
||||
* exception is when mapping system memory (including data evicted
|
||||
* to system) on discrete GPUs. The caching mode selected will
|
||||
* then be overridden to DRM_XE_GEM_CPU_CACHING_WB, and coherency
|
||||
@@ -931,7 +934,7 @@ struct drm_xe_gem_create {
|
||||
*
|
||||
* err = ioctl(fd, DRM_IOCTL_XE_GEM_MMAP_OFFSET, &mmo);
|
||||
* map = mmap(NULL, size, PROT_WRITE, MAP_SHARED, fd, mmo.offset);
|
||||
* map[i] = 0xdeadbeaf; // issue barrier
|
||||
* map[i] = 0xdeadbeef; // issue barrier
|
||||
*/
|
||||
struct drm_xe_gem_mmap_offset {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
@@ -958,8 +961,8 @@ struct drm_xe_gem_mmap_offset {
|
||||
* - %DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE - Map the whole virtual address
|
||||
* space of the VM to scratch page. A vm_bind would overwrite the scratch
|
||||
* page mapping. This flag is mutually exclusive with the
|
||||
* %DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception of on x2 and
|
||||
* xe3 platform.
|
||||
* %DRM_XE_VM_CREATE_FLAG_FAULT_MODE flag, with an exception on Xe2 and
|
||||
* Xe3 platforms.
|
||||
* - %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
|
||||
@@ -1045,7 +1048,7 @@ struct drm_xe_vm_destroy {
|
||||
* set, no mappings are created rather the range is reserved for CPU address
|
||||
* mirroring which will be populated on GPU page faults or prefetches. Only
|
||||
* valid on VMs with DRM_XE_VM_CREATE_FLAG_FAULT_MODE set. The CPU address
|
||||
* mirror flag are only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
|
||||
* mirror flag is only valid for DRM_XE_VM_BIND_OP_MAP operations, the BO
|
||||
* handle MBZ, and the BO offset MBZ.
|
||||
* - %DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET - Can be used in combination with
|
||||
* %DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR to reset madvises when the underlying
|
||||
@@ -1061,6 +1064,7 @@ struct drm_xe_vm_destroy {
|
||||
* not invoke autoreset. Neither will stack variables going out of scope.
|
||||
* Therefore it's recommended to always explicitly reset the madvises when
|
||||
* freeing the memory backing a region used in a &DRM_IOCTL_XE_MADVISE call.
|
||||
*
|
||||
* - %DRM_XE_VM_BIND_FLAG_DECOMPRESS - Request on-device decompression for a MAP.
|
||||
* When set on a MAP bind operation, request the driver schedule an on-device
|
||||
* in-place decompression (via the migrate/resolve path) for the GPU mapping
|
||||
@@ -1109,7 +1113,7 @@ struct drm_xe_vm_bind_op {
|
||||
* ppGTT WT -> COH_NONE
|
||||
* ppGTT WB -> COH_AT_LEAST_1WAY
|
||||
*
|
||||
* In practice UC/WC/WT should only ever used for scanout surfaces on
|
||||
* In practice UC/WC/WT should only ever be used for scanout surfaces on
|
||||
* such platforms (or perhaps in general for dma-buf if shared with
|
||||
* another device) since it is only the display engine that is actually
|
||||
* incoherent. Everything else should typically use WB given that we
|
||||
@@ -1199,10 +1203,10 @@ struct drm_xe_vm_bind_op {
|
||||
/**
|
||||
* struct drm_xe_vm_bind - Input of &DRM_IOCTL_XE_VM_BIND
|
||||
*
|
||||
* Below is an example of a minimal use of @drm_xe_vm_bind to
|
||||
* Below is an example of a minimal use of &struct drm_xe_vm_bind to
|
||||
* asynchronously bind the buffer `data` at address `BIND_ADDRESS` to
|
||||
* illustrate `userptr`. It can be synchronized by using the example
|
||||
* provided for @drm_xe_sync.
|
||||
* provided for &struct drm_xe_sync.
|
||||
*
|
||||
* .. code-block:: C
|
||||
*
|
||||
@@ -1355,7 +1359,7 @@ struct drm_xe_vm_get_property {
|
||||
*
|
||||
* This ioctl supports setting the following properties via the
|
||||
* %DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY extension, which uses the
|
||||
* generic @drm_xe_ext_set_property struct:
|
||||
* generic &struct drm_xe_ext_set_property:
|
||||
*
|
||||
* - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY - set the queue priority.
|
||||
* CAP_SYS_NICE is required to set a value above normal.
|
||||
@@ -1366,7 +1370,7 @@ struct drm_xe_vm_get_property {
|
||||
* drm_xe_pxp_session_type. %DRM_XE_PXP_TYPE_NONE is the default behavior, so
|
||||
* there is no need to explicitly set that. When a queue of type
|
||||
* %DRM_XE_PXP_TYPE_HWDRM is created, the PXP default HWDRM session
|
||||
* (%XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if isn't already running.
|
||||
* (%DRM_XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if it isn't already running.
|
||||
* The user is expected to query the PXP status via the query ioctl (see
|
||||
* %DRM_XE_DEVICE_QUERY_PXP_STATUS) and to wait for PXP to be ready before
|
||||
* attempting to create a queue with this property. When a queue is created
|
||||
@@ -1390,9 +1394,9 @@ struct drm_xe_vm_get_property {
|
||||
* enable render color cache keying on BTP+BTI instead of just BTI
|
||||
* (only valid for render queues).
|
||||
*
|
||||
* The example below shows how to use @drm_xe_exec_queue_create to create
|
||||
* The example below shows how to use &struct drm_xe_exec_queue_create to create
|
||||
* a simple exec_queue (no parallel submission) of class
|
||||
* &DRM_XE_ENGINE_CLASS_RENDER.
|
||||
* %DRM_XE_ENGINE_CLASS_RENDER.
|
||||
*
|
||||
* .. code-block:: C
|
||||
*
|
||||
@@ -1402,23 +1406,25 @@ struct drm_xe_vm_get_property {
|
||||
* struct drm_xe_exec_queue_create exec_queue_create = {
|
||||
* .extensions = 0,
|
||||
* .vm_id = vm,
|
||||
* .num_bb_per_exec = 1,
|
||||
* .num_eng_per_bb = 1,
|
||||
* .width = 1,
|
||||
* .num_placements = 1,
|
||||
* .instances = to_user_pointer(&instance),
|
||||
* };
|
||||
* ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create);
|
||||
*
|
||||
* Allow users to provide a hint to kernel for cases demanding low latency
|
||||
* profile. Please note it will have impact on power consumption. User can
|
||||
* indicate low latency hint with flag while creating exec queue as
|
||||
* mentioned below,
|
||||
* Allow users to provide a hint to kernel for cases demanding low latency
|
||||
* profile. Please note it will have impact on power consumption. User can
|
||||
* indicate low latency hint with flag while creating exec queue as
|
||||
* mentioned below:
|
||||
*
|
||||
* .. code-block:: C
|
||||
*
|
||||
* struct drm_xe_exec_queue_create exec_queue_create = {
|
||||
* .flags = DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT,
|
||||
* .extensions = 0,
|
||||
* .vm_id = vm,
|
||||
* .num_bb_per_exec = 1,
|
||||
* .num_eng_per_bb = 1,
|
||||
* .width = 1,
|
||||
* .num_placements = 1,
|
||||
* .instances = to_user_pointer(&instance),
|
||||
* };
|
||||
* ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create);
|
||||
@@ -1515,7 +1521,7 @@ struct drm_xe_exec_queue_get_property {
|
||||
* and the @flags can be:
|
||||
* - %DRM_XE_SYNC_FLAG_SIGNAL
|
||||
*
|
||||
* A minimal use of @drm_xe_sync looks like this:
|
||||
* A minimal use of &struct drm_xe_sync looks like this:
|
||||
*
|
||||
* .. code-block:: C
|
||||
*
|
||||
@@ -1546,7 +1552,7 @@ struct drm_xe_sync {
|
||||
#define DRM_XE_SYNC_TYPE_SYNCOBJ 0x0
|
||||
#define DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ 0x1
|
||||
#define DRM_XE_SYNC_TYPE_USER_FENCE 0x2
|
||||
/** @type: Type of the this sync object */
|
||||
/** @type: Type of this sync object */
|
||||
__u32 type;
|
||||
|
||||
#define DRM_XE_SYNC_FLAG_SIGNAL (1 << 0)
|
||||
@@ -1559,9 +1565,9 @@ struct drm_xe_sync {
|
||||
|
||||
/**
|
||||
* @addr: Address of user fence. When sync is passed in via exec
|
||||
* IOCTL this is a GPU address in the VM. When sync passed in via
|
||||
* IOCTL this is a GPU address in the VM. When sync is passed in via
|
||||
* VM bind IOCTL this is a user pointer. In either case, it is
|
||||
* the users responsibility that this address is present and
|
||||
* the user's responsibility that this address is present and
|
||||
* mapped when the user fence is signalled. Must be qword
|
||||
* aligned.
|
||||
*/
|
||||
@@ -1581,10 +1587,10 @@ struct drm_xe_sync {
|
||||
/**
|
||||
* struct drm_xe_exec - Input of &DRM_IOCTL_XE_EXEC
|
||||
*
|
||||
* This is an example to use @drm_xe_exec for execution of the object
|
||||
* at BIND_ADDRESS (see example in @drm_xe_vm_bind) by an exec_queue
|
||||
* (see example in @drm_xe_exec_queue_create). It can be synchronized
|
||||
* by using the example provided for @drm_xe_sync.
|
||||
* This is an example to use &struct drm_xe_exec for execution of the object
|
||||
* at BIND_ADDRESS (see example in &struct drm_xe_vm_bind) by an exec_queue
|
||||
* (see example in &struct drm_xe_exec_queue_create). It can be synchronized
|
||||
* by using the example provided for &struct drm_xe_sync.
|
||||
*
|
||||
* .. code-block:: C
|
||||
*
|
||||
@@ -1651,7 +1657,6 @@ struct drm_xe_exec {
|
||||
*
|
||||
* and the @flags can be:
|
||||
* - %DRM_XE_UFENCE_WAIT_FLAG_ABSTIME
|
||||
* - %DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP
|
||||
*
|
||||
* The @mask values can be for example:
|
||||
* - 0xffu for u8
|
||||
@@ -1664,7 +1669,7 @@ struct drm_xe_wait_user_fence {
|
||||
__u64 extensions;
|
||||
|
||||
/**
|
||||
* @addr: user pointer address to wait on, must qword aligned
|
||||
* @addr: user pointer address to wait on, must be qword aligned
|
||||
*/
|
||||
__u64 addr;
|
||||
|
||||
@@ -1695,9 +1700,9 @@ struct drm_xe_wait_user_fence {
|
||||
* Without DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag set (relative timeout)
|
||||
* it contains timeout expressed in nanoseconds to wait (fence will
|
||||
* expire at now() + timeout).
|
||||
* When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flat is set (absolute timeout) wait
|
||||
* will end at timeout (uses system MONOTONIC_CLOCK).
|
||||
* Passing negative timeout leads to neverending wait.
|
||||
* When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag is set (absolute timeout) wait
|
||||
* will end at timeout (uses system CLOCK_MONOTONIC).
|
||||
* Passing negative timeout leads to never ending wait.
|
||||
*
|
||||
* On relative timeout this value is updated with timeout left
|
||||
* (for restarting the call in case of signal delivery).
|
||||
@@ -1741,7 +1746,7 @@ enum drm_xe_observation_op {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_xe_observation_param - Input of &DRM_XE_OBSERVATION
|
||||
* struct drm_xe_observation_param - Input of &DRM_IOCTL_XE_OBSERVATION
|
||||
*
|
||||
* The observation layer enables multiplexing observation streams of
|
||||
* multiple types. The actual params for a particular stream operation are
|
||||
@@ -1751,25 +1756,25 @@ enum drm_xe_observation_op {
|
||||
struct drm_xe_observation_param {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
__u64 extensions;
|
||||
/** @observation_type: observation stream type, of enum @drm_xe_observation_type */
|
||||
/** @observation_type: observation stream type, of &enum drm_xe_observation_type */
|
||||
__u64 observation_type;
|
||||
/** @observation_op: observation stream op, of enum @drm_xe_observation_op */
|
||||
/** @observation_op: observation stream op, of &enum drm_xe_observation_op */
|
||||
__u64 observation_op;
|
||||
/** @param: Pointer to actual stream params */
|
||||
__u64 param;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum drm_xe_observation_ioctls - Observation stream fd ioctl's
|
||||
* enum drm_xe_observation_ioctls - Observation stream fd ioctls
|
||||
*
|
||||
* Information exchanged between userspace and kernel for observation fd
|
||||
* ioctl's is stream type specific
|
||||
* ioctls is stream type specific
|
||||
*/
|
||||
enum drm_xe_observation_ioctls {
|
||||
/** @DRM_XE_OBSERVATION_IOCTL_ENABLE: Enable data capture for an observation stream */
|
||||
DRM_XE_OBSERVATION_IOCTL_ENABLE = _IO('i', 0x0),
|
||||
|
||||
/** @DRM_XE_OBSERVATION_IOCTL_DISABLE: Disable data capture for a observation stream */
|
||||
/** @DRM_XE_OBSERVATION_IOCTL_DISABLE: Disable data capture for an observation stream */
|
||||
DRM_XE_OBSERVATION_IOCTL_DISABLE = _IO('i', 0x1),
|
||||
|
||||
/** @DRM_XE_OBSERVATION_IOCTL_CONFIG: Change observation stream configuration */
|
||||
@@ -1812,7 +1817,7 @@ struct drm_xe_oa_unit {
|
||||
/** @oa_unit_id: OA unit ID */
|
||||
__u32 oa_unit_id;
|
||||
|
||||
/** @oa_unit_type: OA unit type of @drm_xe_oa_unit_type */
|
||||
/** @oa_unit_type: OA unit type of &enum drm_xe_oa_unit_type */
|
||||
__u32 oa_unit_type;
|
||||
|
||||
/** @capabilities: OA capabilities bit-mask */
|
||||
@@ -1875,7 +1880,7 @@ struct drm_xe_query_oa_units {
|
||||
/** @pad: MBZ */
|
||||
__u32 pad;
|
||||
/**
|
||||
* @oa_units: struct @drm_xe_oa_unit array returned for this device.
|
||||
* @oa_units: &struct drm_xe_oa_unit array returned for this device.
|
||||
* Written below as a u64 array to avoid problems with nested flexible
|
||||
* arrays with some compilers
|
||||
*/
|
||||
@@ -1902,24 +1907,24 @@ enum drm_xe_oa_format_type {
|
||||
};
|
||||
|
||||
/**
|
||||
* enum drm_xe_oa_property_id - OA stream property id's
|
||||
* enum drm_xe_oa_property_id - OA stream property IDs
|
||||
*
|
||||
* Stream params are specified as a chain of @drm_xe_ext_set_property
|
||||
* struct's, with @property values from enum @drm_xe_oa_property_id and
|
||||
* @drm_xe_user_extension base.name set to @DRM_XE_OA_EXTENSION_SET_PROPERTY.
|
||||
* @param field in struct @drm_xe_observation_param points to the first
|
||||
* @drm_xe_ext_set_property struct.
|
||||
* Stream params are specified as a chain of &struct drm_xe_ext_set_property
|
||||
* structs, with property values from &enum drm_xe_oa_property_id and
|
||||
* &struct drm_xe_user_extension base.name set to %DRM_XE_OA_EXTENSION_SET_PROPERTY.
|
||||
* The param field in &struct drm_xe_observation_param points to the first
|
||||
* &struct drm_xe_ext_set_property struct.
|
||||
*
|
||||
* Exactly the same mechanism is also used for stream reconfiguration using the
|
||||
* @DRM_XE_OBSERVATION_IOCTL_CONFIG observation stream fd ioctl, though only a
|
||||
* %DRM_XE_OBSERVATION_IOCTL_CONFIG observation stream fd ioctl, though only a
|
||||
* subset of properties below can be specified for stream reconfiguration.
|
||||
*/
|
||||
enum drm_xe_oa_property_id {
|
||||
#define DRM_XE_OA_EXTENSION_SET_PROPERTY 0
|
||||
/**
|
||||
* @DRM_XE_OA_PROPERTY_OA_UNIT_ID: ID of the OA unit on which to open
|
||||
* the OA stream, see @oa_unit_id in 'struct
|
||||
* drm_xe_query_oa_units'. Defaults to 0 if not provided.
|
||||
* the OA stream, see oa_unit_id in &struct drm_xe_oa_unit.
|
||||
* Defaults to 0 if not provided.
|
||||
*/
|
||||
DRM_XE_OA_PROPERTY_OA_UNIT_ID = 1,
|
||||
|
||||
@@ -1932,7 +1937,7 @@ enum drm_xe_oa_property_id {
|
||||
|
||||
/**
|
||||
* @DRM_XE_OA_PROPERTY_OA_METRIC_SET: OA metrics defining contents of OA
|
||||
* reports, previously added via @DRM_XE_OBSERVATION_OP_ADD_CONFIG.
|
||||
* reports, previously added via %DRM_XE_OBSERVATION_OP_ADD_CONFIG.
|
||||
*/
|
||||
DRM_XE_OA_PROPERTY_OA_METRIC_SET,
|
||||
|
||||
@@ -1940,7 +1945,7 @@ enum drm_xe_oa_property_id {
|
||||
DRM_XE_OA_PROPERTY_OA_FORMAT,
|
||||
/*
|
||||
* OA_FORMAT's are specified the same way as in PRM/Bspec 52198/60942,
|
||||
* in terms of the following quantities: a. enum @drm_xe_oa_format_type
|
||||
* in terms of the following quantities: a. &enum drm_xe_oa_format_type
|
||||
* b. Counter select c. Counter size and d. BC report. Also refer to the
|
||||
* oa_formats array in drivers/gpu/drm/xe/xe_oa.c.
|
||||
*/
|
||||
@@ -1957,19 +1962,19 @@ enum drm_xe_oa_property_id {
|
||||
|
||||
/**
|
||||
* @DRM_XE_OA_PROPERTY_OA_DISABLED: A value of 1 will open the OA
|
||||
* stream in a DISABLED state (see @DRM_XE_OBSERVATION_IOCTL_ENABLE).
|
||||
* stream in a DISABLED state (see %DRM_XE_OBSERVATION_IOCTL_ENABLE).
|
||||
*/
|
||||
DRM_XE_OA_PROPERTY_OA_DISABLED,
|
||||
|
||||
/**
|
||||
* @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID: Open the stream for a specific
|
||||
* @exec_queue_id. OA queries can be executed on this exec queue.
|
||||
* exec_queue_id. OA queries can be executed on this exec queue.
|
||||
*/
|
||||
DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID,
|
||||
|
||||
/**
|
||||
* @DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE: Optional engine instance to
|
||||
* pass along with @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
|
||||
* pass along with %DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
|
||||
*/
|
||||
DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE,
|
||||
|
||||
@@ -1981,16 +1986,16 @@ enum drm_xe_oa_property_id {
|
||||
|
||||
/**
|
||||
* @DRM_XE_OA_PROPERTY_NUM_SYNCS: Number of syncs in the sync array
|
||||
* specified in @DRM_XE_OA_PROPERTY_SYNCS
|
||||
* specified in %DRM_XE_OA_PROPERTY_SYNCS
|
||||
*/
|
||||
DRM_XE_OA_PROPERTY_NUM_SYNCS,
|
||||
|
||||
/**
|
||||
* @DRM_XE_OA_PROPERTY_SYNCS: Pointer to struct @drm_xe_sync array
|
||||
* with array size specified via @DRM_XE_OA_PROPERTY_NUM_SYNCS. OA
|
||||
* @DRM_XE_OA_PROPERTY_SYNCS: Pointer to &struct drm_xe_sync array
|
||||
* with array size specified via %DRM_XE_OA_PROPERTY_NUM_SYNCS. OA
|
||||
* configuration will wait till input fences signal. Output fences
|
||||
* will signal after the new OA configuration takes effect. For
|
||||
* @DRM_XE_SYNC_TYPE_USER_FENCE, @addr is a user pointer, similar
|
||||
* %DRM_XE_SYNC_TYPE_USER_FENCE, addr is a user pointer, similar
|
||||
* to the VM bind case.
|
||||
*/
|
||||
DRM_XE_OA_PROPERTY_SYNCS,
|
||||
@@ -2013,15 +2018,15 @@ enum drm_xe_oa_property_id {
|
||||
/**
|
||||
* struct drm_xe_oa_config - OA metric configuration
|
||||
*
|
||||
* Multiple OA configs can be added using @DRM_XE_OBSERVATION_OP_ADD_CONFIG. A
|
||||
* Multiple OA configs can be added using %DRM_XE_OBSERVATION_OP_ADD_CONFIG. A
|
||||
* particular config can be specified when opening an OA stream using
|
||||
* @DRM_XE_OA_PROPERTY_OA_METRIC_SET property.
|
||||
* %DRM_XE_OA_PROPERTY_OA_METRIC_SET property.
|
||||
*/
|
||||
struct drm_xe_oa_config {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
__u64 extensions;
|
||||
|
||||
/** @uuid: String formatted like "%\08x-%\04x-%\04x-%\04x-%\012x" */
|
||||
/** @uuid: String formatted like "%08x-%04x-%04x-%04x-%012x" */
|
||||
char uuid[36];
|
||||
|
||||
/** @n_regs: Number of regs in @regs_ptr */
|
||||
@@ -2036,7 +2041,7 @@ struct drm_xe_oa_config {
|
||||
|
||||
/**
|
||||
* struct drm_xe_oa_stream_status - OA stream status returned from
|
||||
* @DRM_XE_OBSERVATION_IOCTL_STATUS observation stream fd ioctl. Userspace can
|
||||
* %DRM_XE_OBSERVATION_IOCTL_STATUS observation stream fd ioctl. Userspace can
|
||||
* call the ioctl to query stream status in response to EIO errno from
|
||||
* observation fd read().
|
||||
*/
|
||||
@@ -2057,7 +2062,7 @@ struct drm_xe_oa_stream_status {
|
||||
|
||||
/**
|
||||
* struct drm_xe_oa_stream_info - OA stream info returned from
|
||||
* @DRM_XE_OBSERVATION_IOCTL_INFO observation stream fd ioctl
|
||||
* %DRM_XE_OBSERVATION_IOCTL_INFO observation stream fd ioctl
|
||||
*/
|
||||
struct drm_xe_oa_stream_info {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
@@ -2094,27 +2099,27 @@ enum drm_xe_pxp_session_type {
|
||||
* enum drm_xe_eu_stall_property_id - EU stall sampling input property ids.
|
||||
*
|
||||
* These properties are passed to the driver at open as a chain of
|
||||
* @drm_xe_ext_set_property structures with @property set to these
|
||||
* properties' enums and @value set to the corresponding values of these
|
||||
* properties. @drm_xe_user_extension base.name should be set to
|
||||
* @DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY.
|
||||
* &struct drm_xe_ext_set_property structures with property set to these
|
||||
* properties' enums and value set to the corresponding values of these
|
||||
* properties. &struct drm_xe_user_extension base.name should be set to
|
||||
* %DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY.
|
||||
*
|
||||
* With the file descriptor obtained from open, user space must enable
|
||||
* the EU stall stream fd with @DRM_XE_OBSERVATION_IOCTL_ENABLE before
|
||||
* the EU stall stream fd with %DRM_XE_OBSERVATION_IOCTL_ENABLE before
|
||||
* calling read(). EIO errno from read() indicates HW dropped data
|
||||
* due to full buffer.
|
||||
*/
|
||||
enum drm_xe_eu_stall_property_id {
|
||||
#define DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY 0
|
||||
/**
|
||||
* @DRM_XE_EU_STALL_PROP_GT_ID: @gt_id of the GT on which
|
||||
* @DRM_XE_EU_STALL_PROP_GT_ID: gt_id of the GT on which
|
||||
* EU stall data will be captured.
|
||||
*/
|
||||
DRM_XE_EU_STALL_PROP_GT_ID = 1,
|
||||
|
||||
/**
|
||||
* @DRM_XE_EU_STALL_PROP_SAMPLE_RATE: Sampling rate in
|
||||
* GPU cycles from @sampling_rates in struct @drm_xe_query_eu_stall
|
||||
* GPU cycles from sampling_rates in &struct drm_xe_query_eu_stall
|
||||
*/
|
||||
DRM_XE_EU_STALL_PROP_SAMPLE_RATE,
|
||||
|
||||
@@ -2129,9 +2134,9 @@ enum drm_xe_eu_stall_property_id {
|
||||
/**
|
||||
* struct drm_xe_query_eu_stall - Information about EU stall sampling.
|
||||
*
|
||||
* If a query is made with a struct @drm_xe_device_query where .query
|
||||
* is equal to @DRM_XE_DEVICE_QUERY_EU_STALL, then the reply uses
|
||||
* struct @drm_xe_query_eu_stall in .data.
|
||||
* If a query is made with a &struct drm_xe_device_query where .query
|
||||
* is equal to %DRM_XE_DEVICE_QUERY_EU_STALL, then the reply uses
|
||||
* &struct drm_xe_query_eu_stall in .data.
|
||||
*/
|
||||
struct drm_xe_query_eu_stall {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
@@ -2183,7 +2188,7 @@ struct drm_xe_query_eu_stall {
|
||||
* .start = 0x100000,
|
||||
* .range = 0x2000,
|
||||
* .type = DRM_XE_MEM_RANGE_ATTR_ATOMIC,
|
||||
* .atomic_val = DRM_XE_ATOMIC_DEVICE,
|
||||
* .atomic.val = DRM_XE_ATOMIC_DEVICE,
|
||||
* };
|
||||
*
|
||||
* ioctl(fd, DRM_IOCTL_XE_MADVISE, &madvise);
|
||||
@@ -2242,7 +2247,7 @@ struct drm_xe_madvise {
|
||||
|
||||
/**
|
||||
* @preferred_mem_loc.region_instance : Region instance.
|
||||
* MBZ if @devmem_fd <= &DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE.
|
||||
* MBZ if @devmem_fd <= %DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE.
|
||||
* Otherwise should point to the desired device
|
||||
* VRAM instance of the device indicated by
|
||||
* @preferred_mem_loc.devmem_fd.
|
||||
@@ -2369,24 +2374,19 @@ struct drm_xe_madvise {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS
|
||||
* struct drm_xe_mem_range_attr - Output of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
|
||||
*
|
||||
* This structure is provided by userspace and filled by KMD in response to the
|
||||
* DRM_IOCTL_XE_VM_QUERY_MEM_RANGES_ATTRS ioctl. It describes memory attributes of
|
||||
* a memory ranges within a user specified address range in a VM.
|
||||
* DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS ioctl. It describes memory attributes of
|
||||
* memory ranges within a user specified address range in a VM.
|
||||
*
|
||||
* The structure includes information such as atomic access policy,
|
||||
* page attribute table (PAT) index, and preferred memory location.
|
||||
* Userspace allocates an array of these structures and passes a pointer to the
|
||||
* ioctl to retrieve attributes for each memory ranges
|
||||
*
|
||||
* @extensions: Pointer to the first extension struct, if any
|
||||
* @start: Start address of the memory range
|
||||
* @end: End address of the virtual memory range
|
||||
*
|
||||
* ioctl to retrieve attributes for each memory range.
|
||||
*/
|
||||
struct drm_xe_mem_range_attr {
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
/** @extensions: Pointer to the first extension struct, if any */
|
||||
__u64 extensions;
|
||||
|
||||
/** @start: start of the memory range */
|
||||
@@ -2413,7 +2413,7 @@ struct drm_xe_mem_range_attr {
|
||||
__u32 reserved;
|
||||
} atomic;
|
||||
|
||||
/** @pat_index: Page attribute table index */
|
||||
/** @pat_index: Page attribute table index */
|
||||
struct {
|
||||
/** @pat_index.val: PAT index */
|
||||
__u32 val;
|
||||
@@ -2427,7 +2427,7 @@ struct drm_xe_mem_range_attr {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_ATTRIBUTES
|
||||
* struct drm_xe_vm_query_mem_range_attr - Input of &DRM_IOCTL_XE_VM_QUERY_MEM_RANGE_ATTRS
|
||||
*
|
||||
* This structure is used to query memory attributes of memory regions
|
||||
* within a user specified address range in a VM. It provides detailed
|
||||
@@ -2435,15 +2435,15 @@ struct drm_xe_mem_range_attr {
|
||||
* page attribute table (PAT) index, and preferred memory location.
|
||||
*
|
||||
* Userspace first calls the ioctl with @num_mem_ranges = 0,
|
||||
* @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL to retrieve
|
||||
* @sizeof_mem_range_attr = 0 and @vector_of_mem_attr = NULL to retrieve
|
||||
* the number of memory regions and size of each memory range attribute.
|
||||
* Then, it allocates a buffer of that size and calls the ioctl again to fill
|
||||
* the buffer with memory range attributes.
|
||||
*
|
||||
* If second call fails with -ENOSPC, it means memory ranges changed between
|
||||
* first call and now, retry IOCTL again with @num_mem_ranges = 0,
|
||||
* @sizeof_mem_ranges_attr = 0 and @vector_of_vma_mem_attr = NULL followed by
|
||||
* Second ioctl call.
|
||||
* @sizeof_mem_range_attr = 0 and @vector_of_mem_attr = NULL followed by
|
||||
* second ioctl call.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
|
||||
@@ -48,9 +48,10 @@
|
||||
* - 1.20 - Trap handler support for expert scheduling mode available
|
||||
* - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions
|
||||
* - 1.22 - Add queue creation with metadata ring base address
|
||||
* - 1.23 - Add profiler control ioctl to enable/disable profiler on a process
|
||||
*/
|
||||
#define KFD_IOCTL_MAJOR_VERSION 1
|
||||
#define KFD_IOCTL_MINOR_VERSION 22
|
||||
#define KFD_IOCTL_MINOR_VERSION 23
|
||||
|
||||
struct kfd_ioctl_get_version_args {
|
||||
__u32 major_version; /* from KFD */
|
||||
@@ -1558,6 +1559,36 @@ struct kfd_ioctl_dbg_trap_args {
|
||||
};
|
||||
};
|
||||
|
||||
#define KFD_IOC_PROFILER_VERSION_NUM 1
|
||||
enum kfd_profiler_ops {
|
||||
KFD_IOC_PROFILER_PMC = 0,
|
||||
KFD_IOC_PROFILER_VERSION = 2,
|
||||
KFD_IOC_PROFILER_PTL_CONTROL = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* Enables/Disables GPU Specific profiler settings
|
||||
*/
|
||||
struct kfd_ioctl_pmc_settings {
|
||||
__u32 gpu_id; /* This is the user_gpu_id */
|
||||
__u32 lock; /* Lock GPU for Profiling */
|
||||
__u32 perfcount_enable; /* Force Perfcount Enable for queues on GPU */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_ptl_control {
|
||||
__u32 gpu_id; /* user_gpu_id */
|
||||
__u32 enable; /* set 1 to enable PTL, set 0 to disable PTL */
|
||||
};
|
||||
|
||||
struct kfd_ioctl_profiler_args {
|
||||
__u32 op; /* kfd_profiler_op */
|
||||
union {
|
||||
struct kfd_ioctl_pmc_settings pmc;
|
||||
struct kfd_ioctl_ptl_control ptl;
|
||||
__u32 version; /* KFD_IOC_PROFILER_VERSION_NUM */
|
||||
};
|
||||
};
|
||||
|
||||
#define AMDKFD_IOCTL_BASE 'K'
|
||||
#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
|
||||
#define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
|
||||
@@ -1681,7 +1712,10 @@ struct kfd_ioctl_dbg_trap_args {
|
||||
#define AMDKFD_IOC_CREATE_PROCESS \
|
||||
AMDKFD_IO(0x27)
|
||||
|
||||
#define AMDKFD_IOC_PROFILER \
|
||||
AMDKFD_IOWR(0x28, struct kfd_ioctl_profiler_args)
|
||||
|
||||
#define AMDKFD_COMMAND_START 0x01
|
||||
#define AMDKFD_COMMAND_END 0x28
|
||||
#define AMDKFD_COMMAND_END 0x29
|
||||
|
||||
#endif
|
||||
|
||||
@@ -64,6 +64,14 @@
|
||||
* context_init and multiple timelines
|
||||
*/
|
||||
#define VIRTIO_GPU_F_CONTEXT_INIT 4
|
||||
/*
|
||||
* The device provides a valid blob_alignment
|
||||
* field in its configuration and both
|
||||
* VIRTIO_GPU_CMD_RESOURCE_CREATE_BLOB and
|
||||
* VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB requests
|
||||
* must be aligned to that value.
|
||||
*/
|
||||
#define VIRTIO_GPU_F_BLOB_ALIGNMENT 5
|
||||
|
||||
enum virtio_gpu_ctrl_type {
|
||||
VIRTIO_GPU_UNDEFINED = 0,
|
||||
@@ -365,6 +373,7 @@ struct virtio_gpu_config {
|
||||
__le32 events_clear;
|
||||
__le32 num_scanouts;
|
||||
__le32 num_capsets;
|
||||
__le32 blob_alignment;
|
||||
};
|
||||
|
||||
/* simple formats for fbcon/X use */
|
||||
|
||||
Reference in New Issue
Block a user