Re: [Intel-gfx] [PATCH] drm/i915: Unify global_list into global_link

2016-11-02 Thread Chris Wilson
On Wed, Nov 02, 2016 at 12:16:04PM +0200, Joonas Lahtinen wrote:
> $ sed -i -r 's/\bglobal_list\b/global_link/g' *.c *.h
> 
> Cc: Chris Wilson 
> Signed-off-by: Joonas Lahtinen 

Ok, I keep trying to find a better name than global_*, but it falls into
the "when we fix the shrinker" category.

Reviewed-by: Chris Wilson 
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Unify global_list into global_link

2016-11-02 Thread Joonas Lahtinen
$ sed -i -r 's/\bglobal_list\b/global_link/g' *.c *.h

Cc: Chris Wilson 
Signed-off-by: Joonas Lahtinen 
---
 drivers/gpu/drm/i915/i915_debugfs.c  | 10 +-
 drivers/gpu/drm/i915/i915_drv.h  |  2 +-
 drivers/gpu/drm/i915/i915_gem.c  | 12 ++--
 drivers/gpu/drm/i915/i915_gem_gtt.c  |  4 ++--
 drivers/gpu/drm/i915/i915_gem_shrinker.c | 16 
 drivers/gpu/drm/i915/i915_gem_stolen.c   |  2 +-
 6 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index a13ff47..bc9c0cd 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -217,7 +217,7 @@ static int i915_gem_stolen_list_info(struct seq_file *m, 
void *data)
return ret;
 
total_obj_size = total_gtt_size = count = 0;
-   list_for_each_entry(obj, _priv->mm.bound_list, global_list) {
+   list_for_each_entry(obj, _priv->mm.bound_list, global_link) {
if (obj->stolen == NULL)
continue;
 
@@ -227,7 +227,7 @@ static int i915_gem_stolen_list_info(struct seq_file *m, 
void *data)
total_gtt_size += i915_gem_obj_total_ggtt_size(obj);
count++;
}
-   list_for_each_entry(obj, _priv->mm.unbound_list, global_list) {
+   list_for_each_entry(obj, _priv->mm.unbound_list, global_link) {
if (obj->stolen == NULL)
continue;
 
@@ -390,7 +390,7 @@ static int i915_gem_object_info(struct seq_file *m, void 
*data)
size = count = 0;
mapped_size = mapped_count = 0;
purgeable_size = purgeable_count = 0;
-   list_for_each_entry(obj, _priv->mm.unbound_list, global_list) {
+   list_for_each_entry(obj, _priv->mm.unbound_list, global_link) {
size += obj->base.size;
++count;
 
@@ -407,7 +407,7 @@ static int i915_gem_object_info(struct seq_file *m, void 
*data)
seq_printf(m, "%u unbound objects, %llu bytes\n", count, size);
 
size = count = dpy_size = dpy_count = 0;
-   list_for_each_entry(obj, _priv->mm.bound_list, global_list) {
+   list_for_each_entry(obj, _priv->mm.bound_list, global_link) {
size += obj->base.size;
++count;
 
@@ -493,7 +493,7 @@ static int i915_gem_gtt_info(struct seq_file *m, void *data)
return ret;
 
total_obj_size = total_gtt_size = count = 0;
-   list_for_each_entry(obj, _priv->mm.bound_list, global_list) {
+   list_for_each_entry(obj, _priv->mm.bound_list, global_link) {
if (show_pin_display_only && !obj->pin_display)
continue;
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d868979..eaa01da 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2235,7 +2235,7 @@ struct drm_i915_gem_object {
 
/** Stolen memory for this object, instead of being backed by shmem. */
struct drm_mm_node *stolen;
-   struct list_head global_list;
+   struct list_head global_link;
union {
struct rcu_head rcu;
struct llist_node freed;
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a97fdfa..5839beb 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1446,7 +1446,7 @@ static void i915_gem_object_bump_inactive_ggtt(struct 
drm_i915_gem_object *obj)
 
i915 = to_i915(obj->base.dev);
list = obj->bind_count ? >mm.bound_list : >mm.unbound_list;
-   list_move_tail(>global_list, list);
+   list_move_tail(>global_link, list);
 }
 
 /**
@@ -2967,7 +2967,7 @@ int i915_vma_unbind(struct i915_vma *vma)
/* Since the unbound list is global, only move to that list if
 * no more VMAs exist. */
if (--obj->bind_count == 0)
-   list_move_tail(>global_list,
+   list_move_tail(>global_link,
   _i915(obj->base.dev)->mm.unbound_list);
 
/* And finally now the object is completely decoupled from this vma,
@@ -3164,7 +3164,7 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 
alignment, u64 flags)
}
GEM_BUG_ON(!i915_gem_valid_gtt_space(vma, obj->cache_level));
 
-   list_move_tail(>global_list, _priv->mm.bound_list);
+   list_move_tail(>global_link, _priv->mm.bound_list);
list_move_tail(>vm_link, >vm->inactive_list);
obj->bind_count++;
 
@@ -4125,7 +4125,7 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
 {
mutex_init(>mm.lock);
 
-   INIT_LIST_HEAD(>global_list);
+   INIT_LIST_HEAD(>global_link);
INIT_LIST_HEAD(>userfault_link);
INIT_LIST_HEAD(>obj_exec_link);
INIT_LIST_HEAD(>vma_list);
@@ -4272,7 +4272,7 @@ static void