diff options
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r-- | sys/dev/pci/drm/i915/gt/intel_timeline.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/i915/gt/intel_timeline.c b/sys/dev/pci/drm/i915/gt/intel_timeline.c index 2fa61904404..d0cc2056f5b 100644 --- a/sys/dev/pci/drm/i915/gt/intel_timeline.c +++ b/sys/dev/pci/drm/i915/gt/intel_timeline.c @@ -119,6 +119,15 @@ static void __idle_hwsp_free(struct intel_timeline_hwsp *hwsp, int cacheline) spin_unlock_irqrestore(>->hwsp_lock, flags); } +static void __rcu_cacheline_free(struct rcu_head *rcu) +{ + struct intel_timeline_cacheline *cl = + container_of(rcu, typeof(*cl), rcu); + + i915_active_fini(&cl->active); + kfree(cl); +} + static void __idle_cacheline_free(struct intel_timeline_cacheline *cl) { GEM_BUG_ON(!i915_active_is_idle(&cl->active)); @@ -127,8 +136,7 @@ static void __idle_cacheline_free(struct intel_timeline_cacheline *cl) i915_vma_put(cl->hwsp->vma); __idle_hwsp_free(cl->hwsp, ptr_unmask_bits(cl->vaddr, CACHELINE_BITS)); - i915_active_fini(&cl->active); - kfree_rcu(cl, rcu); + call_rcu(&cl->rcu, __rcu_cacheline_free); } __i915_active_call |