[Intel-gfx] [PATCH] drm/i915/gt: Warn more clearly if we the context state is still pinned
Chris Wilson
chris at chris-wilson.co.uk
Wed Apr 22 09:29:24 UTC 2020
When recording the default context state, we submit an ordinary context
and then steal the context image for our defaults. To be able to steal
the state, we must have total ownership of the context. During CI we
want to make this error extremely obvious, as otherwise we will fail the
user's module load.
References: https://gitlab.freedesktop.org/drm/intel/-/issues/1763
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/gt/intel_gt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index 1c99cc72305a..379eb39e7979 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -472,6 +472,7 @@ static int __engines_record_defaults(struct intel_gt *gt)
/* We want to be able to unbind the state from the GGTT */
GEM_BUG_ON(intel_context_is_pinned(rq->context));
+ GEM_BUG_ON(i915_vma_is_pinned(state));
/*
* As we will hold a reference to the logical state, it will
--
2.20.1
More information about the Intel-gfx
mailing list