]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge tag 'drm-xe-next-2026-03-02' of https://gitlab.freedesktop.org/drm/xe/kernel...
authorDave Airlie <airlied@redhat.com>
Mon, 2 Mar 2026 23:55:32 +0000 (09:55 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 3 Mar 2026 00:37:29 +0000 (10:37 +1000)
UAPI Changes:
- restrict multi-lrc to VCS/VECS engines (Xin Wang)
- Introduce a flag to disallow vm overcommit in fault mode (Thomas)
- update used tracking kernel-doc (Auld, Fixes)
- Some bind queue fixes (Auld, Fixes)

Cross-subsystem Changes:
- Split drm_suballoc_new() into SA alloc and init helpers (Satya, Fixes)
- pass pagemap_addr by reference (Arnd, Fixes)
- Revert "drm/pagemap: Disable device-to-device migration" (Thomas)
- Fix unbalanced unlock in drm_gpusvm_scan_mm (Maciej, Fixes)
- Small GPUSVM fixes (Brost, Fixes)
- Fix xe SVM configs (Thomas, Fixes)

Core Changes:
- Fix a hmm_range_fault() livelock / starvation problem (Thomas, Fixes)

Driver Changes:
- Fix leak on xa_store failure (Shuicheng, Fixes)
- Correct implementation of Wa_16025250150 (Roper, Fixes)
- Refactor context init into xe_lrc_ctx_init (Raag)
- Fix GSC proxy cleanup on early initialization failure (Zhanjun)
- Fix exec queue creation during post-migration recovery (Tomasz, Fixes)
- Apply windower hardware filtering setting on Xe3 and Xe3p (Roper)
- Free ctx_restore_mid_bb in release (Shuicheng, Fixes)
- Drop stale MCR steering TODO comment (Roper)
- dGPU memory optimizations (Brost)
- Do not preempt fence signaling CS instructions (Brost, Fixes)
- Revert "drm/xe/compat: Remove unused i915_reg.h from compat header" (Uma)
- Don't expose display modparam if no display support (Wajdeczko)
- Some VRAM flag improvements (Wajdeczko)
- Misc fix for xe_guc_ct.c (Shuicheng, Fixes)
- Remove unused i915_reg.h from compat header (Uma)
- Workaround cleanup & simplification (Roper)
- Add prefetch pagefault support for Xe3p (Varun)
- Fix fs_reclaim deadlock caused by CCS save/restore (Satya, Fixes)
- Cleanup partially initialized sync on parse failure (Shuicheng, Fixes)
- Allow to change VFs VRAM quota using sysfs (Michal)
- Increase GuC log sizes in debug builds (Tomasz)
- Wa_18041344222 changes (Harish)
- Add Wa_14026781792 (Niton)
- Add debugfs facility to catch RTP mistakes (Roper)
- Convert GT stats to per-cpu counters (Brost)
- Prevent unintended VRAM channel creation (Karthik)
- Privatize struct xe_ggtt (Maarten)
- remove unnecessary struct dram_info forward declaration (Jani)
- pagefault refactors (Brost)
- Apply Wa_14024997852 (Arvind)
- Redirect faults to dummy page for wedged device (Raag, Fixes)
- Force EXEC_QUEUE_FLAG_KERNEL for kernel internal VMs (Piotr)
- Stop applying Wa_16018737384 from Xe3 onward (Roper)
- Add new XeCore fuse registers to VF runtime regs (Roper)
- Update xe_device_declare_wedged() error log (Raag)
- Make xe_modparam.force_vram_bar_size signed (Shuicheng, Fixes)
- Avoid reading media version when media GT is disabled (Piotr, Fixes)
- Fix handling of Wa_14019988906 & Wa_14019877138 (Roper, Fixes)
- Basic enabling patches for Xe3p_LPG and NVL-P (Gustavo, Roper, Shekhar)
- Avoid double-adjust in 64-bit reads (Shuicheng, Fixes)
- Allow VF to initialize MCR tables (Wajdeczko)
- Add Wa_14025883347 for GuC DMA failure on reset (Anirban)
- Add bounds check on pat_index to prevent OOB kernel read in madvise (Jia, Fixes)
- Fix the address range assert in ggtt_get_pte helper (Winiarski)
- XeCore fuse register changes (Roper)
- Add more info to powergate_info debugfs (Vinay)
- Separate out GuC RC code (Vinay)
- Fix g2g_test_array indexing (Pallavi)
- Mutual exclusivity between CCS-mode and PF (Nareshkumar, Fixes)
- Some more _types.h cleanups (Wajdeczko)
- Fix sysfs initialization (Wajdeczko, Fixes)
- Drop unnecessary goto in xe_device_create (Roper)
- Disable D3Cold for BMG only on specific platforms (Karthik, Fixes)
- Add sriov.admin_only_pf attribute (Wajdeczko)
- replace old wq(s), add WQ_PERCPU to alloc_workqueue (Marco)
- Make MMIO communication more robust (Wajdeczko)
- Fix warning of kerneldoc (Shuicheng, Fixes)
- Fix topology query pointer advance (Shuicheng, Fixes)
- use entry_dump callbacks for xe2+ PAT dumps (Xin Wang)
- Fix kernel-doc warning in GuC scheduler ABI header (Chaitanya, Fixes)
- Fix CFI violation in debugfs access (Daniele, Fixes)
- Apply WA_16028005424 to Media (Balasubramani)
- Fix typo in function kernel-doc (Wajdeczko)
- Protect priority against concurrent access (Niranjana)
- Fix nvm aux resource cleanup (Shuicheng, Fixes)
- Fix is_bound() pci_dev lifetime (Shuicheng, Fixes)
- Use CLASS() for forcewake in xe_gt_enable_comp_1wcoh (Shuicheng)
- Reset VF GuC state on fini (Wajdeczko)
- Move _THIS_IP_ usage from xe_vm_create() to dedicated function (Nathan Chancellor, Fixes)
- Unregister drm device on probe error (Shuicheng, Fixes)
- Disable DCC on PTL (Vinay, Fixes)
- Fix Wa_18022495364 (Tvrtko, Fixes)
- Skip address copy for sync-only execs (Shuicheng, Fixes)
- derive mem copy capability from graphics version (Nitin, Fixes)
- Use DRM_BUDDY_CONTIGUOUS_ALLOCATION for contiguous allocations (Sanjay)
- Context based TLB invalidations (Brost)
- Enable multi_queue on xe3p_xpc (Brost, Niranjana)
- Remove check for gt in xe_query (Nakshtra)
- Reduce LRC timestamp stuck message on VFs to notice (Brost, Fixes)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/aaYR5G2MHjOEMXPW@lstrano-desk.jf.intel.com
31 files changed:
1  2 
drivers/gpu/drm/drm_gpusvm.c
drivers/gpu/drm/drm_pagemap.c
drivers/gpu/drm/drm_suballoc.c
drivers/gpu/drm/i915/display/intel_display_device.c
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/display/xe_fb_pin.c
drivers/gpu/drm/xe/xe_bb.c
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_configfs.c
drivers/gpu/drm/xe/xe_device.c
drivers/gpu/drm/xe/xe_exec_queue.c
drivers/gpu/drm/xe/xe_execlist.c
drivers/gpu/drm/xe/xe_ggtt.c
drivers/gpu/drm/xe/xe_guc_ct.c
drivers/gpu/drm/xe/xe_guc_submit.c
drivers/gpu/drm/xe/xe_hw_engine.c
drivers/gpu/drm/xe/xe_lmtt.c
drivers/gpu/drm/xe/xe_lrc.c
drivers/gpu/drm/xe/xe_migrate.c
drivers/gpu/drm/xe/xe_nvm.c
drivers/gpu/drm/xe/xe_oa.c
drivers/gpu/drm/xe/xe_reg_sr.c
drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c
drivers/gpu/drm/xe/xe_tile_sysfs.c
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_wa.c
mm/filemap.c
mm/memory.c
mm/migrate.c
mm/migrate_device.c

Simple merge
Simple merge
index e44ad39e310cdd05938bf3900d907d519326285b,dc9bef3c0419d75a63ea62e263d70692cb679f5a..b74277bbc14bf83f40f57f27ff042e313ad40f35
@@@ -293,13 -293,37 +293,37 @@@ static bool drm_suballoc_next_hole(stru
  }
  
  /**
-  * drm_suballoc_new() - Make a suballocation.
+  * drm_suballoc_alloc() - Allocate uninitialized suballoc object.
+  * @gfp: gfp flags used for memory allocation.
+  *
+  * Allocate memory for an uninitialized suballoc object. Intended usage is
+  * allocate memory for suballoc object outside of a reclaim tainted context
+  * and then be initialized at a later time in a reclaim tainted context.
+  *
+  * @drm_suballoc_free() should be used to release the memory if returned
+  * suballoc object is in uninitialized state.
+  *
+  * Return: a new uninitialized suballoc object, or an ERR_PTR(-ENOMEM).
+  */
+ struct drm_suballoc *drm_suballoc_alloc(gfp_t gfp)
+ {
+       struct drm_suballoc *sa;
 -      sa = kmalloc(sizeof(*sa), gfp);
++      sa = kmalloc_obj(*sa, gfp);
+       if (!sa)
+               return ERR_PTR(-ENOMEM);
+       sa->manager = NULL;
+       return sa;
+ }
+ EXPORT_SYMBOL(drm_suballoc_alloc);
+ /**
+  * drm_suballoc_insert() - Initialize a suballocation and insert a hole.
   * @sa_manager: pointer to the sa_manager
+  * @sa: The struct drm_suballoc.
   * @size: number of bytes we want to suballocate.
-  * @gfp: gfp flags used for memory allocation. Typically GFP_KERNEL but
-  *       the argument is provided for suballocations from reclaim context or
-  *       where the caller wants to avoid pipelining rather than wait for
-  *       reclaim.
   * @intr: Whether to perform waits interruptible. This should typically
   *        always be true, unless the caller needs to propagate a
   *        non-interruptible context from above layers.
Simple merge
index 4749aa7f946608187a6e10dda81e66f2e0262b8b,b0aceaec2685e4eaf295b1a8b0c28f0aca96c6c9..b896b6f6615cbe469fab1c2968aca10373dd7468
@@@ -59,12 -59,18 +59,18 @@@ err
        return ERR_PTR(err);
  }
  
- struct xe_bb *xe_bb_ccs_new(struct xe_gt *gt, u32 dwords,
-                           enum xe_sriov_vf_ccs_rw_ctxs ctx_id)
+ /**
+  * xe_bb_alloc() - Allocate a new batch buffer structure
+  * @gt: the &xe_gt
+  *
+  * Allocates and initializes a new xe_bb structure with an associated
+  * uninitialized suballoc object.
+  *
+  * Returns: Batch buffer structure or an ERR_PTR(-ENOMEM).
+  */
+ struct xe_bb *xe_bb_alloc(struct xe_gt *gt)
  {
 -      struct xe_bb *bb = kmalloc(sizeof(*bb), GFP_KERNEL);
 +      struct xe_bb *bb = kmalloc_obj(*bb);
-       struct xe_device *xe = gt_to_xe(gt);
-       struct xe_sa_manager *bb_pool;
        int err;
  
        if (!bb)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 2bda426a6986afc85c9a5d3a4411d7752a0b5bd6,79310f565fe37204a3562315752c6cf39ff36933..0f2e3af49912027d0f534825cae060aa273d4ba8
@@@ -660,49 -624,9 +624,9 @@@ static int xe_ggtt_insert_node_locked(s
                                          mm_flags);
  }
  
- /**
-  * xe_ggtt_node_insert - Insert a &xe_ggtt_node into the GGTT
-  * @node: the &xe_ggtt_node to be inserted
-  * @size: size of the node
-  * @align: alignment constrain of the node
-  *
-  * It cannot be called without first having called xe_ggtt_init() once.
-  *
-  * Return: 0 on success or a negative error code on failure.
-  */
- int xe_ggtt_node_insert(struct xe_ggtt_node *node, u32 size, u32 align)
- {
-       int ret;
-       if (!node || !node->ggtt)
-               return -ENOENT;
-       mutex_lock(&node->ggtt->lock);
-       ret = xe_ggtt_node_insert_locked(node, size, align,
-                                        DRM_MM_INSERT_HIGH);
-       mutex_unlock(&node->ggtt->lock);
-       return ret;
- }
- /**
-  * xe_ggtt_node_init - Initialize %xe_ggtt_node struct
-  * @ggtt: the &xe_ggtt where the new node will later be inserted/reserved.
-  *
-  * This function will allocate the struct %xe_ggtt_node and return its pointer.
-  * This struct will then be freed after the node removal upon xe_ggtt_node_remove()
-  * or xe_ggtt_node_remove_balloon_locked().
-  *
-  * Having %xe_ggtt_node struct allocated doesn't mean that the node is already
-  * allocated in GGTT. Only xe_ggtt_node_insert(), allocation through
-  * xe_ggtt_node_insert_transform(), or xe_ggtt_node_insert_balloon_locked() will ensure the node is inserted or reserved
-  * in GGTT.
-  *
-  * Return: A pointer to %xe_ggtt_node struct on success. An ERR_PTR otherwise.
-  **/
- struct xe_ggtt_node *xe_ggtt_node_init(struct xe_ggtt *ggtt)
+ static struct xe_ggtt_node *ggtt_node_init(struct xe_ggtt *ggtt)
  {
 -      struct xe_ggtt_node *node = kzalloc(sizeof(*node), GFP_NOFS);
 +      struct xe_ggtt_node *node = kzalloc_obj(*node, GFP_NOFS);
  
        if (!node)
                return ERR_PTR(-ENOMEM);
Simple merge
index 799ef9f480036bd648b739015649e8587108e20f,de716c1fb18e0d33743f9a1acdc24840d031153a..ca7aa4f358d03b68451f89811e41c13bbae97932
@@@ -2111,11 -2163,10 +2163,10 @@@ static int guc_exec_queue_set_multi_que
  
        xe_gt_assert(guc_to_gt(exec_queue_to_guc(q)), xe_exec_queue_is_multi_queue(q));
  
-       if (q->multi_queue.priority == priority ||
-           exec_queue_killed_or_banned_or_wedged(q))
+       if (exec_queue_killed_or_banned_or_wedged(q))
                return 0;
  
 -      msg = kmalloc(sizeof(*msg), GFP_KERNEL);
 +      msg = kmalloc_obj(*msg);
        if (!msg)
                return -ENOMEM;
  
Simple merge
Simple merge
Simple merge
Simple merge
index 9c4ccd3b39d4d85e0d60181872a2d89e3cd382fb,1fdfb690ea3d3f330e3c60879cf809f2bb6f424e..33487e91f366cafc0c7e5bafa14aa10318f0905c
@@@ -133,12 -133,10 +133,10 @@@ int xe_nvm_init(struct xe_device *xe
        if (WARN_ON(xe->nvm))
                return -EFAULT;
  
-       xe->nvm = kzalloc_obj(*nvm);
-       if (!xe->nvm)
 -      nvm = kzalloc(sizeof(*nvm), GFP_KERNEL);
++      nvm = kzalloc_obj(*nvm);
+       if (!nvm)
                return -ENOMEM;
  
-       nvm = xe->nvm;
        nvm->writable_override = xe_nvm_writable_override(xe);
        nvm->non_posted_erase = xe_nvm_non_posted_erase(xe);
        nvm->bar.parent = &pdev->resource[0];
Simple merge
Simple merge
Simple merge
index 2c44aa4b5562bd5762e724514727051f6b5e11ec,d6aa61e55f4d75c3a351e1c47b40b1d1993a3375..5fd0d5506a7ea067fdb3c581ce29dfb7145260d0
@@@ -80,10 -79,13 +80,13 @@@ static int xe_ttm_vram_mgr_new(struct t
        INIT_LIST_HEAD(&vres->blocks);
  
        if (place->flags & TTM_PL_FLAG_TOPDOWN)
 -              vres->flags |= DRM_BUDDY_TOPDOWN_ALLOCATION;
 +              vres->flags |= GPU_BUDDY_TOPDOWN_ALLOCATION;
  
 -              vres->flags |= DRM_BUDDY_CONTIGUOUS_ALLOCATION;
+       if (place->flags & TTM_PL_FLAG_CONTIGUOUS)
++              vres->flags |= GPU_BUDDY_CONTIGUOUS_ALLOCATION;
        if (place->fpfn || lpfn != man->size >> PAGE_SHIFT)
 -              vres->flags |= DRM_BUDDY_RANGE_ALLOCATION;
 +              vres->flags |= GPU_BUDDY_RANGE_ALLOCATION;
  
        if (WARN_ON(!vres->base.size)) {
                err = -EINVAL;
                goto error_unlock;
        }
  
-       if (place->fpfn + (size >> PAGE_SHIFT) != lpfn &&
-           place->flags & TTM_PL_FLAG_CONTIGUOUS) {
-               size = roundup_pow_of_two(size);
-               min_page_size = size;
-               lpfn = max_t(unsigned long, place->fpfn + (size >> PAGE_SHIFT), lpfn);
-       }
 -      err = drm_buddy_alloc_blocks(mm, (u64)place->fpfn << PAGE_SHIFT,
 +      err = gpu_buddy_alloc_blocks(mm, (u64)place->fpfn << PAGE_SHIFT,
                                     (u64)lpfn << PAGE_SHIFT, size,
                                     min_page_size, &vres->blocks, vres->flags);
        if (err)
Simple merge
Simple merge
diff --cc mm/filemap.c
Simple merge
diff --cc mm/memory.c
Simple merge
diff --cc mm/migrate.c
Simple merge
Simple merge