mbox series

[0/8] Restore workarounds after engine reset and unify their handling

Message ID 20181130113201.13007-1-tvrtko.ursulin@linux.intel.com (mailing list archive)
Headers show
Series Restore workarounds after engine reset and unify their handling | expand

Message

Tvrtko Ursulin Nov. 30, 2018, 11:31 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

First two patches in this series fix losing of workarounds after engine reset
(https://bugzilla.freedesktop.org/show_bug.cgi?id=107945) which started
happening after 59b449d5c82a ("drm/i915: Split out functions for different kinds
of workarounds").

But since it was discovered to be unsafe to simply re-apply all of them, against
a possibly active GPU, and potentially from IRQ context, the approach taken was
to split GT workarounds and per-engine workarounds. Latter so far contain the
ones living in the 0x2xxx and 0xbxxx range, which were empirically shown to be
lost after RCS reset.

This way only a smaller set of affected workarounds can be applied after engine
resetm, which is done with irq safe read-modify-write cycle.

The series is structured like this so first two patches are as standalone as
possible so it is easy (easier) to backport them. The rest of the series
cleans up the whole workaround handling by moving all four classes of them to a
common framework.

Tvrtko Ursulin (8):
  drm/i915: Record GT workarounds in a list
  drm/i915: Introduce per-engine workarounds
  drm/i915: Verify GT workaround state at runtime
  drm/i915: Verify engine workaround state at runtime
  drm/i915/selftests: Add tests for GT and engine workaround
    verification
  drm/i915: Move register white-listing to the common workaround
    framework
  drm/i915: Fuse per-context workaround handling with the common
    framework
  drm/i915: Trim unused workaround list entries

 drivers/gpu/drm/i915/i915_debugfs.c           |  11 +-
 drivers/gpu/drm/i915/i915_drv.c               |   8 +
 drivers/gpu/drm/i915/i915_drv.h               |  18 +-
 drivers/gpu/drm/i915/i915_gem.c               |   6 +
 drivers/gpu/drm/i915/i915_gem_context.c       |   6 +-
 drivers/gpu/drm/i915/intel_engine_cs.c        |   3 +
 drivers/gpu/drm/i915/intel_lrc.c              |   5 +
 drivers/gpu/drm/i915/intel_ringbuffer.h       |   3 +
 drivers/gpu/drm/i915/intel_workarounds.c      | 896 +++++++++++-------
 drivers/gpu/drm/i915/intel_workarounds.h      |  33 +-
 .../drm/i915/selftests/intel_workarounds.c    | 130 ++-
 11 files changed, 726 insertions(+), 393 deletions(-)