Skip to content

Commit 0abb33b

Browse files
matt-auldrodrigovivi
authored andcommitted
drm/i915/gtt: drop the page table optimisation
We skip filling out the pt with scratch entries if the va range covers the entire pt, since we later have to fill it with the PTEs for the object pages anyway. However this might leave open a small window where the PTEs don't point to anything valid for the HW to consume. When for example using 2M GTT pages this fill_px() showed up as being quite significant in perf measurements, and ends up being completely wasted since we ignore the pt and just use the pde directly. Anyway, currently we have our PTE construction split between alloc and insert, which is probably slightly iffy nowadays, since the alloc doesn't actually allocate anything anymore, instead it just sets up the page directories and points the PTEs at the scratch page. Later when we do the insert step we re-program the PTEs again. Better might be to squash the alloc and insert into a single step, then bringing back this optimisation(along with some others) should be possible. Fixes: 1482667 ("drm/i915: Only initialize partially filled pagetables") Signed-off-by: Matthew Auld <[email protected]> Cc: Jon Bloomfield <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: <[email protected]> # v4.15+ Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 8f88ca7) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 2feeb52 commit 0abb33b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/gpu/drm/i915/gt/gen8_ppgtt.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,7 @@ static void __gen8_ppgtt_alloc(struct i915_address_space * const vm,
303303
__i915_gem_object_pin_pages(pt->base);
304304
i915_gem_object_make_unshrinkable(pt->base);
305305

306-
if (lvl ||
307-
gen8_pt_count(*start, end) < I915_PDES ||
308-
intel_vgpu_active(vm->i915))
309-
fill_px(pt, vm->scratch[lvl]->encode);
306+
fill_px(pt, vm->scratch[lvl]->encode);
310307

311308
spin_lock(&pd->lock);
312309
if (likely(!pd->entry[idx])) {

0 commit comments

Comments
 (0)