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>
This commit is contained in:

committed by
Rodrigo Vivi

parent
b8cff311a4
commit
3da3c5c1c9
@@ -53,8 +53,10 @@ int i915_gem_stolen_insert_node(struct drm_i915_private *i915,
|
||||
struct drm_mm_node *node, u64 size,
|
||||
unsigned alignment)
|
||||
{
|
||||
return i915_gem_stolen_insert_node_in_range(i915, node, size,
|
||||
alignment, 0, U64_MAX);
|
||||
return i915_gem_stolen_insert_node_in_range(i915, node,
|
||||
size, alignment,
|
||||
I915_GEM_STOLEN_BIAS,
|
||||
U64_MAX);
|
||||
}
|
||||
|
||||
void i915_gem_stolen_remove_node(struct drm_i915_private *i915,
|
||||
|
@@ -30,4 +30,6 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *dev_priv
|
||||
resource_size_t stolen_offset,
|
||||
resource_size_t size);
|
||||
|
||||
#define I915_GEM_STOLEN_BIAS SZ_128K
|
||||
|
||||
#endif /* __I915_GEM_STOLEN_H__ */
|
||||
|
Reference in New Issue
Block a user