Commit 827db9d8 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Ignore applying the self-relocation BIAS if no relocations

We only need to apply the BIAS for self-relocations into the batchbuffer
iff the execobject has any relocations.

This suppresses some warnings we may get with a full gtt (so the batch
object has wound up at 0 from a previous invocation), but doesn't fix
the underlying problem of how we tried to move a pinned batch vma (how
we have a pinned user vma outside of execbuf, I do not know, though this
being on an aliasing ppgtt means it could be a spurious pinning via the
global gtt). One step at a time...

References: https://bugs.freedesktop.org/show_bug.cgi?id=106744#c1
Testcase: igt/gem_exec_gttfill # byt (sporadic)
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180621073205.26701-1-chris@chris-wilson.co.uk
parent 26eb4cd6
...@@ -534,7 +534,8 @@ eb_add_vma(struct i915_execbuffer *eb, ...@@ -534,7 +534,8 @@ eb_add_vma(struct i915_execbuffer *eb,
* paranoia do it everywhere. * paranoia do it everywhere.
*/ */
if (i == batch_idx) { if (i == batch_idx) {
if (!(eb->flags[i] & EXEC_OBJECT_PINNED)) if (entry->relocation_count &&
!(eb->flags[i] & EXEC_OBJECT_PINNED))
eb->flags[i] |= __EXEC_OBJECT_NEEDS_BIAS; eb->flags[i] |= __EXEC_OBJECT_NEEDS_BIAS;
if (eb->reloc_cache.has_fence) if (eb->reloc_cache.has_fence)
eb->flags[i] |= EXEC_OBJECT_NEEDS_FENCE; eb->flags[i] |= EXEC_OBJECT_NEEDS_FENCE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment