linux_dsm_epyc7002/drivers/gpu/drm/i915/gt
Chris Wilson 928f8f4231 drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context
Despite what I think the prm recommends, commit f2253bd985
("drm/i915/ringbuffer: EMIT_INVALIDATE after switch context") turned out
to be a huge mistake when enabling Ironlake contexts as the GPU would
hang on either a MI_FLUSH or PIPE_CONTROL immediately following the
MI_SET_CONTEXT of an active mesa context (more vanilla contexts, e.g.
simple rendercopies with igt, do not suffer).

Ville found the following clue,

  "[DevCTG+]: For the invalidate operation of the pipe control, the
   following pointers are affected. The
   invalidate operation affects the restore of these packets. If the pipe
   control invalidate operation is completed
   before the context save, the indirect pointers will not be restored from
   memory.
   1. Pipeline State Pointer
   2. Media State Pointer
   3. Constant Buffer Packet"

which suggests by us emitting the INVALIDATE prior to the MI_SET_CONTEXT,
we prevent the context-restore from chasing the dangling pointers within
the image, and explains why this likely prevents the GPU hang.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190419111749.3910-1-chris@chris-wilson.co.uk
2019-04-26 11:37:58 +01:00
..
intel_breadcrumbs.c
intel_context_types.h
intel_context.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_context.h drm/i915: Pass intel_context to i915_request_create() 2019-04-24 22:25:35 +01:00
intel_engine_cs.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_engine_pm.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_engine_pm.h drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_engine_types.h drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_engine.h drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_gpu_commands.h
intel_gt_pm.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_gt_pm.h drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_hangcheck.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_lrc_reg.h
intel_lrc.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_lrc.h
intel_mocs.c
intel_mocs.h
intel_reset.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_reset.h drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
intel_ringbuffer.c drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context 2019-04-26 11:37:58 +01:00
intel_sseu.c
intel_sseu.h
intel_workarounds_types.h
intel_workarounds.c drm/i915: Pass intel_context to i915_request_create() 2019-04-24 22:25:35 +01:00
intel_workarounds.h
Makefile
Makefile.header-test
mock_engine.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
mock_engine.h
selftest_engine_cs.c
selftest_hangcheck.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
selftest_lrc.c
selftest_workarounds.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00