History

Merge tag 'drm-next-2026-08-20' of https://gitlab.freedesktop.org/drm/kernel

Pull drm updates from Dave Airlie: "Highlights: - dmemcg eviction support is good for low VRAM things like Steam Machine - AMD adds gfx6-8 modifier support for older GPUs that enables a bunch of wayland stuff - i915/xe has some new hw support but also a lot of display refactoring Everything: perf: - export perf_allow_ APIs for xe udmabuf: - remove default size limit of 64MB rust: - i/o rework (signed tag from driver-core tree) - add registration guard and registration data - fix unbounded lifetimes in ioctl handler args - fix a drm_dev_register race - gem_shmem: add DmaResvGuard helper - gpuvm: require send/sync for driver data - implement send/sync for GpuVaAlloc and GpuVmBo - add SmContext lifetime - rename dma_handle to dma_address - change pci_sriov_get_totalvfs return to unsigned int core: - create drm_of_get_panel_orientation - send per-connector hotplug events - add thunderbolt UBHR tunneling support connector: - add color format property dmem: - introduce a peak file - accept one region per limit - add dmemcg support for eviction gpusvm: - reorg code to give drivers more flexibility atomic: - add create_state callback and helper - add documentation on atomic commit lifetime buddy: - add per-order free - add used block scoreboard - fix UAF - test buffer clearance on resume - add phys_addr->block helper gem: - drop DRIVER_GEM_GPUVA flag ttm: - be more aggressive allocating below protection limit sched: - add test suite for concurrent job submissions hdmi: - hook the color format property in helpers mipi-dsi: - add MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT bridge: - add atomic create callbacks - drop atomic reset - display-connector: don't autoenable HPD IRQ - trigger initial HPD for DP - ti-sn65dsi83: remove NO_HFP and NO_HBP mode flags - analogix_dp: switch to DP link training helpers dp: - add support for DSC max delta BPP edid: - parse panel type from DisplayID 2.x Display Parameters sysfb: - improve panel, stride, framebuffer size validation panel: - implement ref counting for struct drm_panel - himax-hx83121a: add backlight regulator support - novatek-nt36672a: Inline panel init sequences - visionox-vtdr6130: enable DSC - novatek-nt37801: Use mipi_dsi_*_multi() functions - samsung-s6d16d0: Fix prepare error handling - support Novatek NT36536 plus DT bindings - sofef00: fix backlight updates - osd101t2587: use mipi_dsi_*_multi interface - panel-edp: adjust timing for AUO displays - panel-lvds: support Opto Logic SCX1001511GGC49 - panel-simple: support Kyocera tcg070wvlq - panel-edp: quirks - AUO B116XAT04.3, CMN N116BCP-EA2, CSW MNB601LS1-8 - BOE NV116WH2-M30, BOE NT116WHM-N21, BOE NV116FH1-M31 - BOE NV116FH1-M30, NV140FHM-N5B, TM156VDXP25 - BOE NE160QDM-NY1, MB116AS01 - new: - Samsung ATNA40HQ08-0, Anbernic TD4310 - Chipone ICNA35XX, Ilitek ILI9488 - Ilitek ILI7807S, Renesas R63419 - MNE001BS6-2, MNF601BS4-1, Sharp LQ120P1JX51 virtio: - add support for save/restore virtio_gpu_objects - abort vq wait on device removal amdgpu: - add color format DRM property - initial compute pipe reset support - add GFX 6-8 modifier support - initial DCN 6.0.0 support - dmemcg eviction support - improved boundary checking for bios parsing - RAS updates and rework - VCN secure submission fixes - 8K panel fix - Display KUNIT tests - parse panel type from DisplayID - Align IP discovery to pci device lifetime - SOC15 register macro cleanups - UVD memory placement fixes - GFX9 mode2 reset fixes - drop unnecessary BUG/BUG_ON - GFX8 soft reset rework - enable soft reset on GFX8 - PSP/SMU 15.0.9 update - VI ASPM fix - userq fixes - amdgpu_vm_get_task_info_pasid lifetime fix - DC CACP support - change system_unbound_wq with system_dfl_wq - Loosen VFCT bios parsing to deal with pci=realloc - SI/SMU7 AC/DC switch fix - VM fence handling fix - GEM close optimisation - Apple Studio Display fixes - DC FRL fixes amdkfd: - initial compute pipe reset support - allow applications to opt out of sigbus on fatal errors - improve CRIU boundary checks - MQD handling rework - move TBA/TMA from system to device memory - avoid topology-lock in kfd_mmap - SVM eviction fixes radeon: - fix unset CONFIG_ACPI build i915: - Novalake (NVL display version 35) timing generator enabling - NVL DC3CO enabling - enable UBHR link rates on thunderbolt tunnels - Reduce Xe3+ PM demand peak bandwidth - enable pipe DMC error interrupts for display 30+ - add kunit tests for DP link config selection - refactor and document DP link recovery - i915/xe driver display probe/remove/suspend/resume/shutdown cleanup and unification - i915/xe display runtime PM unified - Break i915 and xe panic dependency on struct intel_framebuffer - Streamline Pre/Post-CSC LUT loops - drop TGL DC3DO support - CDCLK santization - fix HDMI scrambling enable - fix phys bo pread/pwrite with offset - add missing nospec on parallel submit slot - fix some NULL derefs xe: - drop force_execlist module param - gate observation streams with perf_allow_cpu - skip FORCE_WC and vm_bound check for external dma-bufs - dmemcg eviction support - remove unused NVL-S GuC - TLB invalidation improvements - NVL-S updated PCI-IDs and w/a - madvise: optimise invalidation path - fix infinite gt-reset loop in timeout recovery - update TTM device benefical_order - wait on external BO kernel fences in exec ioctl - add/use more KLV helpers - sriov: disable display in admin only PF mode - add RAS GPU health indicator - optimise TTM populate for DONTNEED BO - drop force_probe for NVL-s - add debugfs for pcode info amdxdna: - disable device buffer export nova: - build nova-core/nova-drm from drivers/gpu - export nova-core rust symbols (workaround) - GSP boot process consolidation - Boot GSP with vGPU enabled - TLV firmware image format support - Hopper/Blackwell fixes and cleanups - I/O projection adoption tyr: - firmware loading and MCU boot - add generic slot manager + MMU - GPU VM support ARM64 LPAE page tables - add kernel buffer object for internal allocations - add parser for Mali CSF - add MCU booting nouveau: - race fixes - check instmem iomapping at first use - add dmemcg support - expose NVDEC channels - add scanline position/head state support for GSP qxl: - convert simple encoder to regular ethosu: - add perf counter support etnaviv: - force flush on power register ops msm: - support DSC configuration with slice_per_pkt > 1 mxsfb: - fix disable sequence panthor: - support sparse mappings rockchip: - switch away from simple helpers - support YUV background color - fix layer config timeout - add edp support for rk3576 - add batch command submission function rocket: - error handling and NULL ptr deref fixes sun4i: - switch away from simple helpers imagination: - mark BXM-4-64 MC1 as support host1x: - support tegra264 tegra: - add DSI for tegra 20/30 v3d: - reduce PM runtime autosuspend delay - scheduler fixes and refactoring - deprecate v3d 3.3 and 4.1 - validate CPU job query boundaries hibmc: - improve plane format handling - switch to gem shmem mediatek: - cec: correct compat for mt7623-8167? exynos: - remove simple dependency - add error handling to encoder paths - take i2c adapter module reference" * tag 'drm-next-2026-08-20' of https://gitlab.freedesktop.org/drm/kernel: (2074 commits) drm/xe/mcr: Take vcs1/vecs1 into account for first media slice drm/xe: Fix a bug in pc_adjust_freq_bounds() drm/xe: Fix xe_device_probe() failure drm/xe/drm_ras: Move has_drm_ras check to drm_ras layer drm/xe/ras: Fix boot-time ras error processing drm/amd/display: make DC_RUN_WITH_PREEMPTION_ENABLED misuse a build error drm/amd/pm: silence uninitialized variable warnings drm/amdgpu: skip BOs being torn down during GTT recovery drm/amdgpu: Reject UVD message with invalid number of h265 refs drm/amdgpu: keep PRT mappings off the vm_bo state lists drm/amdgpu: fix nbif 6.3.1 l1 low power not functional drm/amd/display: fix BT.2020 YCbCr output CSC matrices for DCE drm/amd/display: fix BT.2020 YCbCr limited output CSC matrix drm/amdgpu: Implement insert_end for VCE 3 drm/amdgpu: Fix UVD min buffer sizes drm/amdgpu: Fix UVD decode image min size calculation drm/amdgpu: Fix UVD dpb min size calculation for H264 drm/amdgpu: Reject UVD message with dimensions above 4096 drm/amdgpu: check ASPM on the dGPU host link drm/radeon: fix autosuspend cleanup during teardown ...

Linus Torvalds committed 2 months ago

Commit 4e69c182 parents 818bebe c44e2781576 files · +231951 −42056Browse files

Showing the changes to include/uapi (8 of 1576 files). Show all

Unified · Split

8 files
  1. include/uapi/drm/amdgpu_drm.h +21 −0
  2. include/uapi/drm/drm_fourcc.h +191 −18
  3. include/uapi/drm/drm_mode.h +1 −0
  4. include/uapi/drm/ethosu_accel.h +59 −1
  5. include/uapi/drm/nouveau_drm.h +1 −0
  6. include/uapi/drm/panthor_drm.h +25 −1
  7. include/uapi/drm/xe_drm.h +13 −4
  8. include/uapi/linux/kfd_ioctl.h +89 −91
include/uapi/drm/amdgpu_drm.h+21−0
@@ -58,6 +58,7 @@ extern "C" { · 57 unmodified lines
58#define DRM_AMDGPU_USERQ_SIGNAL 0x1758#define DRM_AMDGPU_USERQ_SIGNAL 0x17
59#define DRM_AMDGPU_USERQ_WAIT 0x1859#define DRM_AMDGPU_USERQ_WAIT 0x18
60#define DRM_AMDGPU_GEM_LIST_HANDLES 0x1960#define DRM_AMDGPU_GEM_LIST_HANDLES 0x19
61#define DRM_AMDGPU_PROC_OPTIONS 0x1A
61 62
62#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)63#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
63#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)64#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap)
@@ -79,6 +80,7 @@ extern "C" { · 15 unmodified lines
79#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)80#define DRM_IOCTL_AMDGPU_USERQ_SIGNAL DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_SIGNAL, struct drm_amdgpu_userq_signal)
80#define DRM_IOCTL_AMDGPU_USERQ_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait)81#define DRM_IOCTL_AMDGPU_USERQ_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_USERQ_WAIT, struct drm_amdgpu_userq_wait)
81#define DRM_IOCTL_AMDGPU_GEM_LIST_HANDLES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_LIST_HANDLES, struct drm_amdgpu_gem_list_handles)82#define DRM_IOCTL_AMDGPU_GEM_LIST_HANDLES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_LIST_HANDLES, struct drm_amdgpu_gem_list_handles)
83#define DRM_IOCTL_AMDGPU_PROC_OPTIONS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_PROC_OPTIONS, struct drm_amdgpu_proc_options)
82 84
83/**85/**
84 * DOC: memory domains86 * DOC: memory domains
@@ -1673,6 +1675,25 @@ struct drm_amdgpu_info_uq_metadata { · 1588 unmodified lines
1673#define AMDGPU_FAMILY_GC_11_5_4 154 /* GC 11.5.4 */1675#define AMDGPU_FAMILY_GC_11_5_4 154 /* GC 11.5.4 */
1674#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */1676#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
1675 1677
1678/*
1679 * Definition of user options
1680 *
1681 * option: AMDGPU_PROC_OPTIONS_OP_KFD_SIGBUS_DELAY
1682 * 0: Disable sigbus delay - SIGBUS will be raised immediately
1683 * 0xFFFFFFFF: SIGBUS will not be raised
1684 * other: Set the sigbus delay in milliseconds
1685 */
1686#define AMDGPU_PROC_OPTIONS_OP_KFD_SIGBUS_DELAY 0
1687
1688#define AMDGPU_PROC_OPTIONS_KFD_SIGBUS_DELAY_DISABLED 0xFFFFFFFFu
1689
1690struct drm_amdgpu_proc_options {
1691 __u32 op;
1692 struct {
1693 __u32 value;
1694 } kfd_sigbus_delay;
1695};
1696
1676#if defined(__cplusplus)1697#if defined(__cplusplus)
1677}1698}
1678#endif1699#endif
include/uapi/drm/drm_fourcc.h+191−18
@@ -1646,36 +1646,69 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 1645 unmodified lines
1646 * For multi-plane formats the above surfaces get merged into one plane for1646 * For multi-plane formats the above surfaces get merged into one plane for
1647 * each format plane, based on the required alignment only.1647 * each format plane, based on the required alignment only.
1648 *1648 *
1649 * Bits Parameter Notes1649 * Bits Parameter Notes
1650 * ----- ------------------------ ---------------------------------------------1650 * ------- ------------------------ ---------------------------------------------
1651 *
1652 * DRM format modifier fields on AMD GPUs:
1653 * 7:0 TILE_VERSION Values are AMD_FMT_MOD_TILE_VER_*
1654 * 12:8 TILE Values are AMD_FMT_MOD_TILE_<version>_*
1655 * 13 DCC Delta Color Compression, supported on GFX8 and newer
1656 * 55:14 (chip specific) See below for details, depends on GFX block version
1657 * 63:56 Vendor Value is DRM_FORMAT_MOD_VENDOR_AMD
1658 *
1659 * Chip specific fields on Gfx9 and newer:
1660 * 14 DCC_RETILE
1661 * 15 DCC_PIPE_ALIGN
1662 * 16 DCC_INDEPENDENT_64B
1663 * 17 DCC_INDEPENDENT_128B
1664 * 19:18 DCC_MAX_COMPRESSED_BLOCK Values are AMD_FMT_MOD_DCC_BLOCK_*
1665 * 20 DCC_CONSTANT_ENCODE
1666 * 23:21 PIPE_XOR_BITS Only for some chips
1667 * 26:24 BANK_XOR_BITS Only for some chips
1668 * 29:27 PACKERS Only for some chips
1669 * 32:30 RB Only for some chips
1670 * 35:33 PIPE Only for some chips
1671 * 55:36 - Reserved for future use, must be zero
1672 *
1673 * Chip specific fields on Gfx6-8:
1674 * 16:14 MICROTILE Micro tile format
1675 * 21:17 PIPE_CONFIG Number of pipes and how pipes are interleaved
1676 * 24:22 TILE_SPLIT Tile split size
1677 * 26:25 BANK_WIDTH Number of tiles in the X direction in the same bank
1678 * 28:27 BANK_HEIGHT Number of tiles in the Y direction in the same bank
1679 * 30:29 MACRO_TILE_ASPECT Macro tile aspect ratio
1680 * 32:31 NUM_BANKS Number of banks
1681 * 55:33 - Reserved for future use, must be zero
1651 *1682 *
1652 * 7:0 TILE_VERSION Values are AMD_FMT_MOD_TILE_VER_*
1653 * 12:8 TILE Values are AMD_FMT_MOD_TILE_<version>_*
1654 * 13 DCC
1655 * 14 DCC_RETILE
1656 * 15 DCC_PIPE_ALIGN
1657 * 16 DCC_INDEPENDENT_64B
1658 * 17 DCC_INDEPENDENT_128B
1659 * 19:18 DCC_MAX_COMPRESSED_BLOCK Values are AMD_FMT_MOD_DCC_BLOCK_*
1660 * 20 DCC_CONSTANT_ENCODE
1661 * 23:21 PIPE_XOR_BITS Only for some chips
1662 * 26:24 BANK_XOR_BITS Only for some chips
1663 * 29:27 PACKERS Only for some chips
1664 * 32:30 RB Only for some chips
1665 * 35:33 PIPE Only for some chips
1666 * 55:36 - Reserved for future use, must be zero
1667 */1683 */
1668#define AMD_FMT_MOD fourcc_mod_code(AMD, 0)1684#define AMD_FMT_MOD fourcc_mod_code(AMD, 0)
1669 1685
1670#define IS_AMD_FMT_MOD(val) (((val) >> 56) == DRM_FORMAT_MOD_VENDOR_AMD)1686#define IS_AMD_FMT_MOD(val) (((val) >> 56) == DRM_FORMAT_MOD_VENDOR_AMD)
1671 1687
1672/* Reserve 0 for GFX8 and older */1688#define AMD_FMT_MOD_TILE_VER_GFX6 0
1673#define AMD_FMT_MOD_TILE_VER_GFX9 11689#define AMD_FMT_MOD_TILE_VER_GFX9 1
1674#define AMD_FMT_MOD_TILE_VER_GFX10 21690#define AMD_FMT_MOD_TILE_VER_GFX10 2
1675#define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 31691#define AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS 3
1676#define AMD_FMT_MOD_TILE_VER_GFX11 41692#define AMD_FMT_MOD_TILE_VER_GFX11 4
1677#define AMD_FMT_MOD_TILE_VER_GFX12 51693#define AMD_FMT_MOD_TILE_VER_GFX12 5
1678 1694
1695/*
1696 * Gfx6-8 tiling modes.
1697 * A complete reference implementation is found in addrlib in the Mesa code base.
1698 *
1699 * - Microtiled modes (1D):
1700 * Pixel data is organized into micro tiles of 8x8 pixels.
1701 *
1702 * - Macrotiled modes (2D):
1703 * Micro tiles are further organized into macro tiles.
1704 * These are optimized for even load distribution among memory channels.
1705 *
1706 * Note that only THIN1 modes are exposed here.
1707 * THICK and XTHICK are for 3D images and not relevant to DRM format modifiers.
1708 */
1709#define AMD_FMT_MOD_TILE_GFX6_1D_TILED_THIN1 0x2
1710#define AMD_FMT_MOD_TILE_GFX6_2D_TILED_THIN1 0x4
1711
1679/*1712/*
1680 * 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical1713 * 64K_S is the same for GFX9/GFX10/GFX10_RBPLUS and hence has GFX9 as canonical
1681 * version.1714 * version.
@@ -1774,6 +1807,146 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) · 92 unmodified lines
1774#define AMD_FMT_MOD_PIPE_SHIFT 331807#define AMD_FMT_MOD_PIPE_SHIFT 33
1775#define AMD_FMT_MOD_PIPE_MASK 0x71808#define AMD_FMT_MOD_PIPE_MASK 0x7
1776 1809
1810/*
1811 * MICRO_TILE_MODE, 3 bits. Determines the micro tile format.
1812 * Only relevant to Gfx6-8.
1813 *
1814 * DISPLAY - Displayable tiling
1815 * THIN - Non-displayable tiling, a.k.a thin micro tiling
1816 * DEPTH, THICK - not exposed, not relevant to DRM format modifier use cases
1817 * ROTATED - not exposed, not implemented in Linux or Mesa
1818 */
1819#define AMD_FMT_MOD_MICROTILE_SHIFT 14ULL
1820#define AMD_FMT_MOD_MICROTILE_MASK 0x7
1821
1822#define AMD_FMT_MOD_MICROTILE_DISPLAY 0x0
1823#define AMD_FMT_MOD_MICROTILE_THIN 0x1
1824
1825/*
1826 * PIPE_CONFIG, 5 bits. Number of pipes and how pipes are interleaved on the surface,
1827 * which means the shader engine tile size and packer tile size.
1828 * Typically matches the number of memory channels, or number of RBs.
1829 * Only relevant to Gfx6-8 macro tiled modes.
1830 *
1831 * P<n>_<a>x<b>_<c>x<d>
1832 * where:
1833 * <n> - number of pipes
1834 * <a>x<b> - shader engine tile size
1835 * <c>x<d> - packer tile size
1836 */
1837#define AMD_FMT_MOD_PIPE_CONFIG_SHIFT 17ULL
1838#define AMD_FMT_MOD_PIPE_CONFIG_MASK 0x1f
1839
1840#define AMD_FMT_MOD_PIPE_CONFIG_P2 0x0
1841#define AMD_FMT_MOD_PIPE_CONFIG_P4_8x16 0x4
1842#define AMD_FMT_MOD_PIPE_CONFIG_P4_16x16 0x5
1843#define AMD_FMT_MOD_PIPE_CONFIG_P4_16x32 0x6
1844#define AMD_FMT_MOD_PIPE_CONFIG_P4_32x32 0x7
1845#define AMD_FMT_MOD_PIPE_CONFIG_P8_16x16_8x16 0x8
1846#define AMD_FMT_MOD_PIPE_CONFIG_P8_16x32_8x16 0x9
1847#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x32_8x16 0xa
1848#define AMD_FMT_MOD_PIPE_CONFIG_P8_16x32_16x16 0xb
1849#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x32_16x16 0xc
1850#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x32_16x32 0xd
1851#define AMD_FMT_MOD_PIPE_CONFIG_P8_32x64_32x32 0xe
1852#define AMD_FMT_MOD_PIPE_CONFIG_P16_32x32_8x16 0x10
1853#define AMD_FMT_MOD_PIPE_CONFIG_P16_32x32_16x16 0x11
1854
1855/*
1856 * TILE_SPLIT, 3 bits.
1857 * Only relevant to Gfx6-8 macro tiled modes.
1858 *
1859 * On GFX6 (or with depth tiling modes on GFX7 and newer),
1860 * the GFX block uses the GB_TILE_MODE.TILE_SPLIT field directly.
1861 *
1862 * On GFX7 and newer with non-depth tiling modes, the GFX block uses a
1863 * split factor which is stored in the GB_TILE_MODE.SAMPLE_SPLIT field.
1864 * SAMPLE_SPLIT may be: 0 - 1 byte; 1 - 2 bytes; 2 - 4 bytes; 3 - 8 bytes.
1865 * The actual tile size and tile split bytes are calculated as follows:
1866 *
1867 * bpp = ... <- bits per pixel in the current image
1868 * thickness = ... <- depends on array mode; may be: 1, 4, 8
1869 * num_samples = ... <- number of samples in the current image
1870 * tile_size_pixels = 8 * 8
1871 * tile_bytes_1x = thickness * tile_size_pixels * bpp / 8
1872 * sample_split_factor = 1 << SAMPLE_SPLIT
1873 * tile_split_bytes = clamp(tile_bytes_1x * sample_split_factor, 256, dram_row_size_bytes)
1874 * tile_bytes = clamp(tile_bytes_1x * num_samples, 64, tile_split_bytes)
1875 *
1876 * In both cases, the display block (DCE) has no SAMPLE_SPLIT
1877 * and just needs the tile split bytes in the GRPH_CONTROL.GRPH_TILE_SPLIT field.
1878 * To maximize compatibility between GFX6-7, we don't include the SAMPLE_SPLIT
1879 * in the format modifiers.
1880 *
1881 * The actual tile split in bytes is: 64 << field value
1882 * Possible values of this field:
1883 *
1884 * 0 - Tile split is 64 bytes
1885 * 1 - Tile split is 128 bytes
1886 * 2 - Tile split is 256 bytes
1887 * 3 - Tile split is 512 bytes
1888 * 4 - Tile split is 1 KiB
1889 * 5 - Tile split is 2 KiB
1890 * 6 - Tile split is 4 KiB
1891 */
1892#define AMD_FMT_MOD_TILE_SPLIT_SHIFT 22ULL
1893#define AMD_FMT_MOD_TILE_SPLIT_MASK 0x7
1894
1895/*
1896 * BANK_WIDTH, 2 bits. Number of tiles in the X direction in the same bank.
1897 * Only relevant to Gfx6-8 macro tiled modes.
1898 * The actual bank width is: 1 << field value
1899 * Possible values:
1900 *
1901 * 0 - bank width is 1
1902 * 1 - bank width is 2
1903 * 2 - bank width is 4
1904 * 3 - bank width is 8
1905 */
1906#define AMD_FMT_MOD_BANK_WIDTH_SHIFT 25ULL
1907#define AMD_FMT_MOD_BANK_WIDTH_MASK 0x3
1908
1909/*
1910 * BANK_HEIGHT, 2 bits. Number of tiles in the Y direction in the same bank.
1911 * Only relevant to Gfx6-8 macro tiled modes.
1912 * The actual bank height is: 1 << field value
1913 * Possible values:
1914 *
1915 * 0 - bank height is 1
1916 * 1 - bank height is 2
1917 * 2 - bank height is 4
1918 * 3 - bank height is 8
1919 */
1920#define AMD_FMT_MOD_BANK_HEIGHT_SHIFT 27ULL
1921#define AMD_FMT_MOD_BANK_HEIGHT_MASK 0x3
1922
1923/*
1924 * MACRO_TILE_ASPECT, 2 bits. Macro tile aspect ratio.
1925 * Only relevant to Gfx6-8 macro tiled modes.
1926 * Possible values:
1927 *
1928 * 0 - aspect ratio is 1:1
1929 * 1 - aspect ratio is 4:1
1930 * 2 - aspect ratio is 16:1
1931 * 3 - aspect ratio is 64:1
1932 */
1933#define AMD_FMT_MOD_MACRO_TILE_ASPECT_SHIFT 29ULL
1934#define AMD_FMT_MOD_MACRO_TILE_ASPECT_MASK 0x3
1935
1936/*
1937 * NUM_BANKS, 2 bits. Number of banks.
1938 * Only relevant to Gfx6-8 macro tiled modes.
1939 * The actual number of banks is: 2 << field value
1940 * Possible values:
1941 *
1942 * 0 - number of banks is 2
1943 * 1 - number of banks is 4
1944 * 2 - number of banks is 8
1945 * 3 - number of banks is 16
1946 */
1947#define AMD_FMT_MOD_NUM_BANKS_SHIFT 31ULL
1948#define AMD_FMT_MOD_NUM_BANKS_MASK 0x3
1949
1777#define AMD_FMT_MOD_SET(field, value) \1950#define AMD_FMT_MOD_SET(field, value) \
1778 ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)1951 ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)
1779#define AMD_FMT_MOD_GET(field, value) \1952#define AMD_FMT_MOD_GET(field, value) \
include/uapi/drm/drm_mode.h+1−0
@@ -155,6 +155,7 @@ extern "C" { · 154 unmodified lines
155/* Panel type property */155/* Panel type property */
156#define DRM_MODE_PANEL_TYPE_UNKNOWN 0156#define DRM_MODE_PANEL_TYPE_UNKNOWN 0
157#define DRM_MODE_PANEL_TYPE_OLED 1157#define DRM_MODE_PANEL_TYPE_OLED 1
158#define DRM_MODE_PANEL_TYPE_LCD 2
158 159
159/*160/*
160 * DRM_MODE_ROTATE_<degrees>161 * DRM_MODE_ROTATE_<degrees>
include/uapi/drm/ethosu_accel.h+59−1
@@ -43,6 +43,11 @@ enum drm_ethosu_ioctl_id { · 42 unmodified lines
43 43
44 /** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */44 /** @DRM_ETHOSU_SUBMIT: Submit a job and BOs to run. */
45 DRM_ETHOSU_SUBMIT,45 DRM_ETHOSU_SUBMIT,
46
47 DRM_ETHOSU_PERFMON_CREATE,
48 DRM_ETHOSU_PERFMON_DESTROY,
49 DRM_ETHOSU_PERFMON_GET_VALUES,
50 DRM_ETHOSU_PERFMON_SET_GLOBAL,
46};51};
47 52
48/**53/**
@@ -79,6 +84,7 @@ struct drm_ethosu_npu_info { · 30 unmodified lines
79 __u32 config;84 __u32 config;
80 85
81 __u32 sram_size;86 __u32 sram_size;
87 __u32 pmu_counters;
82};88};
83 89
84/**90/**
@@ -220,10 +226,54 @@ struct drm_ethosu_submit { · 135 unmodified lines
220 /** Input: Number of jobs passed in. */226 /** Input: Number of jobs passed in. */
221 __u32 job_count;227 __u32 job_count;
222 228
223 /** Reserved, must be zero. */229 /** Input: Id returned by DRM_ETHOSU_PERFMON_CREATE */
230 __u32 perfmon_id;
231};
232
233#define DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS 8
234#define DRM_ETHOSU_MAX_PERF_COUNTERS \
235 (DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS + 1)
236
237struct drm_ethosu_perfmon_create {
238 __u32 id;
239 __u32 ncounters;
240 __u16 counters[DRM_ETHOSU_MAX_PERF_EVENT_COUNTERS];
241};
242
243struct drm_ethosu_perfmon_destroy {
244 __u32 id;
224 __u32 pad;245 __u32 pad;
225};246};
226 247
248/*
249 * Returns the values of the performance counters tracked by this
250 * perfmon (as an array of (ncounters + 1) u64 values).
251 *
252 * No implicit synchronization is performed, so the user has to
253 * guarantee that any jobs using this perfmon have already been
254 * completed.
255 */
256struct drm_ethosu_perfmon_get_values {
257 __u32 id;
258 __u32 pad;
259 __u64 values_ptr;
260};
261
262#define DRM_ETHOSU_PERFMON_CLEAR_GLOBAL 0x0001
263
264/**
265 * struct drm_ethosu_perfmon_set_global - ioctl to define a global performance
266 * monitor
267 *
268 * The global performance monitor will be used for all jobs. If a global
269 * performance monitor is defined, jobs with a self-defined performance
270 * monitor won't be allowed.
271 */
272struct drm_ethosu_perfmon_set_global {
273 __u32 flags;
274 __u32 id;
275};
276
227/**277/**
228 * DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number278 * DRM_IOCTL_ETHOSU() - Build a ethosu IOCTL number
229 * @__access: Access type. Must be R, W or RW.279 * @__access: Access type. Must be R, W or RW.
@@ -252,6 +302,14 @@ enum { · 22 unmodified lines
252 DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),302 DRM_IOCTL_ETHOSU(WR, CMDSTREAM_BO_CREATE, cmdstream_bo_create),
253 DRM_IOCTL_ETHOSU_SUBMIT =303 DRM_IOCTL_ETHOSU_SUBMIT =
254 DRM_IOCTL_ETHOSU(WR, SUBMIT, submit),304 DRM_IOCTL_ETHOSU(WR, SUBMIT, submit),
305 DRM_IOCTL_ETHOSU_PERFMON_CREATE =
306 DRM_IOCTL_ETHOSU(WR, PERFMON_CREATE, perfmon_create),
307 DRM_IOCTL_ETHOSU_PERFMON_DESTROY =
308 DRM_IOCTL_ETHOSU(WR, PERFMON_DESTROY, perfmon_destroy),
309 DRM_IOCTL_ETHOSU_PERFMON_GET_VALUES =
310 DRM_IOCTL_ETHOSU(WR, PERFMON_GET_VALUES, perfmon_get_values),
311 DRM_IOCTL_ETHOSU_PERFMON_SET_GLOBAL =
312 DRM_IOCTL_ETHOSU(WR, PERFMON_SET_GLOBAL, perfmon_set_global),
255};313};
256 314
257#if defined(__cplusplus)315#if defined(__cplusplus)
include/uapi/drm/nouveau_drm.h+1−0
@@ -89,6 +89,7 @@ struct drm_nouveau_getparam { · 88 unmodified lines
89#define NOUVEAU_FIFO_ENGINE_PPP 0x0489#define NOUVEAU_FIFO_ENGINE_PPP 0x04
90#define NOUVEAU_FIFO_ENGINE_BSP 0x0890#define NOUVEAU_FIFO_ENGINE_BSP 0x08
91#define NOUVEAU_FIFO_ENGINE_CE 0x3091#define NOUVEAU_FIFO_ENGINE_CE 0x30
92#define NOUVEAU_FIFO_ENGINE_NVDEC 0x300
92 93
93struct drm_nouveau_channel_alloc {94struct drm_nouveau_channel_alloc {
94 __u32 fb_ctxdma_handle;95 __u32 fb_ctxdma_handle;
include/uapi/drm/panthor_drm.h+25−1
@@ -253,6 +253,9 @@ enum drm_panthor_dev_query_type { · 252 unmodified lines
253 * @DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO: Query allowed group priorities information.253 * @DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO: Query allowed group priorities information.
254 */254 */
255 DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,255 DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,
256
257 /** @DRM_PANTHOR_DEV_QUERY_MMU_INFO: Query MMU information. */
258 DRM_PANTHOR_DEV_QUERY_MMU_INFO,
256};259};
257 260
258/**261/**
@@ -487,6 +490,16 @@ struct drm_panthor_timestamp_info { · 228 unmodified lines
487 __u64 cpu_timestamp_nsec;490 __u64 cpu_timestamp_nsec;
488};491};
489 492
493/**
494 * struct drm_panthor_mmu_info - MMU information
495 *
496 * Structure grouping all queryable information relating to the MMU.
497 */
498struct drm_panthor_mmu_info {
499 /** @page_size_bitmap: Allowed page sizes */
500 __u64 page_size_bitmap;
501};
502
490/**503/**
491 * struct drm_panthor_group_priorities_info - Group priorities information504 * struct drm_panthor_group_priorities_info - Group priorities information
492 *505 *
@@ -601,6 +614,18 @@ enum drm_panthor_vm_bind_op_flags { · 108 unmodified lines
601 */614 */
602 DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED = 1 << 2,615 DRM_PANTHOR_VM_BIND_OP_MAP_UNCACHED = 1 << 2,
603 616
617 /**
618 * @DRM_PANTHOR_VM_BIND_OP_MAP_SPARSE: Sparsely map a virtual memory range
619 *
620 * Only valid with DRM_PANTHOR_VM_BIND_OP_TYPE_MAP.
621 *
622 * When this flag is set, the whole vm_bind range is mapped over a dummy object in a cyclic
623 * fashion, and all GPU reads from addresses in the range return undefined values. This flag
624 * being set means drm_panthor_vm_bind_op::bo_offset and drm_panthor_vm_bind_op::bo_handle
625 * must both be set to 0. DRM_PANTHOR_VM_BIND_OP_MAP_NOEXEC must also be set.
626 */
627 DRM_PANTHOR_VM_BIND_OP_MAP_SPARSE = 1 << 3,
628
604 /**629 /**
605 * @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation.630 * @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation.
606 */631 */
@@ -664,7 +689,6 @@ struct drm_panthor_vm_bind_op { · 57 unmodified lines
664 * This array shall not be empty for sync-only operations.689 * This array shall not be empty for sync-only operations.
665 */690 */
666 struct drm_panthor_obj_array syncs;691 struct drm_panthor_obj_array syncs;
667
668};692};
669 693
670/**694/**
include/uapi/drm/xe_drm.h+13−4
@@ -2537,21 +2537,21 @@ struct drm_xe_exec_queue_set_property { · 2536 unmodified lines
2537 * Refer to Documentation/netlink/specs/drm_ras.yaml for complete interface specification.2537 * Refer to Documentation/netlink/specs/drm_ras.yaml for complete interface specification.
2538 *2538 *
2539 * Node Registration2539 * Node Registration
2540 * =================2540 * -----------------
2541 *2541 *
2542 * The driver registers DRM RAS nodes for each error severity level.2542 * The driver registers DRM RAS nodes for each error severity level.
2543 * enum drm_xe_ras_error_severity defines the node-id, while DRM_XE_RAS_ERROR_SEVERITY_NAMES maps2543 * enum drm_xe_ras_error_severity defines the node-id, while DRM_XE_RAS_ERROR_SEVERITY_NAMES maps
2544 * node-id to node-name.2544 * node-id to node-name.
2545 *2545 *
2546 * Error Classification2546 * Error Classification
2547 * ====================2547 * --------------------
2548 *2548 *
2549 * Each node contains a list of error counters. Each error is identified by a error-id and2549 * Each node contains a list of error counters. Each error is identified by a error-id and
2550 * an error-name. enum drm_xe_ras_error_component defines the error-id, while2550 * an error-name. enum drm_xe_ras_error_component defines the error-id, while
2551 * DRM_XE_RAS_ERROR_COMPONENT_NAMES maps error-id to error-name.2551 * DRM_XE_RAS_ERROR_COMPONENT_NAMES maps error-id to error-name.
2552 *2552 *
2553 * User Interface2553 * User Interface
2554 * ==============2554 * --------------
2555 *2555 *
2556 * To retrieve error values of a error counter, userspace applications should2556 * To retrieve error values of a error counter, userspace applications should
2557 * follow the below steps:2557 * follow the below steps:
@@ -2589,6 +2589,12 @@ enum drm_xe_ras_error_component { · 31 unmodified lines
2589 DRM_XE_RAS_ERR_COMP_CORE_COMPUTE = 1,2589 DRM_XE_RAS_ERR_COMP_CORE_COMPUTE = 1,
2590 /** @DRM_XE_RAS_ERR_COMP_SOC_INTERNAL: SoC Internal Error */2590 /** @DRM_XE_RAS_ERR_COMP_SOC_INTERNAL: SoC Internal Error */
2591 DRM_XE_RAS_ERR_COMP_SOC_INTERNAL,2591 DRM_XE_RAS_ERR_COMP_SOC_INTERNAL,
2592 /** @DRM_XE_RAS_ERR_COMP_DEVICE_MEMORY: Device Memory Error */
2593 DRM_XE_RAS_ERR_COMP_DEVICE_MEMORY,
2594 /** @DRM_XE_RAS_ERR_COMP_PCIE: PCIe Subsystem Error */
2595 DRM_XE_RAS_ERR_COMP_PCIE,
2596 /** @DRM_XE_RAS_ERR_COMP_FABRIC: Fabric Subsystem Error */
2597 DRM_XE_RAS_ERR_COMP_FABRIC,
2592 /** @DRM_XE_RAS_ERR_COMP_MAX: Max Error */2598 /** @DRM_XE_RAS_ERR_COMP_MAX: Max Error */
2593 DRM_XE_RAS_ERR_COMP_MAX /* non-ABI */2599 DRM_XE_RAS_ERR_COMP_MAX /* non-ABI */
2594};2600};
@@ -2606,7 +2612,10 @@ enum drm_xe_ras_error_component { · 11 unmodified lines
2606 */2612 */
2607#define DRM_XE_RAS_ERROR_COMPONENT_NAMES { \2613#define DRM_XE_RAS_ERROR_COMPONENT_NAMES { \
2608 [DRM_XE_RAS_ERR_COMP_CORE_COMPUTE] = "core-compute", \2614 [DRM_XE_RAS_ERR_COMP_CORE_COMPUTE] = "core-compute", \
2609 [DRM_XE_RAS_ERR_COMP_SOC_INTERNAL] = "soc-internal" \2615 [DRM_XE_RAS_ERR_COMP_SOC_INTERNAL] = "soc-internal", \
2616 [DRM_XE_RAS_ERR_COMP_DEVICE_MEMORY] = "device-memory", \
2617 [DRM_XE_RAS_ERR_COMP_PCIE] = "pcie", \
2618 [DRM_XE_RAS_ERR_COMP_FABRIC] = "fabric", \
2610}2619}
2611 2620
2612#if defined(__cplusplus)2621#if defined(__cplusplus)
include/uapi/linux/kfd_ioctl.h+89−91
@@ -690,7 +690,7 @@ enum kfd_criu_op { · 689 unmodified lines
690};690};
691 691
692/**692/**
693 * kfd_ioctl_criu_args - Arguments perform CRIU operation693 * struct kfd_ioctl_criu_args - Arguments perform CRIU operation
694 * @devices: [in/out] User pointer to memory location for devices information.694 * @devices: [in/out] User pointer to memory location for devices information.
695 * This is an array of type kfd_criu_device_bucket.695 * This is an array of type kfd_criu_device_bucket.
696 * @bos: [in/out] User pointer to memory location for BOs information696 * @bos: [in/out] User pointer to memory location for BOs information
@@ -698,11 +698,11 @@ enum kfd_criu_op { · 1 unmodified line
698 * @priv_data: [in/out] User pointer to memory location for private data698 * @priv_data: [in/out] User pointer to memory location for private data
699 * @priv_data_size: [in/out] Size of priv_data in bytes699 * @priv_data_size: [in/out] Size of priv_data in bytes
700 * @num_devices: [in/out] Number of GPUs used by process. Size of @devices array.700 * @num_devices: [in/out] Number of GPUs used by process. Size of @devices array.
701 * @num_bos [in/out] Number of BOs used by process. Size of @bos array.701 * @num_bos: [in/out] Number of BOs used by process. Size of @bos array.
702 * @num_objects: [in/out] Number of objects used by process. Objects are opaque to702 * @num_objects: [in/out] Number of objects used by process. Objects are opaque to
703 * user application.703 * user application.
704 * @pid: [in/out] PID of the process being checkpointed704 * @pid: [in/out] PID of the process being checkpointed
705 * @op [in] Type of operation (kfd_criu_op)705 * @op: [in] Type of operation (kfd_criu_op)
706 *706 *
707 * Return: 0 on success, -errno on failure707 * Return: 0 on success, -errno on failure
708 */708 */
@@ -764,7 +764,7 @@ enum kfd_mmio_remap { · 55 unmodified lines
764#define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080764#define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080
765 765
766/**766/**
767 * kfd_ioctl_svm_op - SVM ioctl operations767 * enum kfd_ioctl_svm_op - SVM ioctl operations
768 *768 *
769 * @KFD_IOCTL_SVM_OP_SET_ATTR: Modify one or more attributes769 * @KFD_IOCTL_SVM_OP_SET_ATTR: Modify one or more attributes
770 * @KFD_IOCTL_SVM_OP_GET_ATTR: Query one or more attributes770 * @KFD_IOCTL_SVM_OP_GET_ATTR: Query one or more attributes
@@ -786,7 +786,7 @@ enum kfd_ioctl_svm_location { · 15 unmodified lines
786};786};
787 787
788/**788/**
789 * kfd_ioctl_svm_attr_type - SVM attribute types789 * enum kfd_ioctl_svm_attr_type - SVM attribute types
790 *790 *
791 * @KFD_IOCTL_SVM_ATTR_PREFERRED_LOC: gpuid of the preferred location, 0 for791 * @KFD_IOCTL_SVM_ATTR_PREFERRED_LOC: gpuid of the preferred location, 0 for
792 * system memory792 * system memory
@@ -815,7 +815,7 @@ enum kfd_ioctl_svm_attr_type { · 22 unmodified lines
815};815};
816 816
817/**817/**
818 * kfd_ioctl_svm_attribute - Attributes as pairs of type and value818 * struct kfd_ioctl_svm_attribute - Attributes as pairs of type and value
819 *819 *
820 * The meaning of the @value depends on the attribute type.820 * The meaning of the @value depends on the attribute type.
821 *821 *
@@ -828,7 +828,7 @@ struct kfd_ioctl_svm_attribute { · 6 unmodified lines
828};828};
829 829
830/**830/**
831 * kfd_ioctl_svm_args - Arguments for SVM ioctl831 * struct kfd_ioctl_svm_args - Arguments for SVM ioctl
832 *832 *
833 * @op specifies the operation to perform (see enum833 * @op specifies the operation to perform (see enum
834 * @kfd_ioctl_svm_op). @start_addr and @size are common for all834 * @kfd_ioctl_svm_op). @start_addr and @size are common for all
@@ -875,7 +875,7 @@ struct kfd_ioctl_svm_args { · 40 unmodified lines
875};875};
876 876
877/**877/**
878 * kfd_ioctl_set_xnack_mode_args - Arguments for set_xnack_mode878 * struct kfd_ioctl_set_xnack_mode_args - Arguments for set_xnack_mode
879 *879 *
880 * @xnack_enabled: [in/out] Whether to enable XNACK mode for this process880 * @xnack_enabled: [in/out] Whether to enable XNACK mode for this process
881 *881 *
@@ -1055,15 +1055,15 @@ struct kfd_runtime_info { · 173 unmodified lines
1055#define KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK 21055#define KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK 2
1056 1056
1057/**1057/**
1058 * kfd_ioctl_runtime_enable_args - Arguments for runtime enable1058 * struct kfd_ioctl_runtime_enable_args - Arguments for runtime enable
1059 *1059 *
1060 * Coordinates debug exception signalling and debug device enablement with runtime.1060 * Coordinates debug exception signalling and debug device enablement with runtime.
1061 *1061 *
1062 * @r_debug - pointer to user struct for sharing information between ROCr and the debuggger1062 * @r_debug: pointer to user struct for sharing information between ROCr and the debuggger
1063 * @mode_mask - mask to set mode1063 * @mode_mask: mask to set mode
1064 * KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK - enable runtime for debugging, otherwise disable1064 * KFD_RUNTIME_ENABLE_MODE_ENABLE_MASK - enable runtime for debugging, otherwise disable
1065 * KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK - enable trap temporary setup (ignore on disable)1065 * KFD_RUNTIME_ENABLE_MODE_TTMP_SAVE_MASK - enable trap temporary setup (ignore on disable)
1066 * @capabilities_mask - mask to notify runtime on what KFD supports1066 * @capabilities_mask: mask to notify runtime on what KFD supports
1067 *1067 *
1068 * Return - 0 on SUCCESS.1068 * Return - 0 on SUCCESS.
1069 * - EBUSY if runtime enable call already pending.1069 * - EBUSY if runtime enable call already pending.
@@ -1158,17 +1158,15 @@ enum kfd_dbg_trap_operations { · 88 unmodified lines
1158};1158};
1159 1159
1160/**1160/**
1161 * kfd_ioctl_dbg_trap_enable_args1161 * struct kfd_ioctl_dbg_trap_enable_args - Arguments for KFD_IOC_DBG_TRAP_ENABLE.
1162 *
1163 * Arguments for KFD_IOC_DBG_TRAP_ENABLE.
1164 *1162 *
1165 * Enables debug session for target process. Call @op KFD_IOC_DBG_TRAP_DISABLE in1163 * Enables debug session for target process. Call @op KFD_IOC_DBG_TRAP_DISABLE in
1166 * kfd_ioctl_dbg_trap_args to disable debug session.1164 * kfd_ioctl_dbg_trap_args to disable debug session.
1167 *1165 *
1168 * @exception_mask (IN) - exceptions to raise to the debugger1166 * @exception_mask: (IN) - exceptions to raise to the debugger
1169 * @rinfo_ptr (IN) - pointer to runtime info buffer (see kfd_runtime_info)1167 * @rinfo_ptr: (IN) - pointer to runtime info buffer (see kfd_runtime_info)
1170 * @rinfo_size (IN/OUT) - size of runtime info buffer in bytes1168 * @rinfo_size: (IN/OUT) - size of runtime info buffer in bytes
1171 * @dbg_fd (IN) - fd the KFD will nofify the debugger with of raised1169 * @dbg_fd: (IN) - fd the KFD will nofify the debugger with of raised
1172 * exceptions set in exception_mask.1170 * exceptions set in exception_mask.
1173 *1171 *
1174 * Generic errors apply (see kfd_dbg_trap_operations).1172 * Generic errors apply (see kfd_dbg_trap_operations).
@@ -1188,15 +1186,14 @@ struct kfd_ioctl_dbg_trap_enable_args { · 13 unmodified lines
1188};1186};
1189 1187
1190/**1188/**
1191 * kfd_ioctl_dbg_trap_send_runtime_event_args1189 * struct kfd_ioctl_dbg_trap_send_runtime_event_args - Arguments for
1192 *1190 * KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT.
1193 *1191 *
1194 * Arguments for KFD_IOC_DBG_TRAP_SEND_RUNTIME_EVENT.
1195 * Raises exceptions to runtime.1192 * Raises exceptions to runtime.
1196 *1193 *
1197 * @exception_mask (IN) - exceptions to raise to runtime1194 * @exception_mask: (IN) - exceptions to raise to runtime
1198 * @gpu_id (IN) - target device id1195 * @gpu_id: (IN) - target device id
1199 * @queue_id (IN) - target queue id1196 * @queue_id: (IN) - target queue id
1200 *1197 *
1201 * Generic errors apply (see kfd_dbg_trap_operations).1198 * Generic errors apply (see kfd_dbg_trap_operations).
1202 * Return - 0 on SUCCESS.1199 * Return - 0 on SUCCESS.
@@ -1213,12 +1210,12 @@ struct kfd_ioctl_dbg_trap_send_runtime_event_args { · 10 unmodified lines
1213};1210};
1214 1211
1215/**1212/**
1216 * kfd_ioctl_dbg_trap_set_exceptions_enabled_args1213 * struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args - Arguments for
1214 * KFD_IOC_SET_EXCEPTIONS_ENABLED
1217 *1215 *
1218 * Arguments for KFD_IOC_SET_EXCEPTIONS_ENABLED
1219 * Set new exceptions to be raised to the debugger.1216 * Set new exceptions to be raised to the debugger.
1220 *1217 *
1221 * @exception_mask (IN) - new exceptions to raise the debugger1218 * @exception_mask: (IN) - new exceptions to raise the debugger
1222 *1219 *
1223 * Generic errors apply (see kfd_dbg_trap_operations).1220 * Generic errors apply (see kfd_dbg_trap_operations).
1224 * Return - 0 on SUCCESS.1221 * Return - 0 on SUCCESS.
@@ -1228,16 +1225,16 @@ struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args { · 3 unmodified lines
1228};1225};
1229 1226
1230/**1227/**
1231 * kfd_ioctl_dbg_trap_set_wave_launch_override_args1228 * struct kfd_ioctl_dbg_trap_set_wave_launch_override_args - Arguments for
1229 * KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE
1232 *1230 *
1233 * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_OVERRIDE
1234 * Enable HW exceptions to raise trap.1231 * Enable HW exceptions to raise trap.
1235 *1232 *
1236 * @override_mode (IN) - see kfd_dbg_trap_override_mode1233 * @override_mode: (IN) - see kfd_dbg_trap_override_mode
1237 * @enable_mask (IN/OUT) - reference kfd_dbg_trap_mask.1234 * @enable_mask: (IN/OUT) - reference kfd_dbg_trap_mask.
1238 * IN is the override modes requested to be enabled.1235 * IN is the override modes requested to be enabled.
1239 * OUT is referenced in Return below.1236 * OUT is referenced in Return below.
1240 * @support_request_mask (IN/OUT) - reference kfd_dbg_trap_mask.1237 * @support_request_mask: (IN/OUT) - reference kfd_dbg_trap_mask.
1241 * IN is the override modes requested for support check.1238 * IN is the override modes requested for support check.
1242 * OUT is referenced in Return below.1239 * OUT is referenced in Return below.
1243 *1240 *
@@ -1254,36 +1251,38 @@ struct kfd_ioctl_dbg_trap_set_wave_launch_override_args { · 10 unmodified lines
1254 __u32 override_mode;1251 __u32 override_mode;
1255 __u32 enable_mask;1252 __u32 enable_mask;
1256 __u32 support_request_mask;1253 __u32 support_request_mask;
1254 /* private: */
1257 __u32 pad;1255 __u32 pad;
1258};1256};
1259 1257
1260/**1258/**
1261 * kfd_ioctl_dbg_trap_set_wave_launch_mode_args1259 * struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args - Arguments for
1260 * KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE
1262 *1261 *
1263 * Arguments for KFD_IOC_DBG_TRAP_SET_WAVE_LAUNCH_MODE
1264 * Set wave launch mode.1262 * Set wave launch mode.
1265 *1263 *
1266 * @mode (IN) - see kfd_dbg_trap_wave_launch_mode1264 * @launch_mode: (IN) - see kfd_dbg_trap_wave_launch_mode
1267 *1265 *
1268 * Generic errors apply (see kfd_dbg_trap_operations).1266 * Generic errors apply (see kfd_dbg_trap_operations).
1269 * Return - 0 on SUCCESS.1267 * Return - 0 on SUCCESS.
1270 */1268 */
1271struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args {1269struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args {
1272 __u32 launch_mode;1270 __u32 launch_mode;
1271 /* private: */
1273 __u32 pad;1272 __u32 pad;
1274};1273};
1275 1274
1276/**1275/**
1277 * kfd_ioctl_dbg_trap_suspend_queues_ags1276 * struct kfd_ioctl_dbg_trap_suspend_queues_args - Arguments for
1277 * KFD_IOC_DBG_TRAP_SUSPEND_QUEUES
1278 *1278 *
1279 * Arguments for KFD_IOC_DBG_TRAP_SUSPEND_QUEUES
1280 * Suspend queues.1279 * Suspend queues.
1281 *1280 *
1282 * @exception_mask (IN) - raised exceptions to clear1281 * @exception_mask: (IN) - raised exceptions to clear
1283 * @queue_array_ptr (IN) - pointer to array of queue ids (u32 per queue id)1282 * @queue_array_ptr: (IN) - pointer to array of queue ids (u32 per queue id)
1284 * to suspend1283 * to suspend
1285 * @num_queues (IN) - number of queues to suspend in @queue_array_ptr1284 * @num_queues: (IN) - number of queues to suspend in @queue_array_ptr
1286 * @grace_period (IN) - wave time allowance before preemption1285 * @grace_period: (IN) - wave time allowance before preemption
1287 * per 1K GPU clock cycle unit1286 * per 1K GPU clock cycle unit
1288 *1287 *
1289 * Generic errors apply (see kfd_dbg_trap_operations).1288 * Generic errors apply (see kfd_dbg_trap_operations).
@@ -1311,14 +1310,14 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args { · 21 unmodified lines
1311};1310};
1312 1311
1313/**1312/**
1314 * kfd_ioctl_dbg_trap_resume_queues_args1313 * struct kfd_ioctl_dbg_trap_resume_queues_args - Arguments for
1314 * KFD_IOC_DBG_TRAP_RESUME_QUEUES
1315 *1315 *
1316 * Arguments for KFD_IOC_DBG_TRAP_RESUME_QUEUES
1317 * Resume queues.1316 * Resume queues.
1318 *1317 *
1319 * @queue_array_ptr (IN) - pointer to array of queue ids (u32 per queue id)1318 * @queue_array_ptr: (IN) - pointer to array of queue ids (u32 per queue id)
1320 * to resume1319 * to resume
1321 * @num_queues (IN) - number of queues to resume in @queue_array_ptr1320 * @num_queues: (IN) - number of queues to resume in @queue_array_ptr
1322 *1321 *
1323 * Generic errors apply (see kfd_dbg_trap_operations).1322 * Generic errors apply (see kfd_dbg_trap_operations).
1324 * Return - Number of queues resumed on SUCCESS.1323 * Return - Number of queues resumed on SUCCESS.
@@ -1331,20 +1330,21 @@ struct kfd_ioctl_dbg_trap_suspend_queues_args { · 6 unmodified lines
1331struct kfd_ioctl_dbg_trap_resume_queues_args {1330struct kfd_ioctl_dbg_trap_resume_queues_args {
1332 __u64 queue_array_ptr;1331 __u64 queue_array_ptr;
1333 __u32 num_queues;1332 __u32 num_queues;
1333 /* private: */
1334 __u32 pad;1334 __u32 pad;
1335};1335};
1336 1336
1337/**1337/**
1338 * kfd_ioctl_dbg_trap_set_node_address_watch_args1338 * struct kfd_ioctl_dbg_trap_set_node_address_watch_args - Arguments for
1339 * KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH
1339 *1340 *
1340 * Arguments for KFD_IOC_DBG_TRAP_SET_NODE_ADDRESS_WATCH
1341 * Sets address watch for device.1341 * Sets address watch for device.
1342 *1342 *
1343 * @address (IN) - watch address to set1343 * @address: (IN) - watch address to set
1344 * @mode (IN) - see kfd_dbg_trap_address_watch_mode1344 * @mode: (IN) - see kfd_dbg_trap_address_watch_mode
1345 * @mask (IN) - watch address mask1345 * @mask: (IN) - watch address mask
1346 * @gpu_id (IN) - target gpu to set watch point1346 * @gpu_id: (IN) - target gpu to set watch point
1347 * @id (OUT) - watch id allocated1347 * @id: (OUT) - watch id allocated
1348 *1348 *
1349 * Generic errors apply (see kfd_dbg_trap_operations).1349 * Generic errors apply (see kfd_dbg_trap_operations).
1350 * Return - 0 on SUCCESS.1350 * Return - 0 on SUCCESS.
@@ -1361,13 +1361,13 @@ struct kfd_ioctl_dbg_trap_set_node_address_watch_args { · 10 unmodified lines
1361};1361};
1362 1362
1363/**1363/**
1364 * kfd_ioctl_dbg_trap_clear_node_address_watch_args1364 * struct kfd_ioctl_dbg_trap_clear_node_address_watch_args - Arguments for
1365 * KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH
1365 *1366 *
1366 * Arguments for KFD_IOC_DBG_TRAP_CLEAR_NODE_ADDRESS_WATCH
1367 * Clear address watch for device.1367 * Clear address watch for device.
1368 *1368 *
1369 * @gpu_id (IN) - target device to clear watch point1369 * @gpu_id: (IN) - target device to clear watch point
1370 * @id (IN) - allocated watch id to clear1370 * @id: (IN) - allocated watch id to clear
1371 *1371 *
1372 * Generic errors apply (see kfd_dbg_trap_operations).1372 * Generic errors apply (see kfd_dbg_trap_operations).
1373 * Return - 0 on SUCCESS.1373 * Return - 0 on SUCCESS.
@@ -1380,12 +1380,12 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args { · 6 unmodified lines
1380};1380};
1381 1381
1382/**1382/**
1383 * kfd_ioctl_dbg_trap_set_flags_args1383 * struct kfd_ioctl_dbg_trap_set_flags_args - Arguments for
1384 * KFD_IOC_DBG_TRAP_SET_FLAGS
1384 *1385 *
1385 * Arguments for KFD_IOC_DBG_TRAP_SET_FLAGS
1386 * Sets flags for wave behaviour.1386 * Sets flags for wave behaviour.
1387 *1387 *
1388 * @flags (IN/OUT) - IN = flags to enable, OUT = flags previously enabled1388 * @flags: (IN/OUT) - IN = flags to enable, OUT = flags previously enabled
1389 *1389 *
1390 * Generic errors apply (see kfd_dbg_trap_operations).1390 * Generic errors apply (see kfd_dbg_trap_operations).
1391 * Return - 0 on SUCCESS.1391 * Return - 0 on SUCCESS.
@@ -1393,13 +1393,13 @@ struct kfd_ioctl_dbg_trap_clear_node_address_watch_args { · 1 unmodified line
1393 */1393 */
1394struct kfd_ioctl_dbg_trap_set_flags_args {1394struct kfd_ioctl_dbg_trap_set_flags_args {
1395 __u32 flags;1395 __u32 flags;
1396 /* private: */
1396 __u32 pad;1397 __u32 pad;
1397};1398};
1398 1399
1399/**1400/**
1400 * kfd_ioctl_dbg_trap_query_debug_event_args1401 * struct kfd_ioctl_dbg_trap_query_debug_event_args - Arguments for
1401 *1402 * KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT
1402 * Arguments for KFD_IOC_DBG_TRAP_QUERY_DEBUG_EVENT
1403 *1403 *
1404 * Find one or more raised exceptions. This function can return multiple1404 * Find one or more raised exceptions. This function can return multiple
1405 * exceptions from a single queue or a single device with one call. To find1405 * exceptions from a single queue or a single device with one call. To find
@@ -1409,9 +1409,9 @@ struct kfd_ioctl_dbg_trap_set_flags_args { · 3 unmodified lines
1409 * However, clearing an exception prevents retrieving further information1409 * However, clearing an exception prevents retrieving further information
1410 * about it with KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO.1410 * about it with KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO.
1411 *1411 *
1412 * @exception_mask (IN/OUT) - exception to clear (IN) and raised (OUT)1412 * @exception_mask: (IN/OUT) - exception to clear (IN) and raised (OUT)
1413 * @gpu_id (OUT) - gpu id of exceptions raised1413 * @gpu_id: (OUT) - gpu id of exceptions raised
1414 * @queue_id (OUT) - queue id of exceptions raised1414 * @queue_id: (OUT) - queue id of exceptions raised
1415 *1415 *
1416 * Generic errors apply (see kfd_dbg_trap_operations).1416 * Generic errors apply (see kfd_dbg_trap_operations).
1417 * Return - 0 on raised exception found1417 * Return - 0 on raised exception found
@@ -1426,16 +1426,16 @@ struct kfd_ioctl_dbg_trap_query_debug_event_args { · 8 unmodified lines
1426};1426};
1427 1427
1428/**1428/**
1429 * kfd_ioctl_dbg_trap_query_exception_info_args1429 * struct kfd_ioctl_dbg_trap_query_exception_info_args - Arguments for
1430 * KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO
1430 *1431 *
1431 * Arguments KFD_IOC_DBG_TRAP_QUERY_EXCEPTION_INFO
1432 * Get additional info on raised exception.1432 * Get additional info on raised exception.
1433 *1433 *
1434 * @info_ptr (IN) - pointer to exception info buffer to copy to1434 * @info_ptr: (IN) - pointer to exception info buffer to copy to
1435 * @info_size (IN/OUT) - exception info buffer size (bytes)1435 * @info_size: (IN/OUT) - exception info buffer size (bytes)
1436 * @source_id (IN) - target gpu or queue id1436 * @source_id: (IN) - target gpu or queue id
1437 * @exception_code (IN) - target exception1437 * @exception_code: (IN) - target exception
1438 * @clear_exception (IN) - clear raised @exception_code exception1438 * @clear_exception: (IN) - clear raised @exception_code exception
1439 * (0 = false, 1 = true)1439 * (0 = false, 1 = true)
1440 *1440 *
1441 * Generic errors apply (see kfd_dbg_trap_operations).1441 * Generic errors apply (see kfd_dbg_trap_operations).
@@ -1455,20 +1455,20 @@ struct kfd_ioctl_dbg_trap_query_exception_info_args { · 13 unmodified lines
1455};1455};
1456 1456
1457/**1457/**
1458 * kfd_ioctl_dbg_trap_get_queue_snapshot_args1458 * struct kfd_ioctl_dbg_trap_queue_snapshot_args - Arguments for
1459 * KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT
1459 *1460 *
1460 * Arguments KFD_IOC_DBG_TRAP_GET_QUEUE_SNAPSHOT
1461 * Get queue information.1461 * Get queue information.
1462 *1462 *
1463 * @exception_mask (IN) - exceptions raised to clear1463 * @exception_mask: (IN) - exceptions raised to clear
1464 * @snapshot_buf_ptr (IN) - queue snapshot entry buffer (see kfd_queue_snapshot_entry)1464 * @snapshot_buf_ptr: (IN) - queue snapshot entry buffer (see kfd_queue_snapshot_entry)
1465 * @num_queues (IN/OUT) - number of queue snapshot entries1465 * @num_queues: (IN/OUT) - number of queue snapshot entries
1466 * The debugger specifies the size of the array allocated in @num_queues.1466 * The debugger specifies the size of the array allocated in @num_queues.
1467 * KFD returns the number of queues that actually existed. If this is1467 * KFD returns the number of queues that actually existed. If this is
1468 * larger than the size specified by the debugger, KFD will not overflow1468 * larger than the size specified by the debugger, KFD will not overflow
1469 * the array allocated by the debugger.1469 * the array allocated by the debugger.
1470 *1470 *
1471 * @entry_size (IN/OUT) - size per entry in bytes1471 * @entry_size: (IN/OUT) - size per entry in bytes
1472 * The debugger specifies sizeof(struct kfd_queue_snapshot_entry) in1472 * The debugger specifies sizeof(struct kfd_queue_snapshot_entry) in
1473 * @entry_size. KFD returns the number of bytes actually populated per1473 * @entry_size. KFD returns the number of bytes actually populated per
1474 * entry. The debugger should use the KFD_IOCTL_MINOR_VERSION to determine,1474 * entry. The debugger should use the KFD_IOCTL_MINOR_VERSION to determine,
@@ -1491,20 +1491,20 @@ struct kfd_ioctl_dbg_trap_queue_snapshot_args { · 16 unmodified lines
1491};1491};
1492 1492
1493/**1493/**
1494 * kfd_ioctl_dbg_trap_get_device_snapshot_args1494 * struct kfd_ioctl_dbg_trap_device_snapshot_args - Arguments for
1495 * KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT
1495 *1496 *
1496 * Arguments for KFD_IOC_DBG_TRAP_GET_DEVICE_SNAPSHOT
1497 * Get device information.1497 * Get device information.
1498 *1498 *
1499 * @exception_mask (IN) - exceptions raised to clear1499 * @exception_mask: (IN) - exceptions raised to clear
1500 * @snapshot_buf_ptr (IN) - pointer to snapshot buffer (see kfd_dbg_device_info_entry)1500 * @snapshot_buf_ptr: (IN) - pointer to snapshot buffer (see kfd_dbg_device_info_entry)
1501 * @num_devices (IN/OUT) - number of debug devices to snapshot1501 * @num_devices: (IN/OUT) - number of debug devices to snapshot
1502 * The debugger specifies the size of the array allocated in @num_devices.1502 * The debugger specifies the size of the array allocated in @num_devices.
1503 * KFD returns the number of devices that actually existed. If this is1503 * KFD returns the number of devices that actually existed. If this is
1504 * larger than the size specified by the debugger, KFD will not overflow1504 * larger than the size specified by the debugger, KFD will not overflow
1505 * the array allocated by the debugger.1505 * the array allocated by the debugger.
1506 *1506 *
1507 * @entry_size (IN/OUT) - size per entry in bytes1507 * @entry_size: (IN/OUT) - size per entry in bytes
1508 * The debugger specifies sizeof(struct kfd_dbg_device_info_entry) in1508 * The debugger specifies sizeof(struct kfd_dbg_device_info_entry) in
1509 * @entry_size. KFD returns the number of bytes actually populated. The1509 * @entry_size. KFD returns the number of bytes actually populated. The
1510 * debugger should use KFD_IOCTL_MINOR_VERSION to determine, which fields1510 * debugger should use KFD_IOCTL_MINOR_VERSION to determine, which fields
@@ -1527,12 +1527,10 @@ struct kfd_ioctl_dbg_trap_device_snapshot_args { · 16 unmodified lines
1527};1527};
1528 1528
1529/**1529/**
1530 * kfd_ioctl_dbg_trap_args1530 * struct kfd_ioctl_dbg_trap_args - Arguments to debug target process.
1531 *
1532 * Arguments to debug target process.
1533 *1531 *
1534 * @pid - target process to debug1532 * @pid: target process to debug
1535 * @op - debug operation (see kfd_dbg_trap_operations)1533 * @op: debug operation (see kfd_dbg_trap_operations)
1536 *1534 *
1537 * @op determines which union struct args to use.1535 * @op determines which union struct args to use.
1538 * Refer to kern docs for each kfd_ioctl_dbg_trap_*_args struct.1536 * Refer to kern docs for each kfd_ioctl_dbg_trap_*_args struct.
@@ -1567,7 +1565,7 @@ enum kfd_profiler_ops { · 28 unmodified lines
1567};1565};
1568 1566
1569/**1567/**
1570 * Enables/Disables GPU Specific profiler settings1568 * struct kfd_ioctl_pmc_settings - Enables/Disables GPU Specific profiler settings
1571 */1569 */
1572struct kfd_ioctl_pmc_settings {1570struct kfd_ioctl_pmc_settings {
1573 __u32 gpu_id; /* This is the user_gpu_id */1571 __u32 gpu_id; /* This is the user_gpu_id */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t