History

Merge tag 'drm-next-2024-09-19' of https://gitlab.freedesktop.org/drm/kernel

Pull drm updates from Dave Airlie: "This adds a couple of patches outside the drm core, all should be acked appropriately, the string and pstore ones are the main ones that come to mind. Otherwise it's the usual drivers, xe is getting enabled by default on some new hardware, we've changed the device number handling to allow more devices, and we added some optional rust code to create QR codes in the panic handler, an idea first suggested I think 10 years ago :-) string: - add mem_is_zero() core: - support more device numbers - use XArray for minor ids - add backlight constants - Split dma fence array creation into alloc and arm fbdev: - remove usage of old fbdev hooks kms: - Add might_fault() to drm_modeset_lock priming - Add dynamic per-crtc vblank configuration support dma-buf: - docs cleanup buddy: - Add start address support for trim function printk: - pass description to kmsg_dump scheduler: - Remove full_recover from drm_sched_start ttm: - Make LRU walk restartable after dropping locks - Allow direct reclaim to allocate local memory panic: - add display QR code (in rust) displayport: - mst: GUID improvements bridge: - Silence error message on -EPROBE_DEFER - analogix: Clean aup - bridge-connector: Fix double free - lt6505: Disable interrupt when powered off - tc358767: Make default DP port preemphasis configurable - lt9611uxc: require DRM_BRIDGE_ATTACH_NO_CONNECTOR - anx7625: simplify OF array handling - dw-hdmi: simplify clock handling - lontium-lt8912b: fix mode validation - nwl-dsi: fix mode vsync/hsync polarity xe: - Enable LunarLake and Battlemage support - Introducing Xe2 ccs modifiers for integrated and discrete graphics - rename xe perf to xe observation - use wb caching on DGFX for system memory - add fence timeouts - Lunar Lake graphics/media/display workarounds - Battlemage workarounds - Battlemage GSC support - GSC and HuC fw updates for LL/BM - use dma_fence_chain_free - refactor hw engine lookup and mmio access - enable priority mem read for Xe2 - Add first GuC BMG fw - fix dma-resv lock - Fix DGFX display suspend/resume - Use xe_managed for kernel BOs - Use reserved copy engine for user binds on faulting devices - Allow mixing dma-fence jobs and long-running faulting jobs - fix media TLB invalidation - fix rpm in TTM swapout path - track resources and VF state by PF i915: - Type-C programming fix for MTL+ - FBC cleanup - Calc vblank delay more accurately - On DP MST, Enable LT fallback for UHBR<->non-UHBR rates - Fix DP LTTPR detection - limit relocations to INT_MAX - fix long hangs in buddy allocator on DG2/A380 amdgpu: - Per-queue reset support - SDMA devcoredump support - DCN 4.0.1 updates - GFX12/VCN4/JPEG4 updates - Convert vbios embedded EDID to drm_edid - GFX9.3/9.4 devcoredump support - process isolation framework for GFX 9.4.3/4 - take IOMMU mappings into account for P2P DMA amdkfd: - CRIU fixes - HMM fix - Enable process isolation support for GFX 9.4.3/4 - Allow users to target recommended SDMA engines - KFD support for targetting queues on recommended SDMA engines radeon: - remove .load and drm_dev_alloc - Fix vbios embedded EDID size handling - Convert vbios embedded EDID to drm_edid - Use GEM references instead of TTM - r100 cp init cleanup - Fix potential overflows in evergreen CS offset tracking msm: - DPU: - implement DP/PHY mapping on SC8180X - Enable writeback on SM8150, SC8180X, SM6125, SM6350 - DP: - Enable widebus on all relevant chipsets - MSM8998 HDMI support - GPU: - A642L speedbin support - A615/A306/A621 support - A7xx devcoredump support ast: - astdp: Support AST2600 with VGA - Clean up HPD - Fix timeout loop for DP link training - reorganize output code by type (VGA, DP, etc) - convert to struct drm_edid - fix BMC handling for all outputs exynos: - drop stale MAINTAINERS pattern - constify struct loongson: - use GEM refcount over TTM mgag200: - Improve BMC handling - Support VBLANK intterupts - transparently support BMC outputs nouveau: - Refactor and clean up internals - Use GEM refcount over TTM's gm12u320: - convert to struct drm_edid gma500: - update i2c terms lcdif: - pixel clock fix host1x: - fix syncpoint IRQ during resume - use iommu_paging_domain_alloc() imx: - ipuv3: convert to struct drm_edid omapdrm: - improve error handling - use common helper for_each_endpoint_of_node() panel: - add support for BOE TV101WUM-LL2 plus DT bindings - novatek-nt35950: improve error handling - nv3051d: improve error handling - panel-edp: - add support for BOE NE140WUM-N6G - revert support for SDC ATNA45AF01 - visionox-vtdr6130: - improve error handling - use devm_regulator_bulk_get_const() - boe-th101mb31ig002: - Support for starry-er88577 MIPI-DSI panel plus DT - Fix porch parameter - edp: Support AOU B116XTN02.3, AUO B116XAN06.1, AOU B116XAT04.1, BOE NV140WUM-N41, BOE NV133WUM-N63, BOE NV116WHM-A4D, CMN N116BCA-EA2, CMN N116BCP-EA2, CSW MNB601LS1-4 - himax-hx8394: Support Microchip AC40T08A MIPI Display panel plus DT - ilitek-ili9806e: Support Densitron DMT028VGHMCMI-1D TFT plus DT - jd9365da: - Support Melfas lmfbx101117480 MIPI-DSI panel plus DT - Refactor for code sharing - panel-edp: fix name for HKC MB116AN01 - jd9365da: fix "exit sleep" commands - jdi-fhd-r63452: simplify error handling with DSI multi-style helpers - mantix-mlaf057we51: simplify error handling with DSI multi-style helpers - simple: - support Innolux G070ACE-LH3 plus DT bindings - support On Tat Industrial Company KD50G21-40NT-A1 plus DT bindings - st7701: - decouple DSI and DRM code - add SPI support - support Anbernic RG28XX plus DT bindings mediatek: - support alpha blending - remove cl in struct cmdq_pkt - ovl adaptor fix - add power domain binding for mediatek DPI controller renesas: - rz-du: add support for RZ/G2UL plus DT bindings rockchip: - Improve DP sink-capability reporting - dw_hdmi: Support 4k@60Hz - vop: - Support RGB display on Rockchip RK3066 - Support 4096px width sti: - convert to struct drm_edid stm: - Avoid UAF wih managed plane and CRTC helpers - Fix module owner - Fix error handling in probe - Depend on COMMON_CLK - ltdc: - Fix transparency after disabling plane - Remove unused interrupt tegra: - gr3d: improve PM domain handling - convert to struct drm_edid - Call drm_atomic_helper_shutdown() vc4: - fix PM during detect - replace DRM_ERROR() with drm_error() - v3d: simplify clock retrieval v3d: - Clean up perfmon virtio: - add DRM capset" * tag 'drm-next-2024-09-19' of https://gitlab.freedesktop.org/drm/kernel: (1326 commits) drm/xe: Fix missing conversion to xe_display_pm_runtime_resume drm/xe/xe2hpg: Add Wa_15016589081 drm/xe: Don't keep stale pointer to bo->ggtt_node drm/xe: fix missing 'xe_vm_put' drm/xe: fix build warning with CONFIG_PM=n drm/xe: Suppress missing outer rpm protection warning drm/xe: prevent potential UAF in pf_provision_vf_ggtt() drm/amd/display: Add all planes on CRTC to state for overlay cursor drm/i915/bios: fix printk format width drm/i915/display: Fix BMG CCS modifiers drm/amdgpu: get rid of bogus includes of fdtable.h drm/amdkfd: CRIU fixes drm/amdgpu: fix a race in kfd_mem_export_dmabuf() drm: new helper: drm_gem_prime_handle_to_dmabuf() drm/amdgpu/atomfirmware: Silence UBSAN warning drm/amdgpu: Fix kdoc entry in 'amdgpu_vm_cpu_prepare' drm/amd/amdgpu: apply command submission parser for JPEG v1 drm/amd/amdgpu: apply command submission parser for JPEG v2+ drm/amd/pm: fix the pp_dpm_pcie issue on smu v14.0.2/3 drm/amd/pm: update the features set on smu v14.0.2/3 ...

Linus Torvalds committed 2 years ago

Commit de848da2 parents 1760007 ae2c6d81267 files · +43509 −21686Browse files

Showing the changes to include/uapi/linux (2 of 1267 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/kfd_ioctl.h +92 −14
  2. include/uapi/linux/virtio_gpu.h +1 −0
include/uapi/linux/kfd_ioctl.h+92−14
@@ -42,9 +42,10 @@ · 41 unmodified lines
42 * - 1.14 - Update kfd_event_data42 * - 1.14 - Update kfd_event_data
43 * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl43 * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl
44 * - 1.16 - Add contiguous VRAM allocation flag44 * - 1.16 - Add contiguous VRAM allocation flag
45 * - 1.17 - Add SDMA queue creation with target SDMA engine ID
45 */46 */
46#define KFD_IOCTL_MAJOR_VERSION 147#define KFD_IOCTL_MAJOR_VERSION 1
47#define KFD_IOCTL_MINOR_VERSION 1648#define KFD_IOCTL_MINOR_VERSION 17
48 49
49struct kfd_ioctl_get_version_args {50struct kfd_ioctl_get_version_args {
50 __u32 major_version; /* from KFD */51 __u32 major_version; /* from KFD */
@@ -56,6 +57,7 @@ struct kfd_ioctl_get_version_args { · 5 unmodified lines
56#define KFD_IOC_QUEUE_TYPE_SDMA 0x157#define KFD_IOC_QUEUE_TYPE_SDMA 0x1
57#define KFD_IOC_QUEUE_TYPE_COMPUTE_AQL 0x258#define KFD_IOC_QUEUE_TYPE_COMPUTE_AQL 0x2
58#define KFD_IOC_QUEUE_TYPE_SDMA_XGMI 0x359#define KFD_IOC_QUEUE_TYPE_SDMA_XGMI 0x3
60#define KFD_IOC_QUEUE_TYPE_SDMA_BY_ENG_ID 0x4
59 61
60#define KFD_MAX_QUEUE_PERCENTAGE 10062#define KFD_MAX_QUEUE_PERCENTAGE 100
61#define KFD_MAX_QUEUE_PRIORITY 1563#define KFD_MAX_QUEUE_PRIORITY 15
@@ -78,6 +80,8 @@ struct kfd_ioctl_create_queue_args { · 16 unmodified lines
78 __u64 ctx_save_restore_address; /* to KFD */80 __u64 ctx_save_restore_address; /* to KFD */
79 __u32 ctx_save_restore_size; /* to KFD */81 __u32 ctx_save_restore_size; /* to KFD */
80 __u32 ctl_stack_size; /* to KFD */82 __u32 ctl_stack_size; /* to KFD */
83 __u32 sdma_engine_id; /* to KFD */
84 __u32 pad;
81};85};
82 86
83struct kfd_ioctl_destroy_queue_args {87struct kfd_ioctl_destroy_queue_args {
@@ -536,26 +540,29 @@ enum kfd_smi_event { · 452 unmodified lines
536 KFD_SMI_EVENT_ALL_PROCESS = 64540 KFD_SMI_EVENT_ALL_PROCESS = 64
537};541};
538 542
543/* The reason of the page migration event */
539enum KFD_MIGRATE_TRIGGERS {544enum KFD_MIGRATE_TRIGGERS {
540 KFD_MIGRATE_TRIGGER_PREFETCH,545 KFD_MIGRATE_TRIGGER_PREFETCH, /* Prefetch to GPU VRAM or system memory */
541 KFD_MIGRATE_TRIGGER_PAGEFAULT_GPU,546 KFD_MIGRATE_TRIGGER_PAGEFAULT_GPU, /* GPU page fault recover */
542 KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU,547 KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU, /* CPU page fault recover */
543 KFD_MIGRATE_TRIGGER_TTM_EVICTION548 KFD_MIGRATE_TRIGGER_TTM_EVICTION /* TTM eviction */
544};549};
545 550
551/* The reason of user queue evition event */
546enum KFD_QUEUE_EVICTION_TRIGGERS {552enum KFD_QUEUE_EVICTION_TRIGGERS {
547 KFD_QUEUE_EVICTION_TRIGGER_SVM,553 KFD_QUEUE_EVICTION_TRIGGER_SVM, /* SVM buffer migration */
548 KFD_QUEUE_EVICTION_TRIGGER_USERPTR,554 KFD_QUEUE_EVICTION_TRIGGER_USERPTR, /* userptr movement */
549 KFD_QUEUE_EVICTION_TRIGGER_TTM,555 KFD_QUEUE_EVICTION_TRIGGER_TTM, /* TTM move buffer */
550 KFD_QUEUE_EVICTION_TRIGGER_SUSPEND,556 KFD_QUEUE_EVICTION_TRIGGER_SUSPEND, /* GPU suspend */
551 KFD_QUEUE_EVICTION_CRIU_CHECKPOINT,557 KFD_QUEUE_EVICTION_CRIU_CHECKPOINT, /* CRIU checkpoint */
552 KFD_QUEUE_EVICTION_CRIU_RESTORE558 KFD_QUEUE_EVICTION_CRIU_RESTORE /* CRIU restore */
553};559};
554 560
561/* The reason of unmap buffer from GPU event */
555enum KFD_SVM_UNMAP_TRIGGERS {562enum KFD_SVM_UNMAP_TRIGGERS {
556 KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY,563 KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY, /* MMU notifier CPU buffer movement */
557 KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY_MIGRATE,564 KFD_SVM_UNMAP_TRIGGER_MMU_NOTIFY_MIGRATE,/* MMU notifier page migration */
558 KFD_SVM_UNMAP_TRIGGER_UNMAP_FROM_CPU565 KFD_SVM_UNMAP_TRIGGER_UNMAP_FROM_CPU /* Unmap to free the buffer */
559};566};
560 567
561#define KFD_SMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))568#define KFD_SMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
@@ -566,6 +573,77 @@ struct kfd_ioctl_smi_events_args { · 4 unmodified lines
566 __u32 anon_fd; /* from KFD */573 __u32 anon_fd; /* from KFD */
567};574};
568 575
576/*
577 * SVM event tracing via SMI system management interface
578 *
579 * Open event file descriptor
580 * use ioctl AMDKFD_IOC_SMI_EVENTS, pass in gpuid and return a anonymous file
581 * descriptor to receive SMI events.
582 * If calling with sudo permission, then file descriptor can be used to receive
583 * SVM events from all processes, otherwise, to only receive SVM events of same
584 * process.
585 *
586 * To enable the SVM event
587 * Write event file descriptor with KFD_SMI_EVENT_MASK_FROM_INDEX(event) bitmap
588 * mask to start record the event to the kfifo, use bitmap mask combination
589 * for multiple events. New event mask will overwrite the previous event mask.
590 * KFD_SMI_EVENT_MASK_FROM_INDEX(KFD_SMI_EVENT_ALL_PROCESS) bit requires sudo
591 * permisson to receive SVM events from all process.
592 *
593 * To receive the event
594 * Application can poll file descriptor to wait for the events, then read event
595 * from the file into a buffer. Each event is one line string message, starting
596 * with the event id, then the event specific information.
597 *
598 * To decode event information
599 * The following event format string macro can be used with sscanf to decode
600 * the specific event information.
601 * event triggers: the reason to generate the event, defined as enum for unmap,
602 * eviction and migrate events.
603 * node, from, to, prefetch_loc, preferred_loc: GPU ID, or 0 for system memory.
604 * addr: user mode address, in pages
605 * size: in pages
606 * pid: the process ID to generate the event
607 * ns: timestamp in nanosecond-resolution, starts at system boot time but
608 * stops during suspend
609 * migrate_update: GPU page fault is recovered by 'M' for migrate, 'U' for update
610 * rw: 'W' for write page fault, 'R' for read page fault
611 * rescheduled: 'R' if the queue restore failed and rescheduled to try again
612 */
613#define KFD_EVENT_FMT_UPDATE_GPU_RESET(reset_seq_num, reset_cause)\
614 "%x %s\n", (reset_seq_num), (reset_cause)
615
616#define KFD_EVENT_FMT_THERMAL_THROTTLING(bitmask, counter)\
617 "%llx:%llx\n", (bitmask), (counter)
618
619#define KFD_EVENT_FMT_VMFAULT(pid, task_name)\
620 "%x:%s\n", (pid), (task_name)
621
622#define KFD_EVENT_FMT_PAGEFAULT_START(ns, pid, addr, node, rw)\
623 "%lld -%d @%lx(%x) %c\n", (ns), (pid), (addr), (node), (rw)
624
625#define KFD_EVENT_FMT_PAGEFAULT_END(ns, pid, addr, node, migrate_update)\
626 "%lld -%d @%lx(%x) %c\n", (ns), (pid), (addr), (node), (migrate_update)
627
628#define KFD_EVENT_FMT_MIGRATE_START(ns, pid, start, size, from, to, prefetch_loc,\
629 preferred_loc, migrate_trigger)\
630 "%lld -%d @%lx(%lx) %x->%x %x:%x %d\n", (ns), (pid), (start), (size),\
631 (from), (to), (prefetch_loc), (preferred_loc), (migrate_trigger)
632
633#define KFD_EVENT_FMT_MIGRATE_END(ns, pid, start, size, from, to, migrate_trigger)\
634 "%lld -%d @%lx(%lx) %x->%x %d\n", (ns), (pid), (start), (size),\
635 (from), (to), (migrate_trigger)
636
637#define KFD_EVENT_FMT_QUEUE_EVICTION(ns, pid, node, evict_trigger)\
638 "%lld -%d %x %d\n", (ns), (pid), (node), (evict_trigger)
639
640#define KFD_EVENT_FMT_QUEUE_RESTORE(ns, pid, node, rescheduled)\
641 "%lld -%d %x %c\n", (ns), (pid), (node), (rescheduled)
642
643#define KFD_EVENT_FMT_UNMAP_FROM_GPU(ns, pid, addr, size, node, unmap_trigger)\
644 "%lld -%d @%lx(%lx) %x %d\n", (ns), (pid), (addr), (size),\
645 (node), (unmap_trigger)
646
569/**************************************************************************************************647/**************************************************************************************************
570 * CRIU IOCTLs (Checkpoint Restore In Userspace)648 * CRIU IOCTLs (Checkpoint Restore In Userspace)
571 *649 *
include/uapi/linux/virtio_gpu.h+1−0
@@ -311,6 +311,7 @@ struct virtio_gpu_cmd_submit { · 310 unmodified lines
311#define VIRTIO_GPU_CAPSET_VIRGL2 2311#define VIRTIO_GPU_CAPSET_VIRGL2 2
312/* 3 is reserved for gfxstream */312/* 3 is reserved for gfxstream */
313#define VIRTIO_GPU_CAPSET_VENUS 4313#define VIRTIO_GPU_CAPSET_VENUS 4
314#define VIRTIO_GPU_CAPSET_DRM 6
314 315
315/* VIRTIO_GPU_CMD_GET_CAPSET_INFO */316/* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
316struct virtio_gpu_get_capset_info {317struct virtio_gpu_get_capset_info {