Commit 377b2f15 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-xe-next-2025-06-18' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next



UAPI Changes:
- Expose media OA units (Ashutosh)

Merge:
 - Restore GuC submit UAF fix around queue destruction
   accidentally removed in a drm-xe-fixes merge (Auld)

Core Changes:
- drm/gpusvm: Introduce devmem_only flag for allocation (Himal)
- drm/gpusvm: Add timeslicing support to GPU SVM (Brost)

Driver Changes:
 - Make gem shrinker drm managed (Thomas)
 - SRIOV VF Post-migration recovery of GGTT nodes and CTB (Tomasz)
 - Some W/A additions and updates (Aradhya, Shekhar, Vinay, Daniele)
 - Prefetch Support for svm ranges (Himal, Brost)
 - Don't allocate managed BO for each policy change (Michal)
 - Simplify and fix diff calculation in GuC submit (Lucas)
 - Track FAST_REQ GuC H2Gs to report where errors came from (John)
 - SRIOV PF: Don't allow LMEM provisioning if LMTT isn't available (Piotr)
 - Check if all domains awake for MOCS dump (Tejas)
 - Make creation of SLPC debugfs files conditional (Aradhya)
 - Default auto_link_downgrade status to false (Aradhya)
 - Use xe_mmio_read32() to read mtcfg register (Shuicheng)
 - Updates in PCI ID tables (Atwood, Shekhar)
 - SRIOV VF:  Fail migration recovery if fixups needed but not supported (Tomasz)
 - Add missing documentation around freq and RPa (Rodrigo)
 - Some other SVM related fixes (Himal, Auld, Brost, Maarten)
 - Allow to trigger GT resets using debugfs writes (Michal)
 - Optimise CCS case for WB pages (Auld)
 - Create LRC BO without VM (Niranjana)
 - Initialize MOCS index early (Bala)
 - HWMON fixes for BMG (Karthik, Lucas)
 - Drop redundant conversion to bool (Raag)
 - Rework eviction rejection of bound external bos (Thomas)
 - Stop re-submitting signalled jobs (Auld)
 - Small fixes and cleanups for PXP (Daniele)
 - Convert some print messages to GT-oriented ones (Michal)
 - Resend potentially lost GuC H2G MMIO request (Michal)
 - Add configfs to load with fewer engines (Lucas)
 - Remove unmatched xe_vm_unlock from __xe_exec_queue_init (Maciej)
 - SRIOV VF: Small updates around GGTT handling (Michal)
 - Make VMA tile_present, tile_invalidated access rules clear (Brost)
 - Xe3 Tuning: Disable NULL query for Anyhit Shader (Nitin)
 - Fixes for VF GuC version (Daniele)
 - Don't store the xe device pointer inside xe_ttm_tt (Dave)
 - Small improvements in topology code (Michal)
 - Stop relying on GGTT internals (Maarten)
 - GSM size should be constant on most platforms (Roper)
 - Reorder 'Get pages failed' message (Brost)
 - WA BB related fixes and improvements (Lucas, Brost)
 - Fix early wedge on GuC load failure (Daniele)
 - Add helper function to inject fault into ct_dead_capture (Satyanarayana)
 - Determine ATS / PTA programming during early sw init (Roper)
 - Consolidate PAT programming logic for pre-Xe2 and post-Xe2 (Roper)
 - Fix kconfig prompt (Lucas)
 - Convert xe_pci tests to parametrized tests (Michal)
 - Do not kill VM in PT code on -ENODATA (Brost)
 - Move LRC_ENGINE_ID_PPHWSP_OFFSET outside of parallel offset (Brost)
 - Enable media OA (Ashutosh)
 - GuC log level tuning (Lucas)
 - Add xe_vm_has_valid_gpu_mapping helper (Brost)
 - Opportunistically skip TLB invalidaion on unbind (Brost)

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/aFMb_NVF_oCW7UVl@intel.com
parents 45215c58 8aa73066
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
@@ -148,3 +148,51 @@ Contact: intel-xe@lists.freedesktop.org
Description:	RO. Fan 3 speed in RPM.

		Only supported for particular Intel Xe graphics platforms.

What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_cap
Date:		May 2025
KernelVersion:	6.15
Contact:	intel-xe@lists.freedesktop.org
Description:	RW. Card burst (PL2) power limit in microwatts.

		The power controller will throttle the operating frequency
		if the power averaged over a window (typically milli seconds)
		exceeds this limit. A read value of 0 means that the PL2
		power limit is disabled, writing 0 disables the	limit.
		PL2 is greater than PL1 and its time window is lesser
		compared to PL1.

		Only supported for particular Intel Xe graphics platforms.

What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_cap
Date:		May 2025
KernelVersion:	6.15
Contact:	intel-xe@lists.freedesktop.org
Description:	RW. Package burst (PL2) power limit in microwatts.

		The power controller will throttle the operating frequency
		if the power averaged over a window (typically milli seconds)
		exceeds this limit. A read value of 0 means that the PL2
		power limit is disabled, writing 0 disables the	limit.
		PL2 is greater than PL1 and its time window is lesser
		compared to PL1.

		Only supported for particular Intel Xe graphics platforms.

What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power1_cap_interval
Date:		May 2025
KernelVersion:	6.15
Contact:	intel-xe@lists.freedesktop.org
Description:	RW. Card burst power limit interval (Tau in PL2/Tau) in
		milliseconds over which sustained power is averaged.

		Only supported for particular Intel Xe graphics platforms.

What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/power2_cap_interval
Date:		May 2025
KernelVersion:	6.15
Contact:	intel-xe@lists.freedesktop.org
Description:	RW. Package burst power limit interval (Tau in PL2/Tau) in
		milliseconds over which sustained power is averaged.

		Only supported for particular Intel Xe graphics platforms.
+8 −2
Original line number Diff line number Diff line
@@ -2,9 +2,15 @@

.. _xe_configfs:

============
===========
Xe Configfs
============
===========

.. kernel-doc:: drivers/gpu/drm/xe/xe_configfs.c
   :doc: Xe Configfs

Internal API
============

.. kernel-doc:: drivers/gpu/drm/xe/xe_configfs.c
   :internal:
+34 −0
Original line number Diff line number Diff line
@@ -980,6 +980,40 @@ static void drm_gpusvm_driver_lock_held(struct drm_gpusvm *gpusvm)
}
#endif

/**
 * drm_gpusvm_find_vma_start() - Find start address for first VMA in range
 * @gpusvm: Pointer to the GPU SVM structure
 * @start: The inclusive start user address.
 * @end: The exclusive end user address.
 *
 * Returns: The start address of first VMA within the provided range,
 * ULONG_MAX otherwise. Assumes start_addr < end_addr.
 */
unsigned long
drm_gpusvm_find_vma_start(struct drm_gpusvm *gpusvm,
			  unsigned long start,
			  unsigned long end)
{
	struct mm_struct *mm = gpusvm->mm;
	struct vm_area_struct *vma;
	unsigned long addr = ULONG_MAX;

	if (!mmget_not_zero(mm))
		return addr;

	mmap_read_lock(mm);

	vma = find_vma_intersection(mm, start, end);
	if (vma)
		addr =  vma->vm_start;

	mmap_read_unlock(mm);
	mmput(mm);

	return addr;
}
EXPORT_SYMBOL_GPL(drm_gpusvm_find_vma_start);

/**
 * drm_gpusvm_range_find_or_insert() - Find or insert GPU SVM range
 * @gpusvm: Pointer to the GPU SVM structure
+3 −3
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
config DRM_XE
	tristate "Intel Xe Graphics"
	tristate "Intel Xe2 Graphics"
	depends on DRM && PCI && (m || (y && KUNIT=y))
	depends on INTEL_VSEC || !INTEL_VSEC
	depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)
@@ -31,7 +31,6 @@ config DRM_XE
	select ACPI_VIDEO if X86 && ACPI
	select ACPI_WMI if X86 && ACPI
	select SYNC_FILE
	select IOSF_MBI
	select CRC32
	select SND_HDA_I915 if SND_HDA_CORE
	select CEC_CORE if CEC_NOTIFIER
@@ -46,7 +45,8 @@ config DRM_XE
	select AUXILIARY_BUS
	select HMM_MIRROR
	help
	  Experimental driver for Intel Xe series GPUs
	  Driver for Intel Xe2 series GPUs and later. Experimental support
	  for Xe series is also available.

	  If "M" is selected, the module will be called xe.

+8 −3
Original line number Diff line number Diff line
@@ -86,12 +86,17 @@ config DRM_XE_KUNIT_TEST

	  If in doubt, say "N".

config DRM_XE_LARGE_GUC_BUFFER
        bool "Enable larger guc log buffer"
config DRM_XE_DEBUG_GUC
        bool "Enable extra GuC related debug options"
        depends on DRM_XE_DEBUG
        default n
        select STACKDEPOT
        help
          Choose this option when debugging guc issues.
          Buffer should be large enough for complex issues.
          The GuC log buffer is increased to the maximum allowed, which should
          be large enough for complex issues. The tracking of FAST_REQ messages
          is extended to include a record of the calling stack, which is then
          dumped on a FAST_REQ error notification.

          Recommended for driver developers only.

Loading