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)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 21 Oct 2020 12:32:28 +0000 (08:32 -0400)
commit3da3c5c1c9825c24168f27b021339e90af37e969
tree91b0c84294244df6eb53b434507da8400a3b1711
parentb8cff311a42df4f15d6432583573d828b5c7b12a
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
(cherry picked from commit d3606757e611fbd48bb239e8c2fe9779b3f50035)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
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