drm/i915: Exclude low pages (128KiB) of stolen from use
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Oct 2020 16:50:05 +0000 (17:50 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 20 Oct 2020 09:16:54 +0000 (10:16 +0100)
commitd3606757e611fbd48bb239e8c2fe9779b3f50035
treebb8f1246ed38a04a435e9a862280c902a0182cb0
parentd7085b0faac8330b67e1b10ff2dadd8af6b2564e
drm/i915: Exclude low pages (128KiB) of stolen from use

The GPU is trashing the low pages of its reserved memory upon reset. If
we are using this memory for ringbuffers, then we will dutiful resubmit
the trashed rings after the reset causing further resets, and worse. We
must exclude this range from our own use. The value of 128KiB was found
by empirical measurement (and verified now with a selftest) on gen9.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201019165005.18128-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Kconfig.debug
drivers/gpu/drm/i915/gem/i915_gem_stolen.c
drivers/gpu/drm/i915/gem/i915_gem_stolen.h
drivers/gpu/drm/i915/gt/selftest_reset.c