diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-28 21:18:12 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-28 22:07:13 +0300 |
commit | 9407d3bdb048d52fa0fd45fa624a6c9f00072169 (patch) | |
tree | 14d05921a34ff86736f22440ffef863d626974d9 /drivers/gpu/drm/i915/i915_gem.c | |
parent | 5013eb8cd601c31e6d7d1b9d3291b24e933b77b2 (diff) | |
download | linux-9407d3bdb048d52fa0fd45fa624a6c9f00072169.tar.xz |
drm/i915: Track active timelines
Now that we pin timelines around use, we have a clearly defined lifetime
and convenient points at which we can track only the active timelines.
This allows us to reduce the list iteration to only consider those
active timelines and not all.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190128181812.22804-6-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 4e0de22f0166..9c499edb4c13 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3246,7 +3246,7 @@ wait_for_timelines(struct drm_i915_private *i915, return timeout; mutex_lock(>->mutex); - list_for_each_entry(tl, >->list, link) { + list_for_each_entry(tl, >->active_list, link) { struct i915_request *rq; rq = i915_gem_active_get_unlocked(&tl->last_request); @@ -3274,7 +3274,7 @@ wait_for_timelines(struct drm_i915_private *i915, /* restart after reacquiring the lock */ mutex_lock(>->mutex); - tl = list_entry(>->list, typeof(*tl), link); + tl = list_entry(>->active_list, typeof(*tl), link); } mutex_unlock(>->mutex); |