File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -462,11 +462,16 @@ i915_gem_object_wait_reservation(struct reservation_object *resv,
462
462
463
463
dma_fence_put (excl );
464
464
465
+ /* Oportunistically prune the fences iff we know they have *all* been
466
+ * signaled and that the reservation object has not been changed (i.e.
467
+ * no new fences have been added).
468
+ */
465
469
if (prune_fences && !__read_seqcount_retry (& resv -> seq , seq )) {
466
- reservation_object_lock (resv , NULL );
467
- if (!__read_seqcount_retry (& resv -> seq , seq ))
468
- reservation_object_add_excl_fence (resv , NULL );
469
- reservation_object_unlock (resv );
470
+ if (reservation_object_trylock (resv )) {
471
+ if (!__read_seqcount_retry (& resv -> seq , seq ))
472
+ reservation_object_add_excl_fence (resv , NULL );
473
+ reservation_object_unlock (resv );
474
+ }
470
475
}
471
476
472
477
return timeout ;
You can’t perform that action at this time.
0 commit comments