Skip to content

Commit 83631c7

Browse files
committed
Merge tag 'drm-xe-next-2025-08-29' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
UAPI Changes: - Add madvise interface (Himal Prasad Ghimiray) - Add DRM_IOCTL_XE_VM_QUERY_MEMORY_RANGE_ATTRS to query VMA count and memory attributes (Himal Prasad Ghimiray) - Handle Firmware reported Hardware Errors notifying userspace with device wedged uevent (Riana Tauro) Cross-subsystem Changes: - Add a vendor-specific recovery method to drm device wedged uevent (Riana Tauro) Driver Changes: - Use same directory structure in debugfs as in sysfs (Michal Wajdeczko) - Cleanup and future-proof VRAM region initialization (Piotr Piórkowski) - Add G-states and PCIe link states to debugfs (Soham Purkait) - Cleanup eustall debug messages (Harish Chegondi) - Add SR-IOV support to restore Compression Control Surface (CCS) to Xe2 and later (Satyanarayana K V P) - Enable SR-IOV PF mode by default on supported platforms without needing CONFIG_DRM_XE_DEBUG and mark some platforms behind force_probe as supported (Michal Wajdeczko) - More targeted log messages (Michal Wajdeczko) - Cleanup STEER_SEMAPHORE/MCFG_MCR_SELECTOR usage (Nitin Gote) - Use common code to emit flush (Tvrtko Ursulin) - Add/extend more HW workarounds and tunings for Xe2 and Xe3 (Sk Anirban, Tangudu Tilak Tirumalesh, Nitin Gote, Chaitanya Kumar Borah) - Add a generic dependency scheduler to help with TLB invalidations and future scenarios (Matthew Brost) - Use DRM scheduler for delayed GT TLB invalidations (Matthew Brost) - Error out on incorrect device use in configfs (Michal Wajdeczko, Lucas De Marchi) - Refactor configfs attributes (Michal Wajdeczko / Lucas De Marchi) - Allow configuring future VF devices via configfs (Michal Wajdeczko) - Implement some missing XeLP workarounds (Tvrtko Ursulin) - Generalize WA BB setup/emission and add support for mid context restore BB, aka indirect context (Tvrtko Ursulin) - Prepare the driver to expose mmio regions to userspace in future (Ilia Levi) - Add more GuC load error status codes (John Harrison) - Document DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING (Priyanka Dandamudi) - Disable CSC and RPM on VFs (Lukasz Laguna, Satyanarayana K V P) - Fix oops in xe_gem_fault with PREEMPT_RT (Maarten Lankhorst) - Skip LMTT update if no LMEM was provisioned (Michal Wajdeczko) - Add support to VF migration (Tomasz Lis) - Use a helper for guc_waklv_enable functions (Jonathan Cavitt) - Prepare GPU SVM for migration of THP (Francois Dugast) - Program LMTT directory pointer on all GTs within a tile (Piotr Piórkowski) - Rename XE_WA to XE_GT_WA to better convey its scope vs the device WAs (Matt Atwood) - Allow to match devices on PCI devid/vendorid only (Lucas De Marchi) - Improve PDE PAT index selection (Matthew Brost) - Consolidate ASID allocation in xe_vm_create() vs xe_vm_create_ioctl() (Piotr Piórkowski) - Resize VF BARS to max possible size according to number of VFs (Michał Winiarski) - Untangle vm_bind_ioctl cleanup order (Christoph Manszewski) - Start fixing usage of XE_PAGE_SIZE vs PAGE_SIZE to improve compatibility with non-x86 arch (Simon Richter) - Improve tile vs gt initialization order and accounting (Gustavo Sousa) - Extend WA kunit test to PTL - Ensure data is initialized before transferring to pcode (Stuart Summers) - Add PSMI support for HW validation (Lucas De Marchi, Vinay Belgaumkar, Badal Nilawar) - Improve xe_dma_buf test (Thomas Hellström, Marcin Bernatowicz) - Fix basename() usage in generator with !glibc (Carlos Llamas) - Ensure GT is in C0 during resumes (Xin Wang) - Add TLB invalidation abstraction (Matt Brost, Stuart Summers) - Make MI_TLB_INVALIDATE conditional on migrate (Matthew Auld) - Prepare xe_nvm to be initialized early for future use cases (Riana Tauro) Signed-off-by: Dave Airlie <[email protected]> From: Lucas De Marchi <[email protected]> Link: https://lore.kernel.org/r/nuejxdhnalyok7tzwkrj67dwjgdafwp4mhdejpyyqnrh4f2epq@nlldovuflnbx
2 parents 14579a6 + 1047bd8 commit 83631c7

File tree

154 files changed

+7226
-1875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+7226
-1875
lines changed

Documentation/gpu/drm-uapi.rst

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,12 @@ needed.
418418
Recovery
419419
--------
420420

421-
Current implementation defines three recovery methods, out of which, drivers
421+
Current implementation defines four recovery methods, out of which, drivers
422422
can use any one, multiple or none. Method(s) of choice will be sent in the
423423
uevent environment as ``WEDGED=<method1>[,..,<methodN>]`` in order of less to
424-
more side-effects. If driver is unsure about recovery or method is unknown
425-
(like soft/hard system reboot, firmware flashing, physical device replacement
426-
or any other procedure which can't be attempted on the fly), ``WEDGED=unknown``
427-
will be sent instead.
424+
more side-effects. See the section `Vendor Specific Recovery`_
425+
for ``WEDGED=vendor-specific``. If driver is unsure about recovery or
426+
method is unknown, ``WEDGED=unknown`` will be sent instead.
428427

429428
Userspace consumers can parse this event and attempt recovery as per the
430429
following expectations.
@@ -435,6 +434,7 @@ following expectations.
435434
none optional telemetry collection
436435
rebind unbind + bind driver
437436
bus-reset unbind + bus reset/re-enumeration + bind
437+
vendor-specific vendor specific recovery method
438438
unknown consumer policy
439439
=============== ========================================
440440

@@ -446,6 +446,35 @@ telemetry information (devcoredump, syslog). This is useful because the first
446446
hang is usually the most critical one which can result in consequential hangs or
447447
complete wedging.
448448

449+
450+
Vendor Specific Recovery
451+
------------------------
452+
453+
When ``WEDGED=vendor-specific`` is sent, it indicates that the device requires
454+
a recovery procedure specific to the hardware vendor and is not one of the
455+
standardized approaches.
456+
457+
``WEDGED=vendor-specific`` may be used to indicate different cases within a
458+
single vendor driver, each requiring a distinct recovery procedure.
459+
In such scenarios, the vendor driver must provide comprehensive documentation
460+
that describes each case, include additional hints to identify specific case and
461+
outline the corresponding recovery procedure. The documentation includes:
462+
463+
Case - A list of all cases that sends the ``WEDGED=vendor-specific`` recovery method.
464+
465+
Hints - Additional Information to assist the userspace consumer in identifying and
466+
differentiating between different cases. This can be exposed through sysfs, debugfs,
467+
traces, dmesg etc.
468+
469+
Recovery Procedure - Clear instructions and guidance for recovering each case.
470+
This may include userspace scripts, tools needed for the recovery procedure.
471+
472+
It is the responsibility of the admin/userspace consumer to identify the case and
473+
verify additional identification hints before attempting a recovery procedure.
474+
475+
Example: If the device uses the Xe driver, then userspace consumer should refer to
476+
:ref:`Xe Device Wedging <xe-device-wedging>` for the detailed documentation.
477+
449478
Task information
450479
----------------
451480

@@ -472,8 +501,12 @@ erroring out, all device memory should be unmapped and file descriptors should
472501
be closed to prevent leaks or undefined behaviour. The idea here is to clear the
473502
device of all user context beforehand and set the stage for a clean recovery.
474503

475-
Example
476-
-------
504+
For ``WEDGED=vendor-specific`` recovery method, it is the responsibility of the
505+
consumer to check the driver documentation and the usecase before attempting
506+
a recovery.
507+
508+
Example - rebind
509+
----------------
477510

478511
Udev rule::
479512

Documentation/gpu/xe/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ DG2, etc is provided to prototype the driver.
2525
xe_tile
2626
xe_debugging
2727
xe_devcoredump
28+
xe_device
2829
xe-drm-usage-stats.rst
2930
xe_configfs

Documentation/gpu/xe/xe_device.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
3+
.. _xe-device-wedging:
4+
5+
==================
6+
Xe Device Wedging
7+
==================
8+
9+
.. kernel-doc:: drivers/gpu/drm/xe/xe_device.c
10+
:doc: Xe Device Wedging

Documentation/gpu/xe/xe_pcode.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ Internal API
1313
.. kernel-doc:: drivers/gpu/drm/xe/xe_pcode.c
1414
:internal:
1515

16+
.. _xe-survivability-mode:
17+
1618
==================
17-
Boot Survivability
19+
Survivability Mode
1820
==================
1921

2022
.. kernel-doc:: drivers/gpu/drm/xe/xe_survivability_mode.c
21-
:doc: Xe Boot Survivability
23+
:doc: Survivability Mode

drivers/gpu/drm/drm_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ static const char *drm_get_wedge_recovery(unsigned int opt)
532532
return "rebind";
533533
case DRM_WEDGE_RECOVERY_BUS_RESET:
534534
return "bus-reset";
535+
case DRM_WEDGE_RECOVERY_VENDOR:
536+
return "vendor-specific";
535537
default:
536538
return NULL;
537539
}

drivers/gpu/drm/drm_gpusvm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ static void __drm_gpusvm_range_unmap_pages(struct drm_gpusvm *gpusvm,
975975
};
976976

977977
for (i = 0, j = 0; i < npages; j++) {
978-
struct drm_pagemap_device_addr *addr = &range->dma_addr[j];
978+
struct drm_pagemap_addr *addr = &range->dma_addr[j];
979979

980980
if (addr->proto == DRM_INTERCONNECT_SYSTEM)
981981
dma_unmap_page(dev,
@@ -1328,7 +1328,7 @@ int drm_gpusvm_range_get_pages(struct drm_gpusvm *gpusvm,
13281328
goto err_unmap;
13291329
}
13301330

1331-
range->dma_addr[j] = drm_pagemap_device_addr_encode
1331+
range->dma_addr[j] = drm_pagemap_addr_encode
13321332
(addr, DRM_INTERCONNECT_SYSTEM, order,
13331333
DMA_BIDIRECTIONAL);
13341334
}

0 commit comments

Comments
 (0)