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);
 
                /* 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);
 
 
                       const char *name,
                       struct i915_vma *hwsp)
 {
-       struct i915_gt_timelines *gt = &i915->gt.timelines;
        void *vaddr;
 
        /*
 
        i915_syncmap_init(&timeline->sync);
 
-       mutex_lock(>->mutex);
-       list_add(&timeline->link, >->list);
-       mutex_unlock(>->mutex);
-
        return 0;
 }
 
        struct i915_gt_timelines *gt = &i915->gt.timelines;
 
        mutex_init(>->mutex);
-       INIT_LIST_HEAD(>->list);
+       INIT_LIST_HEAD(>->active_list);
 
        spin_lock_init(>->hwsp_lock);
        INIT_LIST_HEAD(>->hwsp_free_list);
        i915_gem_shrinker_taints_mutex(i915, >->mutex);
 }
 
+static void timeline_add_to_active(struct i915_timeline *tl)
+{
+       struct i915_gt_timelines *gt = &tl->i915->gt.timelines;
+
+       mutex_lock(>->mutex);
+       list_add(&tl->link, >->active_list);
+       mutex_unlock(>->mutex);
+}
+
+static void timeline_remove_from_active(struct i915_timeline *tl)
+{
+       struct i915_gt_timelines *gt = &tl->i915->gt.timelines;
+
+       mutex_lock(>->mutex);
+       list_del(&tl->link);
+       mutex_unlock(>->mutex);
+}
+
 /**
  * i915_timelines_park - called when the driver idles
  * @i915: the drm_i915_private device
        struct i915_timeline *timeline;
 
        mutex_lock(>->mutex);
-       list_for_each_entry(timeline, >->list, link) {
+       list_for_each_entry(timeline, >->active_list, link) {
                /*
                 * All known fences are completed so we can scrap
                 * the current sync point tracking and start afresh,
 
 void i915_timeline_fini(struct i915_timeline *timeline)
 {
-       struct i915_gt_timelines *gt = &timeline->i915->gt.timelines;
-
        GEM_BUG_ON(timeline->pin_count);
        GEM_BUG_ON(!list_empty(&timeline->requests));
 
-       mutex_lock(>->mutex);
-       list_del(&timeline->link);
-       mutex_unlock(>->mutex);
-
        i915_syncmap_free(&timeline->sync);
        hwsp_free(timeline);
 
                i915_ggtt_offset(tl->hwsp_ggtt) +
                offset_in_page(tl->hwsp_offset);
 
+       timeline_add_to_active(tl);
+
        return 0;
 
 unpin:
        if (--tl->pin_count)
                return;
 
+       timeline_remove_from_active(tl);
+
        /*
         * Since this timeline is idle, all bariers upon which we were waiting
         * must also be complete and so we can discard the last used barriers
 {
        struct i915_gt_timelines *gt = &i915->gt.timelines;
 
-       GEM_BUG_ON(!list_empty(>->list));
+       GEM_BUG_ON(!list_empty(>->active_list));
        GEM_BUG_ON(!list_empty(>->hwsp_free_list));
 
        mutex_destroy(>->mutex);