summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2026-09-26drm/msm/a6xx: Add HFI support for CLX featureAkhil P Oommen
Add support for Current Limit Extension (CLX) feature found on a few A8x GPUs. This feature is required to limit the peak current consumption to avoid HW spec violation on GX/MX rails. Add the necessary HFI interface support to pass the recommended CLX and IFF/PCLX limits tables to the GMU. Per-GPU configuration is consumed from the catalog entries. Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/725401/ Message-ID: <20260516-a8xx-clx-support-v1-1-62508bf651ac@oss.qualcomm.com> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
2026-09-26drm/vc4: Fix firmware reference leak in vc4_drm_bind()Wentao Liang
The firmware reference obtained via rpi_firmware_get() is leaked when aperture_remove_all_conflicting_devices() fails, as the error label returns without putting it. This happens before the firmware is consumed and put further down in the function. Put the firmware reference before jumping to err. Fixes: c406ad5e4a85 ("drm/vc4: Notify the firmware when DRM is in charge") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20260916154015.2056797-1-vulab@iscas.ac.cn Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com>
2026-09-25drm/xe/i2c: Re-apply use device_create_managed_software_node()Bartosz Golaszewski
Original commit 0f485f88656a ("drm/xe/i2c: use device_create_managed_software_node()") got silently removed by commit cc467969646b ("Merge drm/drm-next into drm-xe-next"). Re-apply it. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260922-xe-i2c-reapply-swnode-unreg-v1-1-1bdda5d44701@oss.qualcomm.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> [Rodrigo: Modified commit message to reflect the right history]
2026-09-25drm/xe: Document ULLS for migration jobsMatthew Brost
Add a kernel-doc DOC section at the top of xe_migrate.c describing the Ultra Low Latency Submission (ULLS) scheme used for migration jobs. Cover the motivation (removing the H2G / GuC / context switch latency from the page fault and SVM prefetch critical paths), the platform requirements, the LRC PPHWSP semaphore layout and its relationship to the migration queue job count, the fixed ULLS job size and why it is needed, the ring preamble / postamble emitted by the ring ops including the in-ring tail update, the semaphore-only submission fast path in the GuC backend, and the enter / delayed exit flow along with the ULLS job flags. Hook the new section into Documentation/gpu/xe/xe_migrate.rst. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Assisted-by: Github-Copilot:Claude-opus-5 Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-25-matthew.brost@intel.com
2026-09-25drm/xe: add migrate ULLS period configfs attributeMatthew Brost
Add a configfs attribute to control the migrate ULLS period.   The migrate ULLS period specifies how long, in milliseconds, migrate ULLS remains active before exiting. Migrate ULLS is currently used by page-fault handling and SVM prefetch operations to process migration work through a continuously running batch.   The attribute defaults to 5 ms. Setting the value to 0 disables ULLS.   This knob is primarily intended for performance tuning and evaluation, allowing experimentation with the trade-off between reducing ULLS startup/teardown overhead and limiting the time spent in a continuously running migration workload. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-24-matthew.brost@intel.com
2026-09-25drm/xe: Enter ULLS for migration jobs upon page fault or SVM prefetchMatthew Brost
Call xe_migrate_ulls_enter upon page fault or SVM prefetch in an effort speed up these critical paths. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-23-matthew.brost@intel.com
2026-09-25drm/xe: Add ULLS migration job support to GuC submissionMatthew Brost
Add ULLS migration job support to GuC submission backend. Changes required: - On migration queue, reduce max jobs to the number of ULLS semaphores minus one - Skip writing the saved ring tail for ULLS jobs except for the first ULLS job - the ring updates both the saved tail and the tail register itself - Set ULLS sempahore for current job releasing last job except for first ULLS job - Suppress submit H2G for ULLS except for first ULLS job Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-22-matthew.brost@intel.com
2026-09-25drm/xe: Add ULLS migration job support to ring opsMatthew Brost
Add preamble and postamble for ULLS migrations jobs. Preamble clears current semaphore for reuse. Postamble waits on next semaphore which is set upon next job submission, then advances the ring tail over that job with an LRI to RING_TAIL, so submitting it costs the CPU nothing beyond signalling the semaphore. A job updates the tail on behalf of a successor which has not been emitted yet, so it cannot know how much ring that successor will occupy. Pad every ULLS job out to a fixed ULLS_JOB_SIZE_BYTES, which makes the next tail derivable from where the current job starts. The pad also supplies the NOPs which must follow an in-ring tail update. The last ULLS migration job skips BB submission, the postamble and the tail update (clear current semaphore, write seqno, exit ULLS), padding the difference so that it still fills a job slot. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-21-matthew.brost@intel.com
2026-09-25drm/xe: Add ULLS migration job support to migration layerMatthew Brost
Add function to enter ULLS mode for migration job and delayed worker to exit (power saving). ULLS mode expected to entered upon page fault or SVM prefetch. ULLS mode exit delay is currently set to 5ms. ULLS mode only support on DGFX and USM platforms where a hardware engine is reserved for migrations jobs. When in ULLS mode, set several flags on migration jobs so submission backend / ring ops can properly submit in ULLS mode. Upon ULLS mode enter, send a job trigger waiting a semphore pipling initial GuC / HW conetxt switch. Upon ULLS mode exit, send a job to trigger that current ULLS semaphore so the ring can be taken off the hardware. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-20-matthew.brost@intel.com
2026-09-25drm/xe: Add ULLS support to LRCMatthew Brost
Define memory layout for ULLS semaphores stored in LRC memory. Add support functions to return GGTT address and set semaphore based on a job's seqno. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-19-matthew.brost@intel.com
2026-09-25drm/xe: Add device flag to enable PT mirroring across tilesMatthew Brost
Some multi-tile devices may want to mirror page tables across tiles for memory-bandwidth reasons, while others may not. Add a device flag that allows enabling or disabling page-table mirroring across tiles. Setting the flag to true (the existing behavior) on PVC, but both modes have been tested and are working on PVC. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patch.msgid.link/20260925201526.1355279-18-matthew.brost@intel.com
2026-09-25drm/xe: Add CPU bind layerMatthew Brost
With CPU binds, it no longer makes sense to implement CPU bind handling in the migrate layer, as these operations are entirely decoupled from hardware. Introduce a dedicated CPU bind layer stored at the device level. Since CPU binds are tile-independent, update the PT layer to generate a single bind job even when pages are mirrored across tiles. This patch is large because the refactor touches multiple file / layers and ensures functional equivalence before and after the change. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-17-matthew.brost@intel.com
2026-09-25drm/xe: Make bind queues operate cross-tileMatthew Brost
Since bind jobs execute on the CPU rather than the GPU, maintaining a per-tile bind queue no longer provides value. Convert the driver to use a single bind queue shared across tiles. The primary change is routing all GT TLB invalidations through this unified bind queue. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-16-matthew.brost@intel.com
2026-09-25drm/xe: Remove unused arguments from xe_migrate_pt_update_opsMatthew Brost
Both populate and clear have unused void* ptr arguments, remove these. Also consolidate ofs, num_qwords in update argument. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-15-matthew.brost@intel.com
2026-09-25drm/xe: Enable CPU binds for jobsMatthew Brost
No reason to use the GPU for binds. Benefits of CPU-based binds: - Lower latency once dependencies are resolved, as there is no interaction with the GuC or a hardware context switch both of which are relatively slow. - Large arrays of binds do not risk running out of migration PTEs, avoiding -ENOBUFS being returned to userspace. - Kernel binds are decoupled from the migration exec queue (which issues copies and clears), so they cannot get stuck behind unrelated jobs—this can be a problem with parallel GPU faults. - Paves the for path decouping binds from tiles and individual engines - Enables ULLS on the migration exec queue, as this queue has exclusive access to the paging copy engine. Update migration layer to formulate a PT job which will issue CPU bind in the submission backend. All code related to GPU-based binding has been removed. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-14-matthew.brost@intel.com
2026-09-25drm/xe: Don't use migrate exec queue for page fault bindsMatthew Brost
Now that the CPU is always used for binds even in jobs, CPU bind jobs can pass GPU jobs in the same exec queue resulting dma-fences signaling out-of-order. Use a dedicated exec queue for binds issued from page faults to avoid ordering issues and avoid blocking kernel binds on unrelated copies / clears. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-13-matthew.brost@intel.com
2026-09-25drm/xe: Store level in struct xe_vm_pgtable_updateMatthew Brost
The level was previously extracted from struct xe_pt inside xe_vm_pgtable_update during CPU binds, which always occurred during the bind IOCTL. With CPU binds now supported in bind jobs, struct xe_pt may no longer be valid in memory at that point. To address this, store the level directly in struct xe_vm_pgtable_update. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Stuart Summers <stuart.summers@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-12-matthew.brost@intel.com
2026-09-25drm/xe: Update GuC submission backend to run PT jobsMatthew Brost
PT jobs bypass GPU execution for the final step of a bind job, using the CPU to program the required page tables. Teach the GuC submission backend how to execute these jobs. PT job submission is implemented in the GuC backend for simplicity. A follow-up patch could introduce a dedicated backend for PT jobs. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patch.msgid.link/20260925201526.1355279-11-matthew.brost@intel.com
2026-09-25drm/xe: Add struct xe_pt_job_opsMatthew Brost
Add struct xe_pt_job_ops, a dynamically refcounted object that contains the information required to issue a CPU bind via a job after the initial bind IOCTL returns. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-10-matthew.brost@intel.com
2026-09-25drm/xe: Add helpers to access PT opsMatthew Brost
Add helpers to access PT ops, making it easier to shuffle the location of the ops structures without requiring widespread code changes. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-9-matthew.brost@intel.com
2026-09-25drm/xe: Update scheduler job layer to support PT jobsMatthew Brost
Update the scheduler job layer to support PT jobs. PT jobs are executed entirely on the CPU and do not require LRC fences or a batch address. Repurpose the LRC fence storage to hold PT‑job arguments and update the scheduler job layer to distinguish between PT jobs and jobs that require an LRC. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patch.msgid.link/20260925201526.1355279-8-matthew.brost@intel.com
2026-09-25drm/xe: Update xe_bo_put_deferred arguments to include writeback flagMatthew Brost
Update the xe_bo_put_deferred arguments to include a writeback flag, which indicates whether the BO was added to the deferred list. This is useful when the caller needs to take additional actions after the BO has been queued for deferred release. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-7-matthew.brost@intel.com
2026-09-25drm/xe: Add job count to GuC exec queue snapshotMatthew Brost
Add the job count to the GuC exec queue snapshot, as this is useful debug information. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Stuart Summers <stuart.summers@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-6-matthew.brost@intel.com
2026-09-25drm/xe: Decouple exec queue idle check from LRCMatthew Brost
We already maintain a job count for each exec queue, so simplify the idle check to rely on the job count rather than the LRC state. This decouples exec queues from LRC-based backends and avoids unnecessarily coupling idle detection to backend-specific implementation details. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Stuart Summers <stuart.summers@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-5-matthew.brost@intel.com
2026-09-25drm/xe: Add xe_migrate_update_pgtables_cpu_execute helperMatthew Brost
Add the xe_migrate_update_pgtables_cpu_execute helper, which performs the CPU-side page-table update. This will support implementing CPU binds, as the submission backend can call this helper once a bind job’s dependencies are resolved. While here, add assertions to provide basic sanity checks on tht function arguments. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-4-matthew.brost@intel.com
2026-09-25drm/xe: Drop struct xe_migrate_pt_update argument from populate/clear vfunsMatthew Brost
Remove the xe_migrate_pt_update argument from the populate and clear vfuns. This structure will not be available in run_job, where CPU binds will be implemented. The populate path no longer needs it, and the clear path already uses the VM field instead. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Link: https://patch.msgid.link/20260925201526.1355279-3-matthew.brost@intel.com
2026-09-25drm/xe: reference VM from PT BOsMatthew Brost
PT BOs share the VM's dma-resv and therefore must keep the VM alive until all PT BOs are destroyed.   Take a VM reference from PT BOs to ensure the shared dma-resv remains valid for the lifetime of the BOs. Scope the change to PT BOs rather than all kernel BOs to minimize risk and avoid extending VM lifetimes unnecessarily. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patch.msgid.link/20260925201526.1355279-2-matthew.brost@intel.com
2026-09-26Merge tag 'amd-drm-next-7.4-2026-09-24' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/amdgpu/kernel into drm-next amd-drm-next-7.4-2026-09-24: amdgpu: - Display ref count fix - Userq fixes - VCN 4, 5 reset fixes - Fixes for various error paths - Stack frame size fixes for various combinations of compilers and configs - GC 12.1 fixes - RAS updates - SR-IOV udpates - MES fixes - UALink updates - ABM updates - DCN 6 updates - Rework display instance handling - KUnit test updates - Documentation fixes - DCN 4.2 updates - Freesync updates - Cursor refactor - amdgpu_vm_eviction_(try)lock cleanup amdkfd: - Possible UAF fix - GC 12.1 trap fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20260924174339.635232-1-alexander.deucher@amd.com
2026-09-26Merge tag 'drm-misc-fixes-2026-09-24' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes A number of fixes: - bridge: - samsung-dsim: fix GPIO lifetime - client: Null pointer dereference fix - imagination: error handling fix, page handling fix - nouveau: fix reference leaks, double-frees, out-of-bounds accesses, use-after-frees, don't reject config without SCDC, a number of workarounds - virtio: fix memory leak, reference leaks, null pointer dereference, add pixel blend mode, cache coherency fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <self@mripard.dev> Link: https://patch.msgid.link/arU22zzqUGDEco1y@houat
2026-09-25drm/i915: Use sleeping selftests for igt_atomic on PREEMPT_RTMaarten Lankhorst
This makes the i915 selftests slightly happier, especially related to GPU reset. All of the i915 code that used to run in BH's, IRQ's, etc is converted to preemptible code when compiled with PREEMPT_RT, so adding coverage for those situations would require. This is a better approach than trying to convert all locks in i915 from spinlock_t to raw_spinlock_t just to increase test coverage for situations that no longer happen. Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/20260923111518.310430-14-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
2026-09-25drm/i915/gt: Set stop_timeout() correctly on PREEMPT-RTMaarten Lankhorst
Also check if RCU is disabled for PREEMPT-RT, which is the case when local_bh_disable() is called. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/20260923111518.310430-13-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
2026-09-25drm/i915/gt: Fix selftests on PREEMPT_RTMaarten Lankhorst
The engine->busyness() callbacks called from the selftests are on PREEMPT_RT not safe with preemption disabled, because all spinlock_t locks becomes sleeping locks on PREEMPT_RT and must not be acquired with disabled preemption. This is also a problem for perf events, where we disable the busyness events on PREEMPT_RT, as they're run from hardirq context. Previous attempts to fix this failed, so convert the selftest code to read engine->busyness() with migrate_disable() instead of preempt_disable() to prevent selftest failures on PREEMPT_RT. By disabling migration, we prevent moving the selftests between cores, and should decrease the jitter in both the idle cases and busy cases, compared to no prevention at all. Since interrupts were not disabled, some jitter may still occur, but it should hopefully be less with migration disabled. Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/20260923111518.310430-12-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
2026-09-25drm/i915/guc: Consider also RCU depth in busy loop.Sebastian Andrzej Siewior
intel_guc_send_busy_loop() looks at in_atomic() and irqs_disabled() to decide if it should busy-spin while waiting or if it may sleep. Both checks will report false on PREEMPT_RT if sleeping spinlocks are acquired leading to RCU splats while the function sleeps. Check also if RCU has been disabled. Reported-by: "John B. Wyatt IV" <jwyatt@redhat.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/20260923111518.310430-11-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
2026-09-25drm/i915: Drop the irqs_disabled() checkSebastian Andrzej Siewior
The !irqs_disabled() check triggers on PREEMPT_RT even with i915_sched_engine::lock acquired. The reason is the lock is transformed into a sleeping lock on PREEMPT_RT and does not disable interrupts. There is no need to check for disabled interrupts. The lockdep annotation below already check if the lock has been acquired by the caller and will yell if the interrupts are not disabled. Remove the !irqs_disabled() check. Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20260923111518.310430-10-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
2026-09-25drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock()Sebastian Andrzej Siewior
execlists_dequeue() is invoked from a function which uses local_irq_disable() to disable interrupts so the spin_lock() behaves like spin_lock_irq(). This breaks PREEMPT_RT because local_irq_disable() + spin_lock() is not the same as spin_lock_irq(). execlists_dequeue_irq() and execlists_dequeue() has each one caller only. If intel_engine_cs::active::lock is acquired and released with the _irq suffix then it behaves almost as if execlists_dequeue() would be invoked with disabled interrupts. The difference is the last part of the function which is then invoked with enabled interrupts. I can't tell if this makes a difference. From looking at it, it might work to move the last unlock at the end of the function as I didn't find anything that would acquire the lock again. Reported-by: Clark Williams <williams@redhat.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patch.msgid.link/20260923111518.310430-9-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
2026-09-25drm/xe: Remove no-op ternary in emit_flush_invalidate()Shuicheng Lin
'|' binds tighter than the conditional operator, so the trailing "?: 0" tests the whole OR expression instead of just the TLB flag. MI_FLUSH_DW is non-zero, so the condition is always true and the expression evaluates to itself. Drop the ternary. The mask already yields 0 when MI_INVALIDATE_TLB is not set. No functional change. Cc: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Assisted-by: LLM Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patch.msgid.link/20260923171527.663537-1-shuicheng.lin@intel.com Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2026-09-25drm/xe/madvise: Remove unreachable madvise_funcs NULL checkShuicheng Lin
The NULL check on madvise_funcs[attr_type] in xe_vm_madvise_ioctl() is unreachable. madvise_args_are_sane() already validates args->type via a switch statement whose default case rejects any type not present in madvise_funcs[]. Every type that passes the sanity check has a corresponding entry in the table. Beyond being dead code, the check's error path (goto err_fini) would also skip xe_svm_notifier_unlock() if it were somehow reached with has_svm_userptr_vmas set, since err_fini only tears down the drm_exec. Removing the check eliminates both the redundancy and the latent unwind hazard. No functional change. Assisted-by: LLM Reviewed-by: Xin Wang <x.wang@intel.com> Link: https://patch.msgid.link/20260915011229.203424-1-shuicheng.lin@intel.com Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2026-09-25Revert "drm/xe: Set mask bits for CCS_MODE register"Matt Roper
This reverts commit 23ea2c7572d4735ef66beb1e4feb8ae510b78247. A recent bspec update dropped the details about CCS_MODE being a masked register (i.e., bits [15:0] are only updated by register writes when the corresponding bit in [31:16] mask is also set by the write) on Xe2 and later. Apparently the documented mask bits were never actually implemented in hardware, so all register writes will update all bits of [15:0], just as the register behaved on Xe1 platforms. Setting the non-existent mask bits in Xe didn't have any negative impact since none of our existing code was trying to use the mask to limit which bits were updated. However this could have caused problems in the future if we ever rework this code in a way that tried to rely on the masking behavior. Update the register definition and drop the use of the mask to align with the new bspec definition and avoid potential mistakes in the future. Bspec: 55887 Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Reviewed-by: Daniel Charles <daniel.charles@intel.com> Link: https://patch.msgid.link/20260924-ccs_mode_drop_mask-v1-1-5b2b35708b83@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2026-09-25drm/vc4: drain the hangcheck timer and works on V3D unbindFan Wu
Nothing stops the hangcheck timer that submitted jobs arm, or the job_done_work that the render-done interrupt queues, at teardown: vc4_irq_disable() cancels only overflow_mem_work, and vc4_gem_destroy() runs from the drm-managed release, after vc4_v3d_unbind() has already uninstalled the V3D interrupt and cleared vc4->v3d. A timer still armed by then reads V3D registers through the NULL vc4->v3d pointer, and the late callbacks run on the vc4_dev embedding them after it has been freed. Drain them in vc4_v3d_unbind(): shut the timer down and cancel reset_work before the interrupt is taken down, because its vc4_irq_reset() re-enables it, then flush job_done_work so that completions queued at teardown still release their jobs. This issue was found by an in-house static analysis tool. Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Cc: stable@vger.kernel.org # 6.2+ Assisted-by: Codex:gpt-5.6 Co-developed-by: Song Li <songl@zju.edu.cn> Signed-off-by: Song Li <songl@zju.edu.cn> Signed-off-by: Fan Wu <fanwu01@zju.edu.cn> Link: https://patch.msgid.link/20260915095103.156007-1-fanwu01@zju.edu.cn Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com>
2026-09-25Merge tag 'amd-drm-fixes-7.3-2026-09-24' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/amdgpu/kernel into drm-fixes amd-drm-fixes-7.3-2026-09-24: amdgpu: - Display ref count fix - Userq fixes - VCN 4, 5 reset fixes - Fixes for various error paths - Stack frame size fixes for various combinations of compilers and configs amdkfd: - Possible UAF fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20260924172938.634777-1-alexander.deucher@amd.com
2026-09-25drm/sched: Remove forgotten headerPhilipp Stanner
sched_main.c still contains the spsc queue header, which is not needed anymore in that file. Remove the surplus header import. Reviewed-by: Marco Pagani <marco.pagani@linux.dev> Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20260625104903.1713213-2-phasta@kernel.org
2026-09-25Merge tag 'drm-xe-fixes-2026-09-24' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Fixes in: - CRI throttle reasons report (Sk) - TLB invalidation at wedge (Shuicheng) - SVM eviction and VM close (Brost) - Display corruption on LNL on Xen PV (Szymon) - W/a fix and addition (Tilak) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/arUoUf9LpsJpJouN@intel.com
2026-09-25drm/amdgpu: Enable PerfOpt IOMMU perf optimization when GPU in identity domainMario Limonciello
Enable PerfOpt via amd_iommu_enable_perfopt() when the GPU's iommu_perfopt module parameter is enabled (default 1) and the GPU resides in the identity domain. The identity domain means the GPU is already performing direct DMA with the IOMMU only enforcing IR/IW permission bits -- no GPA->SPA translations. amd_iommu_enable_perfopt() clears ATS, PRI, PASID and SVA for the device. This is safe in identity domain because DTE[I]=0 means the IOMMU already returns target abort for ATS requests from this peripheral and the GPU manages its own TLB. PerfOpt is a soft, optional latency optimization: failing to arm it (for example on an IOMMU that does not implement the feature, which returns -ENODEV) must not be fatal, so probe and resume warn and continue rather than aborting. PERF_OPT_EN is a per-IOMMU control shared by all devices behind that IOMMU; the IOMMU driver reference counts it so that on systems where multiple devices share one IOMMU, one GPU's teardown does not clear the bit while a peer still requires it. Arming PerfOpt trades IOMMU DMA containment for lower DMA latency. This is enabled by default for GPUs in the identity domain as a deliberate, documented policy and can be disabled with iommu_perfopt=0. The AMD IOMMU spec indicates this is only supported on integrated GPUs so check explicitly for AMD_IS_APU (which is set by amdgpu_device_ip_early_init()). PerfOpt is disabled during GPU init teardown and restored on resume. Tested-by: Derek J. Clark <derekjohn.clark@gmail.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Tested-by: Boqun Feng (Netflix) <boqun@kernel.org> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-09-24drm/xe: Implement Wa_22016122933Tales A. Mendonça
On platforms with a standalone media GT and media version 13.00 (MTL/ARL), memory shared between the CPU and the media GT's GuC must not be mapped cached on the CPU side: the CPU can otherwise read stale cache lines for data the GuC has already written. i915 implements this as Wa_22016122933 (see intel_gt_needs_wa_22016122933(), used by intel_guc_allocate_vma() and intel_gt_coherent_map_type()); xe never inherited it. The visible symptom on ARL is TLB invalidation acks stalling for a near-constant ~2.3s: the GuC writes the G2H ack in time, but the CPU keeps reading a stale (empty) view of the G2H CTB until the line is naturally evicted, so the fence timeout at 2.25s fires first. GuC log decode confirmed all invalidations were handled promptly by the firmware, and only the media GT was affected. See Link for the full investigation (three machines affected: 7d51, 7dd1, Arc Pro 130T). Making the mapping coherent instead of uncached does not help: with a GGTT PAT entry repurposed to WB|COH_2WAY the driver comes up and the media GT GuC runs, but the stalls remain (request-to-ack 2290ms). Uncached really is required here. Note that 2-way coherency is not normally reachable from a GGTT PTE (only 2 PAT bits), so that experiment needed a modified PAT table and may not reflect a supported configuration. Add the OOB workaround scoped like i915 (media version 13.00, media GT only - MEDIA_VERSION() OOB rules only match the media GT on standalone media platforms) and apply XE_BO_FLAG_NEEDS_UC to the GuC-shared allocations the CPU reads from: the CTBs, the GuC log, ADS, the SLPC shared data and the engine activity buffers. hwconfig and the G2G buffer are allocated on the primary GT only, where the workaround does not apply. Note that XE_BO_FLAG_NEEDS_UC drives both the CPU mapping (uncached) and the GGTT cache mode (XE_CACHE_NONE instead of XE_CACHE_WB), which is stricter than i915: i915 documents the workaround as WC on the CPU side and UC on the GPU side. A CPU-WC variant with the GGTT side kept at XE_CACHE_NONE was measured to be equally effective, but expressing it would require either a new BO flag or decoupling the GGTT cache-mode selection from XE_BO_FLAG_NEEDS_UC - simply swapping in XE_BO_FLAG_FORCE_WC silently relaxes the GPU side back to WB and the stalls return. The stricter mapping is kept here since it is the tested configuration and no throughput difference between the two was measurable; the extra plumbing can be added later if parity with i915 is preferred. Scope is limited to the GuC-shared allocations, which is where the failures were observed. i915 additionally covers media-GT LRC/ring state; extending xe to match can be done as a follow-up if wanted. Validation on two ARL machines (7d51 and 7dd1): before, 20-60 TLB invalidation ack stalls per day, every day, for weeks, on every kernel and on two GuC firmware versions (70.53.0 and 70.72.1). After: zero stalls in six weeks of combined runtime, over 10M TLB invalidations processed under the same workloads, across kernels 7.1.6, 7.1.8 and 7.2. The 7dd1 machine, which could not survive a day of media workloads on xe without a platform freeze, has been running xe full time since 11 August, including days with heavy video transcoding, with zero stalls and zero freezes. The coherency experiment, the CPU-WC measurements and the engine activity coverage gap were found by Navon John Lukose while A/B testing v2 on an ARL 7d51. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8678 Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Tales A. Mendonça <talesam@gmail.com> Tested-by: Navon John Lukose <navonjohnlukose@gmail.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260922144634.55130-4-talesam@gmail.com
2026-09-24drm/xe: Log when a timed out TLB invalidation ack finally arrivesTales A. Mendonça
When a TLB invalidation fence times out we log the timeout, but if the ack for that seqno later shows up there is no record of it, making it impossible to tell from logs whether the ack was lost forever or merely (very) late. Track the most recent timed out seqno and log how late its ack arrives, relative to both the original request and the moment the fence was signaled with -ETIME. On ARL with GuC 70.53.0 this shows the acks are never lost: they consistently arrive ~2.3s after the request, tens of milliseconds after the TDR has already signaled the fence: TLB invalidation fence timeout, seqno=10992 recv=10991 TLB invalidation late ack: seqno=10992 recv=10992, request-to-ack=2314ms, timeout-to-ack=45ms Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8678 Signed-off-by: Tales A. Mendonça <talesam@gmail.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260922144634.55130-3-talesam@gmail.com
2026-09-24drm/xe: Capture devcoredump on TLB invalidation timeoutTales A. Mendonça
TLB invalidation timeouts currently leave no record of the firmware state behind: there is no exec queue or job to blame, so nothing calls xe_devcoredump() and the GuC log content at the time of the hang is lost. Add xe_devcoredump_gt(), a variant of xe_devcoredump() for hangs that are not tied to an exec queue or job. It captures the GuC log and CT state of the affected GT, reusing the existing snapshot machinery and the "only first snapshot" policy, and hook it up to the TLB invalidation timeout path. This was instrumental in diagnosing GuC TLB invalidation ack stalls on ARL (see Link), where the invalidation request is consumed from the H2G CTB immediately but the ack G2H only arrives ~2.3s later, after the timeout has already fired. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8678 Signed-off-by: Tales A. Mendonça <talesam@gmail.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260922144634.55130-2-talesam@gmail.com
2026-09-24drm/xe: Drop old Xe GT ID macrosMatt Roper
XE_GT0 and XE_GT1 are old macros that were used for hardcoding specific GTs during early development of the driver; neither should be anymore since the driver shouldn't be making assumptions about what ID numbers correspond to specific types of IDs. * XE_GT0 was only being used in the GuC init code to skip reading the hwconfig table on more than one GT. Comparing the GT against xe_root_mmio_gt(xe) is a more direct way to ensure this happens on just a single GT per device (and should work even if the ID numbers wind up changing in the future). * XE_GT1 was only being used to set XE_MAX_TILES_PER_DEVICE which makes no sense at all; even though the highest tile count we have on any device today (2 on PVC) happens to match the number of GTs that we can potentially have inside a tile (2: primary+media on non-PVC platforms), these counts are unrelated and should not be tied together like this. Cleanup the places where these were used and drop the two defines so that they don't get mis-used anywhere else going forward. Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com> Link: https://patch.msgid.link/20260923-drop_old_gt_defines-v1-1-8f0811238582@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2026-09-24drm/panel: simple: Add BOE DV215FHM-R01 panelVishnu Saini
Add the BOE DV215FHM-R01 21.5" FHD (1920x1080) dual-channel LVDS panel. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Vishnu Saini <vishnu.saini@oss.qualcomm.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260903-b4-lvds-panel-doc-v4-2-861738a0d5de@oss.qualcomm.com
2026-09-24drm/panel: simple: Add support for Truly TFT320240-229-E panelFrank Bodammer
Add display mode and panel descriptor for the Truly TFT320240-229-E LCD panel. Register the panel in the of_device_id table with the compatible string "truly,tft320240-229-e". Signed-off-by: Frank Bodammer <frank.bodammer@siemens.com> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260917110517.1053556-3-alexander.sverdlin@siemens.com
2026-09-24drm/panel: ilitek-ili9882t: Add support for Ilitek IL79600A-based panelsMarek Vasut
The Ilitek IL79600A display controller is similar to the ILI9882T and can be supported within the existing `panel-ilitek-ili9882t.c` driver. This patch extends the ILI9882T driver to handle IL79600A-based panels, such as the 10" Raspberry Pi Touch Display 2. The IL79600A uses a similar command sequence and initialization flow, with minor differences in power supply configuration and timing. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260910181918.31551-4-marek.vasut+renesas@mailbox.org