Valve kernel patch targets Proton stuttering via amdgpu sparse binding overhaul
Valve contractor Natalie Vock submitted a Linux kernel patchset that restructures AMDGPU VM sparse binding to eliminate stalls between graphics/compute and SDMA queues, reducing stutter in Proton games that heavily use PRT mappings.
Summary
Valve Linux graphics contractor Natalie Vock has submitted a patchset to the Linux kernel's AMDGPU driver that addresses a specific source of stuttering in modern Windows games running through Proton on Steam Deck and other Linux systems. The patch targets games that make heavy use of sparse bindings (partially resident textures), where the current synchronization of PRT mappings to every other submission can stall graphics and compute queues when sparse binding work on the SDMA engine overlaps with frame rendering.
The fix introduces a 'VM update context' structure that accumulates pending mapping changes across multiple operations, allowing batch validation and atomic application rather than processing each sparse binding update through separate ioctls. This reduces both GPU queue stalls and CPU overhead from repeated user-to-kernel mode switches. The patchset has not yet been merged into mainline and will require kernel acceptance before reaching SteamOS and other distributions.
How the AMDGPU VM patch reduces Proton stutter
- PRT mapping synchronization: Current AMDGPU behavior syncs partially resident texture mappings to every other submission, causing graphics and compute queue stalls when sparse binding load on SDMA overlaps with frame work.
- Per-ioctl overhead: Each sparse binding update currently requires a separate ioctl, forcing significant CPU time spent switching between user and kernel mode for individual binding changes.
- VM update context structure: Patch 1 introduces a context that carries state across VM update functions, initially tracking freed mappings so amdgpu_vm_clear_freed only clears mappings actually freed during the update.
- Batch mapping application: Later patches expand the context to hold pending mapping changes, enabling a future ioctl to validate many changes before applying them atomically rather than one at a time.
- Explicit unmap synchronization: The freed-mappings tracking enables explicit synchronization of unmap operations, a prerequisite for decoupling sparse binding work from graphics/compute submission timing.
Why it matters
For Steam Deck users and Linux gamers running Proton, this patch addresses a growing class of stutter caused by modern game engines' increasing reliance on sparse texture streaming rather than traditional asset loading. The structural changes to AMDGPU's VM update path also establish infrastructure for more efficient batch operations that could benefit other GPU compute workloads on AMD hardware across distributions.
Original reference: steamdeckhq.com →