drm/i915: Rename fence.lru_list to link
Our current practice is to only name the actual list (here dev_priv->fence_list) using "list", and elements upon that list are referred to as "link". Further, the lru nature is of the list and not of the node and including in the name does not disambiguate the link from anything else. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-20-chris@chris-wilson.co.uk
This commit is contained in:
parent
364c8172ed
commit
a1e5afbe4d
|
@ -461,7 +461,7 @@ struct intel_overlay_error_state;
|
||||||
#define I915_MAX_NUM_FENCE_BITS 6
|
#define I915_MAX_NUM_FENCE_BITS 6
|
||||||
|
|
||||||
struct drm_i915_fence_reg {
|
struct drm_i915_fence_reg {
|
||||||
struct list_head lru_list;
|
struct list_head link;
|
||||||
struct drm_i915_gem_object *obj;
|
struct drm_i915_gem_object *obj;
|
||||||
int pin_count;
|
int pin_count;
|
||||||
};
|
};
|
||||||
|
|
|
@ -4553,7 +4553,7 @@ i915_gem_load_init(struct drm_device *dev)
|
||||||
for (i = 0; i < I915_NUM_ENGINES; i++)
|
for (i = 0; i < I915_NUM_ENGINES; i++)
|
||||||
init_engine_lists(&dev_priv->engine[i]);
|
init_engine_lists(&dev_priv->engine[i]);
|
||||||
for (i = 0; i < I915_MAX_NUM_FENCES; 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,
|
INIT_DELAYED_WORK(&dev_priv->gt.retire_work,
|
||||||
i915_gem_retire_work_handler);
|
i915_gem_retire_work_handler);
|
||||||
INIT_DELAYED_WORK(&dev_priv->gt.idle_work,
|
INIT_DELAYED_WORK(&dev_priv->gt.idle_work,
|
||||||
|
|
|
@ -1310,7 +1310,7 @@ void i915_vma_move_to_active(struct i915_vma *vma,
|
||||||
if (flags & __EXEC_OBJECT_HAS_FENCE) {
|
if (flags & __EXEC_OBJECT_HAS_FENCE) {
|
||||||
struct drm_i915_private *dev_priv = req->i915;
|
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);
|
&dev_priv->mm.fence_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,11 +245,11 @@ static void i915_gem_object_update_fence(struct drm_i915_gem_object *obj,
|
||||||
if (enable) {
|
if (enable) {
|
||||||
obj->fence_reg = reg;
|
obj->fence_reg = reg;
|
||||||
fence->obj = obj;
|
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 {
|
} else {
|
||||||
obj->fence_reg = I915_FENCE_REG_NONE;
|
obj->fence_reg = I915_FENCE_REG_NONE;
|
||||||
fence->obj = NULL;
|
fence->obj = NULL;
|
||||||
list_del_init(&fence->lru_list);
|
list_del_init(&fence->link);
|
||||||
}
|
}
|
||||||
obj->fence_dirty = false;
|
obj->fence_dirty = false;
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ i915_find_fence_reg(struct drm_device *dev)
|
||||||
goto deadlock;
|
goto deadlock;
|
||||||
|
|
||||||
/* None available, try to steal one or wait for a user to finish */
|
/* 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)
|
if (reg->pin_count)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -386,8 +386,7 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj)
|
||||||
if (obj->fence_reg != I915_FENCE_REG_NONE) {
|
if (obj->fence_reg != I915_FENCE_REG_NONE) {
|
||||||
reg = &dev_priv->fence_regs[obj->fence_reg];
|
reg = &dev_priv->fence_regs[obj->fence_reg];
|
||||||
if (!obj->fence_dirty) {
|
if (!obj->fence_dirty) {
|
||||||
list_move_tail(®->lru_list,
|
list_move_tail(®->link, &dev_priv->mm.fence_list);
|
||||||
&dev_priv->mm.fence_list);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (enable) {
|
} else if (enable) {
|
||||||
|
|
Loading…
Reference in a new issue