]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Skip over non leaf pte for PRL generation
authorBrian Nguyen <brian3.nguyen@intel.com>
Thu, 5 Mar 2026 17:15:48 +0000 (17:15 +0000)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 19 Mar 2026 13:22:53 +0000 (14:22 +0100)
commit38b8dcde231641f00eee977d245dbfe5f6b06e11
tree8624a34834852318ed600dc4a31d7b8bd17fb61b
parent7838dd8367419e9fc43b79c038321cb3c04de2a2
drm/xe: Skip over non leaf pte for PRL generation

The check using xe_child->base.children was insufficient in determining
if a pte was a leaf node. So explicitly skip over every non-leaf pt and
conditionally abort if there is a scenario where a non-leaf pt is
interleaved between leaf pt, which results in the page walker skipping
over some leaf pt.

Note that the behavior being targeted for abort is
PD[0] = 2M PTE
PD[1] = PT -> 512 4K PTEs
PD[2] = 2M PTE

results in abort, page walker won't descend PD[1].

With new abort, ensuring valid PRL before handling a second abort.

v2:
 - Revert to previous assert.
 - Revised non-leaf handling for interleaf child pt and leaf pte.
 - Update comments to specifications. (Stuart)
 - Remove unnecessary XE_PTE_PS64. (Matthew B)

v3:
 - Modify secondary abort to only check non-leaf PTEs. (Matthew B)

Fixes: b912138df299 ("drm/xe: Create page reclaim list on unbind")
Signed-off-by: Brian Nguyen <brian3.nguyen@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
Link: https://patch.msgid.link/20260305171546.67691-6-brian3.nguyen@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit 1d123587525db86cc8f0d2beb35d9e33ca3ade83)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_pt.c