Skip to content

Enabling GEN8 full PPGTT + fixes

Ben Widawsky intel-gfx 1 version Applied

Status from this message: Queued for -next, thanks for the patch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/16drm/i915: Split up do_switchdrivers/gpu/drm/i915/i915_gem_context.c+50 -280 replies
2/16drm/i915: Extract l3 remapping out of ctx switchdrivers/gpu/drm/i915/i915_gem_context.c+20 -120 replies
3/16drm/i915/ppgtt: Load address space after mi_set_contextdrivers/gpu/drm/i915/i915_gem_context.c+27 -20 replies
4/16drm/i915: Fix another another use-after-free in do_switchdrivers/gpu/drm/i915/i915_gem_context.c+10 -23 replies
5/16drm/i915/ctx: Return earlier on failuredrivers/gpu/drm/i915/i915_gem_context.c+9 -01 reply
6/16drm/i915/error: Check the potential ctx obj's vmdrivers/gpu/drm/i915/i915_gpu_error.c+3 -01 reply
7/16drm/i915/error: vma error capture prettyifydrivers/gpu/drm/i915/i915_gpu_error.c+32 -230 replies
8/16drm/i915/error: Do a better job of disambiguating VMAsdrivers/gpu/drm/i915/i915_gem_gtt.c drivers/gpu/drm/i915/i915_gem_gtt.h drivers/gpu/drm/i915/i915_gpu_error.c+28 -144 replies
9/16drm/i915/error: Capture vmas instead of BOsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gpu_error.c+30 -240 replies
10/16drm/i915: Add some extra guards in evict_vmdrivers/gpu/drm/i915/i915_gem_evict.c+6 -10 replies
11/16drm/i915: Make an uninterruptible evictdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem_context.c drivers/gpu/drm/i915/i915_gem_evict.c +1 more+28 -130 replies
12/16drm/i915: Reorder ctx unref on ppgtt cleanupdrivers/gpu/drm/i915/i915_gem_context.c+2 -41 reply
13/16drm/i915: More correct (slower) ppgtt cleanupdrivers/gpu/drm/i915/i915_gem_context.c+48 -31 reply
14/16drm/i915: Defer PPGTT cleanupdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gem.c drivers/gpu/drm/i915/i915_gem_context.c +2 more+150 -140 replies
15/16drm/i915/bdw: Enable full PPGTTdrivers/gpu/drm/i915/i915_drv.h+1 -10 replies
16/16drm/i915: Get the error state over the wire (HACKish)drivers/gpu/drm/i915/i915_debugfs.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_gpu_error.c +1 more+29 -91 reply

Reviews trailers per patch

1 of 16 patches has a Reviewed-by or Acked-by.

PatchChris Wilson
1/16
2/16
3/16
4/16R-b
5/16
6/16
7/16
8/16
9/16
10/16
11/16
12/16
13/16
14/16
15/16
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/16] Enabling GEN8 full PPGTT + fixes

Here be all the patches to make full PPGTT relatively stable on Broadwell. Most of the work was actually to the generic PPGTT code, and not BDW specific. There are basically 3 fixes:
1. Make the error state not horrible, but more work still needed.
2. Fix up another tricky from != from case in do_switch
3. Generally more graceful handling in ppgtt_release

1. Various forms of this subseries have shown up on the list from both myself, and Chris (and I feel like Mika, also). For whatever reason, none have been merged. I don't necessarily mind missing information, but without these patches we can OOPs and GP fault in the error state, which is not acceptable.

2. The meat of the debugging came here. Essentially this problem has already been seen, and solved. The issue is, there is another spot in do_switch that can invoke a switch to the default context. We probably want to get slightly better handling of this, but for now this solves my problems.

3. There are 2 categories addressed in this bucket. Reset, and signals. The patches themselves explain the situation. I take a two step approach with this where first I make things correct (and slow as heck), and then I do the more optimal and trickier solution. Both of these are in line to be replaced by Daniel, but I needed something sooner.

Here is the test case that caught all of the above issues:
while [ 1 ] ; do

        (glxgears) & pid[0]=$!
        (glxgears) & pid[1]=$!
        (glxgears) & pid[2]=$!
        sleep 3
        kill ${pid[*]}

done

Ben Widawsky (16):
drm/i915: Split up do_switch
drm/i915: Extract l3 remapping out of ctx switch drm/i915/ppgtt: Load address space after mi_set_context drm/i915: Fix another another use-after-free in do_switch drm/i915/ctx: Return earlier on failure drm/i915/error: Check the potential ctx obj's vm drm/i915/error: vma error capture prettyify drm/i915/error: Do a better job of disambiguating VMAs drm/i915/error: Capture vmas instead of BOs drm/i915: Add some extra guards in evict_vm drm/i915: Make an uninterruptible evict drm/i915: Reorder ctx unref on ppgtt cleanup drm/i915: More correct (slower) ppgtt cleanup drm/i915: Defer PPGTT cleanup
drm/i915/bdw: Enable full PPGTT
drm/i915: Get the error state over the wire (HACKish)

 drivers/gpu/drm/i915/i915_debugfs.c        |   2 +-
 drivers/gpu/drm/i915/i915_drv.h            |  18 ++-
 drivers/gpu/drm/i915/i915_gem.c            | 110 +++++++++++++
 drivers/gpu/drm/i915/i915_gem_context.c    | 238 ++++++++++++++++++++++-------
 drivers/gpu/drm/i915/i915_gem_evict.c      |  39 +++--
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |   2 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c        |   3 +-
 drivers/gpu/drm/i915/i915_gem_gtt.h        |   4 +
 drivers/gpu/drm/i915/i915_gpu_error.c      | 157 ++++++++++++-------
 drivers/gpu/drm/i915/i915_sysfs.c          |   2 +-
 10 files changed, 449 insertions(+), 126 deletions(-)
Signature · 1 line
2.0.1