[PATCH] drm/i915: Mark the atomic commit_ready fence as freed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux