summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/mock_engine.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-08-09 19:25:17 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-08-09 20:18:30 +0100
commit48ae397b6b935c6733f15476c338df27eac9293c (patch)
treef6e892b3dd01392dbf819fa4f3a4c9d4dabe3b0e /drivers/gpu/drm/i915/gt/mock_engine.c
parent4c60b1aaa255207eea2892d2d55b718db90d1ad8 (diff)
drm/i915: Push the ring creation flags to the backend
Push the ring creation flags from the outer GEM context to the inner intel_context to avoid an unsightly back-reference from inside the backend. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190809182518.20486-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/mock_engine.c')
-rw-r--r--drivers/gpu/drm/i915/gt/mock_engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c
index 848a83a38b08..79baed1aaf38 100644
--- a/drivers/gpu/drm/i915/gt/mock_engine.c
+++ b/drivers/gpu/drm/i915/gt/mock_engine.c
@@ -140,7 +140,7 @@ static void mock_context_destroy(struct kref *ref)
GEM_BUG_ON(intel_context_is_pinned(ce));
- if (ce->ring)
+ if (test_bit(CONTEXT_ALLOC_BIT, &ce->flags))
mock_ring_free(ce->ring);
intel_context_fini(ce);