#define I915_MAX_NUM_FENCE_BITS 6
struct drm_i915_fence_reg {
- struct list_head lru_list;
+ struct list_head link;
struct drm_i915_gem_object *obj;
int pin_count;
};
for (i = 0; i < I915_NUM_ENGINES; i++)
init_engine_lists(&dev_priv->engine[i]);
for (i = 0; i < I915_MAX_NUM_FENCES; i++)
- INIT_LIST_HEAD(&dev_priv->fence_regs[i].lru_list);
+ INIT_LIST_HEAD(&dev_priv->fence_regs[i].link);
INIT_DELAYED_WORK(&dev_priv->gt.retire_work,
i915_gem_retire_work_handler);
INIT_DELAYED_WORK(&dev_priv->gt.idle_work,
if (flags & __EXEC_OBJECT_HAS_FENCE) {
struct drm_i915_private *dev_priv = req->i915;
- list_move_tail(&dev_priv->fence_regs[obj->fence_reg].lru_list,
+ list_move_tail(&dev_priv->fence_regs[obj->fence_reg].link,
&dev_priv->mm.fence_list);
}
}
if (enable) {
obj->fence_reg = reg;
fence->obj = obj;
- list_move_tail(&fence->lru_list, &dev_priv->mm.fence_list);
+ list_move_tail(&fence->link, &dev_priv->mm.fence_list);
} else {
obj->fence_reg = I915_FENCE_REG_NONE;
fence->obj = NULL;
- list_del_init(&fence->lru_list);
+ list_del_init(&fence->link);
}
obj->fence_dirty = false;
}
goto deadlock;
/* None available, try to steal one or wait for a user to finish */
- list_for_each_entry(reg, &dev_priv->mm.fence_list, lru_list) {
+ list_for_each_entry(reg, &dev_priv->mm.fence_list, link) {
if (reg->pin_count)
continue;
if (obj->fence_reg != I915_FENCE_REG_NONE) {
reg = &dev_priv->fence_regs[obj->fence_reg];
if (!obj->fence_dirty) {
- list_move_tail(®->lru_list,
- &dev_priv->mm.fence_list);
+ list_move_tail(®->link, &dev_priv->mm.fence_list);
return 0;
}
} else if (enable) {