[Intel-gfx] [PATCH] drm/i915: Mark the atomic commit_ready fence as freed
Chris Wilson
chris at chris-wilson.co.uk
Mon Dec 5 11:04:34 UTC 2016
Using debugobjects allows us to detect if a freed fence is reused, or if
an active fence is freed. However, this requires us to forewarn the
debugobject when it is actually freed. Ideally this would hook into that
atomic state->destroy callback so that we would catch the use of a
destroyed fence before it was freed, but alas we do not have that
callback just yet, so mark the fence as freed when it is destroyed.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_display.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 1fafcce53ecc..1624db0856d9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14607,6 +14607,12 @@ intel_atomic_commit_ready(struct i915_sw_fence *fence,
break;
case FENCE_FREE:
+ /* Ideally we would hook into the state->destroy callback to
+ * mark the fence object free at the right time. Since we
+ * don't currently have that callback, mark it as free
+ * right away.
+ */
+ i915_sw_fence_fini(fence);
drm_atomic_state_put(&state->base);
break;
}
--
2.10.2
More information about the Intel-gfx
mailing list