drm/i915: un-inline i915_gem_drain_freed_objects()
I can't idenfity a single hot path that would require i915_gem_drain_freed_objects() to be inline. Un-inline it. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/6c289c55afee0d9a3067122db63277b8d60cf74f.1662390010.git.jani.nikula@intel.com
This commit is contained in:
parent
230bb131a6
commit
5aea37bf41
@ -979,22 +979,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
|
||||
void i915_gem_init_early(struct drm_i915_private *dev_priv);
|
||||
void i915_gem_cleanup_early(struct drm_i915_private *dev_priv);
|
||||
|
||||
static inline void i915_gem_drain_freed_objects(struct drm_i915_private *i915)
|
||||
{
|
||||
/*
|
||||
* A single pass should suffice to release all the freed objects (along
|
||||
* most call paths) , but be a little more paranoid in that freeing
|
||||
* the objects does take a little amount of time, during which the rcu
|
||||
* callbacks could have added new objects into the freed list, and
|
||||
* armed the work again.
|
||||
*/
|
||||
while (atomic_read(&i915->mm.free_count)) {
|
||||
flush_work(&i915->mm.free_work);
|
||||
flush_delayed_work(&i915->bdev.wq);
|
||||
rcu_barrier();
|
||||
}
|
||||
}
|
||||
|
||||
void i915_gem_drain_freed_objects(struct drm_i915_private *i915);
|
||||
void i915_gem_drain_workqueue(struct drm_i915_private *i915);
|
||||
|
||||
struct i915_vma * __must_check
|
||||
|
@ -1085,6 +1085,21 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
* A single pass should suffice to release all the freed objects (along most
|
||||
* call paths), but be a little more paranoid in that freeing the objects does
|
||||
* take a little amount of time, during which the rcu callbacks could have added
|
||||
* new objects into the freed list, and armed the work again.
|
||||
*/
|
||||
void i915_gem_drain_freed_objects(struct drm_i915_private *i915)
|
||||
{
|
||||
while (atomic_read(&i915->mm.free_count)) {
|
||||
flush_work(&i915->mm.free_work);
|
||||
flush_delayed_work(&i915->bdev.wq);
|
||||
rcu_barrier();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Similar to objects above (see i915_gem_drain_freed-objects), in general we
|
||||
* have workers that are armed by RCU and then rearm themselves in their
|
||||
|
Loading…
x
Reference in New Issue
Block a user