Skip to contentSkip to conversation

drm/i915: Rename vma->*_list to *_link for consistency

PATCH In review Tvrtko Ursulin 2 participants 5 messages Feb 26, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: Rename vma->*_list to *_link for consistency

From: Chris Wilson <[email protected]>

Elsewhere we have adopted the convention of using '_link' to denote elements in the list (and '_list' for the actual list_head itself), and that the name should indicate which list the link belongs to (and preferrably not just where the link is being stored).

s/vma_link/obj_link/ (we iterate over obj->vma_list) s/mm_list/vm_link/ (we iterate over vm->[in]active_list)

---
 drivers/gpu/drm/i915/i915_debugfs.c      | 17 +++++------
 drivers/gpu/drm/i915/i915_gem.c          | 50 ++++++++++++++++----------------
 drivers/gpu/drm/i915/i915_gem_context.c  |  2 +-
 drivers/gpu/drm/i915/i915_gem_evict.c    |  6 ++--
 drivers/gpu/drm/i915/i915_gem_gtt.c      | 10 +++----
 drivers/gpu/drm/i915/i915_gem_gtt.h      |  4 +--
 drivers/gpu/drm/i915/i915_gem_shrinker.c |  4 +--
 drivers/gpu/drm/i915/i915_gem_stolen.c   |  2 +-
 drivers/gpu/drm/i915/i915_gem_userptr.c  |  2 +-
 drivers/gpu/drm/i915/i915_gpu_error.c    |  8 ++---
 10 files changed, 52 insertions(+), 53 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +8 -9
index 9e19cf0e7075..d7f03bceea57 100644
@@ -117,9 +117,8 @@ static u64 i915_gem_obj_total_ggtt_size(struct drm_i915_gem_object *obj)
 	u64 size = 0;
 	struct i915_vma *vma;
 
-	list_for_each_entry(vma, &obj->vma_list, vma_link) {
-		if (i915_is_ggtt(vma->vm) &&
-		    drm_mm_node_allocated(&vma->node))
+	list_for_each_entry(vma, &obj->vma_list, obj_link) {
+		if (i915_is_ggtt(vma->vm) && drm_mm_node_allocated(&vma->node))
 			size += vma->node.size;
 	}
 
@@ -155,7 +154,7 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 		   obj->madv == I915_MADV_DONTNEED ? " purgeable" : "");
 	if (obj->base.name)
 		seq_printf(m, " (name: %d)", obj->base.name);
-	list_for_each_entry(vma, &obj->vma_list, vma_link) {
+	list_for_each_entry(vma, &obj->vma_list, obj_link) {
 		if (vma->pin_count > 0)
 			pin_count++;
 	}
@@ -164,7 +163,7 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 		seq_printf(m, " (display)");
 	if (obj->fence_reg != I915_FENCE_REG_NONE)
 		seq_printf(m, " (fence: %d)", obj->fence_reg);
-	list_for_each_entry(vma, &obj->vma_list, vma_link) {
+	list_for_each_entry(vma, &obj->vma_list, obj_link) {
 		seq_printf(m, " (%sgtt offset: %08llx, size: %08llx",
 			   i915_is_ggtt(vma->vm) ? "g" : "pp",
 			   vma->node.start, vma->node.size);
@@ -230,7 +229,7 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
 	}
 
 	total_obj_size = total_gtt_size = count = 0;
-	list_for_each_entry(vma, head, mm_list) {
+	list_for_each_entry(vma, head, vm_link) {
 		seq_printf(m, "   ");
 		describe_obj(m, vma->obj);
 		seq_printf(m, "\n");
@@ -342,7 +341,7 @@ static int per_file_stats(int id, void *ptr, void *data)
 		stats->shared += obj->base.size;
 
 	if (USES_FULL_PPGTT(obj->base.dev)) {
-		list_for_each_entry(vma, &obj->vma_list, vma_link) {
+		list_for_each_entry(vma, &obj->vma_list, obj_link) {
 			struct i915_hw_ppgtt *ppgtt;
 
 			if (!drm_mm_node_allocated(&vma->node))
@@ -454,12 +453,12 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
 		   count, mappable_count, size, mappable_size);
 
 	size = count = mappable_size = mappable_count = 0;
-	count_vmas(&vm->active_list, mm_list);
+	count_vmas(&vm->active_list, vm_link);
 	seq_printf(m, "  %u [%u] active objects, %llu [%llu] bytes\n",
 		   count, mappable_count, size, mappable_size);
 
 	size = count = mappable_size = mappable_count = 0;
-	count_vmas(&vm->inactive_list, mm_list);
+	count_vmas(&vm->inactive_list, vm_link);
 	seq_printf(m, "  %u [%u] inactive objects, %llu [%llu] bytes\n",
 		   count, mappable_count, size, mappable_size);
 
drivers/gpu/drm/i915/i915_gem.c +25 -25

184 lines not on this page · raw message

drivers/gpu/drm/i915/i915_gem_context.c +1 -1
index 4be2ce917f54..5dd84e148bba 100644
@@ -142,7 +142,7 @@ static void i915_gem_context_clean(struct intel_context *ctx)
 		return;
 
 	list_for_each_entry_safe(vma, next, &ppgtt->base.inactive_list,
-				 mm_list) {
+				 vm_link) {
 		if (WARN_ON(__i915_vma_unbind_no_wait(vma)))
 			break;
 	}
drivers/gpu/drm/i915/i915_gem_evict.c +3 -3
index 07c6e4d320c9..ea1f8d1bd228 100644
@@ -116,7 +116,7 @@ i915_gem_evict_something(struct drm_device *dev, struct i915_address_space *vm,
 
 search_again:
 	/* First see if there is a large enough contiguous idle region... */
-	list_for_each_entry(vma, &vm->inactive_list, mm_list) {
+	list_for_each_entry(vma, &vm->inactive_list, vm_link) {
 		if (mark_free(vma, &unwind_list))
 			goto found;
 	}
@@ -125,7 +125,7 @@ search_again:
 		goto none;
 
 	/* Now merge in the soon-to-be-expired objects... */
-	list_for_each_entry(vma, &vm->active_list, mm_list) {
+	list_for_each_entry(vma, &vm->active_list, vm_link) {
 		if (mark_free(vma, &unwind_list))
 			goto found;
 	}
@@ -270,7 +270,7 @@ int i915_gem_evict_vm(struct i915_address_space *vm, bool do_idle)
 		WARN_ON(!list_empty(&vm->active_list));
 	}
 
-	list_for_each_entry_safe(vma, next, &vm->inactive_list, mm_list)
+	list_for_each_entry_safe(vma, next, &vm->inactive_list, vm_link)
 		if (vma->pin_count == 0)
 			WARN_ON(i915_vma_unbind(vma));
 
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -5
index 9127f8f3561c..68d3af6854d1 100644
@@ -2758,7 +2758,7 @@ static int i915_gem_setup_global_gtt(struct drm_device *dev,
 		}
 		vma->bound |= GLOBAL_BIND;
 		__i915_vma_set_map_and_fenceable(vma);
-		list_add_tail(&vma->mm_list, &ggtt_vm->inactive_list);
+		list_add_tail(&vma->vm_link, &ggtt_vm->inactive_list);
 	}
 
 	/* Clear any non-preallocated blocks */
@@ -3258,7 +3258,7 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
 	vm = &dev_priv->gtt.base;
 	list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
 		flush = false;
-		list_for_each_entry(vma, &obj->vma_list, vma_link) {
+		list_for_each_entry(vma, &obj->vma_list, obj_link) {
 			if (vma->vm != vm)
 				continue;
 
@@ -3314,8 +3314,8 @@ __i915_gem_vma_create(struct drm_i915_gem_object *obj,
 	if (vma == NULL)
 		return ERR_PTR(-ENOMEM);
 
-	INIT_LIST_HEAD(&vma->vma_link);
-	INIT_LIST_HEAD(&vma->mm_list);
+	INIT_LIST_HEAD(&vma->vm_link);
+	INIT_LIST_HEAD(&vma->obj_link);
 	INIT_LIST_HEAD(&vma->exec_list);
 	vma->vm = vm;
 	vma->obj = obj;
@@ -3323,7 +3323,7 @@ __i915_gem_vma_create(struct drm_i915_gem_object *obj,
 	if (i915_is_ggtt(vm))
 		vma->ggtt_view = *ggtt_view;
 
-	list_add_tail(&vma->vma_link, &obj->vma_list);
+	list_add_tail(&vma->obj_link, &obj->vma_list);
 	if (!i915_is_ggtt(vm))
 		i915_ppgtt_get(i915_vm_to_ppgtt(vm));
 
drivers/gpu/drm/i915/i915_gem_gtt.h +2 -2
index 368d111aa9c5..31eb0b261fbf 100644
@@ -194,9 +194,9 @@ struct i915_vma {
 	struct i915_ggtt_view ggtt_view;
 
 	/** This object's place on the active/inactive lists */
-	struct list_head mm_list;
+	struct list_head vm_link;
 
-	struct list_head vma_link; /* Link in the object's VMA list */
+	struct list_head obj_link; /* Link in the object's VMA list */
 
 	/** This vma's place in the batchbuffer or on the eviction list */
 	struct list_head exec_list;
drivers/gpu/drm/i915/i915_gem_shrinker.c +2 -2
index 58c1e592bbdb..d3c473ffb90a 100644
@@ -52,7 +52,7 @@ static int num_vma_bound(struct drm_i915_gem_object *obj)
 	struct i915_vma *vma;
 	int count = 0;
 
-	list_for_each_entry(vma, &obj->vma_list, vma_link) {
+	list_for_each_entry(vma, &obj->vma_list, obj_link) {
 		if (drm_mm_node_allocated(&vma->node))
 			count++;
 		if (vma->pin_count)
@@ -176,7 +176,7 @@ i915_gem_shrink(struct drm_i915_private *dev_priv,
 
 			/* For the unbound phase, this should be a no-op! */
 			list_for_each_entry_safe(vma, v,
-						 &obj->vma_list, vma_link)
+						 &obj->vma_list, obj_link)
 				if (i915_vma_unbind(vma))
 					break;
 
drivers/gpu/drm/i915/i915_gem_stolen.c +1 -1
index feec0f80d8ef..2e6e9fb6f80d 100644
@@ -697,7 +697,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
 
 		vma->bound |= GLOBAL_BIND;
 		__i915_vma_set_map_and_fenceable(vma);
-		list_add_tail(&vma->mm_list, &ggtt->inactive_list);
+		list_add_tail(&vma->vm_link, &ggtt->inactive_list);
 	}
 
 	list_add_tail(&obj->global_list, &dev_priv->mm.bound_list);
drivers/gpu/drm/i915/i915_gem_userptr.c +1 -1
index 7107f2fd38f5..4b09c840d493 100644
@@ -78,7 +78,7 @@ static void cancel_userptr(struct work_struct *work)
 		was_interruptible = dev_priv->mm.interruptible;
 		dev_priv->mm.interruptible = false;
 
-		list_for_each_entry_safe(vma, tmp, &obj->vma_list, vma_link) {
+		list_for_each_entry_safe(vma, tmp, &obj->vma_list, obj_link) {
 			int ret = i915_vma_unbind(vma);
 			WARN_ON(ret && ret != -EIO);
 		}
drivers/gpu/drm/i915/i915_gpu_error.c +4 -4
index 978c026963b8..831895b8cb75 100644
@@ -736,7 +736,7 @@ static u32 capture_active_bo(struct drm_i915_error_buffer *err,
 	struct i915_vma *vma;
 	int i = 0;
 
-	list_for_each_entry(vma, head, mm_list) {
+	list_for_each_entry(vma, head, vm_link) {
 		capture_bo(err++, vma);
 		if (++i == count)
 			break;
@@ -759,7 +759,7 @@ static u32 capture_pinned_bo(struct drm_i915_error_buffer *err,
 		if (err == last)
 			break;
 
-		list_for_each_entry(vma, &obj->vma_list, vma_link)
+		list_for_each_entry(vma, &obj->vma_list, obj_link)
 			if (vma->vm == vm && vma->pin_count > 0)
 				capture_bo(err++, vma);
 	}
@@ -1127,12 +1127,12 @@ static void i915_gem_capture_vm(struct drm_i915_private *dev_priv,
 	int i;
 
 	i = 0;
-	list_for_each_entry(vma, &vm->active_list, mm_list)
+	list_for_each_entry(vma, &vm->active_list, vm_link)
 		i++;
 	error->active_bo_count[ndx] = i;
 
 	list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
-		list_for_each_entry(vma, &obj->vma_list, vma_link)
+		list_for_each_entry(vma, &obj->vma_list, obj_link)
 			if (vma->vm == vm && vma->pin_count > 0)
 				i++;
 	}
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 drm/i915: Reduce the pointer dance of i915_is_ggtt()

From: Chris Wilson <[email protected]>

The multiple levels of indirect do nothing but hinder the compiler and the pointer chasing turns to be quite painful but painless to fix.

---
 drivers/gpu/drm/i915/i915_debugfs.c        | 13 ++++++-------
 drivers/gpu/drm/i915/i915_drv.h            |  7 -------
 drivers/gpu/drm/i915/i915_gem.c            | 18 +++++++-----------
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  5 ++---
 drivers/gpu/drm/i915/i915_gem_gtt.c        | 12 +++++-------
 drivers/gpu/drm/i915/i915_gem_gtt.h        |  5 +++++
 drivers/gpu/drm/i915/i915_trace.h          | 27 ++++++++-------------------
 7 files changed, 33 insertions(+), 54 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +6 -7
index d7f03bceea57..a0f1bd711b53 100644
@@ -118,7 +118,7 @@ static u64 i915_gem_obj_total_ggtt_size(struct drm_i915_gem_object *obj)
 	struct i915_vma *vma;
 
 	list_for_each_entry(vma, &obj->vma_list, obj_link) {
-		if (i915_is_ggtt(vma->vm) && drm_mm_node_allocated(&vma->node))
+		if (vma->is_ggtt && drm_mm_node_allocated(&vma->node))
 			size += vma->node.size;
 	}
 
@@ -165,12 +165,11 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 		seq_printf(m, " (fence: %d)", obj->fence_reg);
 	list_for_each_entry(vma, &obj->vma_list, obj_link) {
 		seq_printf(m, " (%sgtt offset: %08llx, size: %08llx",
-			   i915_is_ggtt(vma->vm) ? "g" : "pp",
+			   vma->is_ggtt ? "g" : "pp",
 			   vma->node.start, vma->node.size);
-		if (i915_is_ggtt(vma->vm))
-			seq_printf(m, ", type: %u)", vma->ggtt_view.type);
-		else
-			seq_puts(m, ")");
+		if (vma->is_ggtt)
+			seq_printf(m, ", type: %u", vma->ggtt_view.type);
+		seq_puts(m, ")");
 	}
 	if (obj->stolen)
 		seq_printf(m, " (stolen: %08llx)", obj->stolen->start);
@@ -347,7 +346,7 @@ static int per_file_stats(int id, void *ptr, void *data)
 			if (!drm_mm_node_allocated(&vma->node))
 				continue;
 
-			if (i915_is_ggtt(vma->vm)) {
+			if (vma->is_ggtt) {
 				stats->global += obj->base.size;
 				continue;
 			}
drivers/gpu/drm/i915/i915_drv.h +0 -7
index 9e76bfc7d5ab..a4dcb744bfe8 100644
@@ -3156,18 +3156,11 @@ bool i915_gem_obj_is_pinned(struct drm_i915_gem_object *obj);
 /* Some GGTT VM helpers */
 #define i915_obj_to_ggtt(obj) \
 	(&((struct drm_i915_private *)(obj)->base.dev->dev_private)->gtt.base)
-static inline bool i915_is_ggtt(struct i915_address_space *vm)
-{
-	struct i915_address_space *ggtt =
-		&((struct drm_i915_private *)(vm)->dev->dev_private)->gtt.base;
-	return vm == ggtt;
-}
 
 static inline struct i915_hw_ppgtt *
 i915_vm_to_ppgtt(struct i915_address_space *vm)
 {
 	WARN_ON(i915_is_ggtt(vm));
-
 	return container_of(vm, struct i915_hw_ppgtt, base);
 }
 
drivers/gpu/drm/i915/i915_gem.c +7 -11
index bcd2e481d014..3d31d3ac589e 100644
@@ -3336,8 +3336,7 @@ static int __i915_vma_unbind(struct i915_vma *vma, bool wait)
 			return ret;
 	}
 
-	if (i915_is_ggtt(vma->vm) &&
-	    vma->ggtt_view.type == I915_GGTT_VIEW_NORMAL) {
+	if (vma->is_ggtt && vma->ggtt_view.type == I915_GGTT_VIEW_NORMAL) {
 		i915_gem_object_finish_gtt(obj);
 
 		/* release the fence reg _after_ flushing */
@@ -3352,7 +3351,7 @@ static int __i915_vma_unbind(struct i915_vma *vma, bool wait)
 	vma->bound = 0;
 
 	list_del_init(&vma->vm_link);
-	if (i915_is_ggtt(vma->vm)) {
+	if (vma->is_ggtt) {
 		if (vma->ggtt_view.type == I915_GGTT_VIEW_NORMAL) {
 			obj->map_and_fenceable = false;
 		} else if (vma->ggtt_view.pages) {
@@ -4639,17 +4638,14 @@ struct i915_vma *i915_gem_obj_to_ggtt_view(struct drm_i915_gem_object *obj,
 
 void i915_gem_vma_destroy(struct i915_vma *vma)
 {
-	struct i915_address_space *vm = NULL;
 	WARN_ON(vma->node.allocated);
 
 	/* Keep the vma as a placeholder in the execbuffer reservation lists */
 	if (!list_empty(&vma->exec_list))
 		return;
 
-	vm = vma->vm;
-
-	if (!i915_is_ggtt(vm))
-		i915_ppgtt_put(i915_vm_to_ppgtt(vm));
+	if (!vma->is_ggtt)
+		i915_ppgtt_put(i915_vm_to_ppgtt(vma->vm));
 
 	list_del(&vma->obj_link);
 
@@ -5202,7 +5198,7 @@ u64 i915_gem_obj_offset(struct drm_i915_gem_object *o,
 	WARN_ON(vm == &dev_priv->mm.aliasing_ppgtt->base);
 
 	list_for_each_entry(vma, &o->vma_list, obj_link) {
-		if (i915_is_ggtt(vma->vm) &&
+		if (vma->is_ggtt &&
 		    vma->ggtt_view.type != I915_GGTT_VIEW_NORMAL)
 			continue;
 		if (vma->vm == vm)
@@ -5235,7 +5231,7 @@ bool i915_gem_obj_bound(struct drm_i915_gem_object *o,
 	struct i915_vma *vma;
 
 	list_for_each_entry(vma, &o->vma_list, obj_link) {
-		if (i915_is_ggtt(vma->vm) &&
+		if (vma->is_ggtt &&
 		    vma->ggtt_view.type != I915_GGTT_VIEW_NORMAL)
 			continue;
 		if (vma->vm == vm && drm_mm_node_allocated(&vma->node))
@@ -5282,7 +5278,7 @@ unsigned long i915_gem_obj_size(struct drm_i915_gem_object *o,
 	BUG_ON(list_empty(&o->vma_list));
 
 	list_for_each_entry(vma, &o->vma_list, obj_link) {
-		if (i915_is_ggtt(vma->vm) &&
+		if (vma->is_ggtt &&
 		    vma->ggtt_view.type != I915_GGTT_VIEW_NORMAL)
 			continue;
 		if (vma->vm == vm)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +2 -3
index 8fd00d279447..1328bc5021b4 100644
@@ -668,7 +668,7 @@ need_reloc_mappable(struct i915_vma *vma)
 	if (entry->relocation_count == 0)
 		return false;
 
-	if (!i915_is_ggtt(vma->vm))
+	if (!vma->is_ggtt)
 		return false;
 
 	/* See also use_cpu_reloc() */
@@ -687,8 +687,7 @@ eb_vma_misplaced(struct i915_vma *vma)
 	struct drm_i915_gem_exec_object2 *entry = vma->exec_entry;
 	struct drm_i915_gem_object *obj = vma->obj;
 
-	WARN_ON(entry->flags & __EXEC_OBJECT_NEEDS_MAP &&
-	       !i915_is_ggtt(vma->vm));
+	WARN_ON(entry->flags & __EXEC_OBJECT_NEEDS_MAP && !vma->is_ggtt);
 
 	if (entry->alignment &&
 	    vma->node.start & (entry->alignment - 1))
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -7
index 68d3af6854d1..49e4f26b79d8 100644
@@ -3198,6 +3198,7 @@ int i915_gem_gtt_init(struct drm_device *dev)
 	}
 
 	gtt->base.dev = dev;
+	gtt->base.is_ggtt = true;
 
 	ret = gtt->gtt_probe(dev, &gtt->base.total, &gtt->stolen_size,
 			     &gtt->mappable_base, &gtt->mappable_end);
@@ -3319,13 +3320,14 @@ __i915_gem_vma_create(struct drm_i915_gem_object *obj,
 	INIT_LIST_HEAD(&vma->exec_list);
 	vma->vm = vm;
 	vma->obj = obj;
+	vma->is_ggtt = i915_is_ggtt(vm);
 
 	if (i915_is_ggtt(vm))
 		vma->ggtt_view = *ggtt_view;
+	else
+		i915_ppgtt_get(i915_vm_to_ppgtt(vm));
 
 	list_add_tail(&vma->obj_link, &obj->vma_list);
-	if (!i915_is_ggtt(vm))
-		i915_ppgtt_get(i915_vm_to_ppgtt(vm));
 
 	return vma;
 }
@@ -3598,13 +3600,9 @@ int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
 		return 0;
 
 	if (vma->bound == 0 && vma->vm->allocate_va_range) {
-		trace_i915_va_alloc(vma->vm,
-				    vma->node.start,
-				    vma->node.size,
-				    VM_TO_TRACE_NAME(vma->vm));
-
 		/* XXX: i915_vma_pin() will fix this +- hack */
 		vma->pin_count++;
+		trace_i915_va_alloc(vma);
 		ret = vma->vm->allocate_va_range(vma->vm,
 						 vma->node.start,
 						 vma->node.size);
drivers/gpu/drm/i915/i915_gem_gtt.h +5 -0
index 31eb0b261fbf..8774f1ba46e7 100644
@@ -183,6 +183,7 @@ struct i915_vma {
 #define GLOBAL_BIND	(1<<0)
 #define LOCAL_BIND	(1<<1)
 	unsigned int bound : 4;
+	bool is_ggtt : 1;
 
 	/**
 	 * Support different GGTT views into the same object.
@@ -275,6 +276,8 @@ struct i915_address_space {
 	u64 start;		/* Start offset always 0 for dri2 */
 	u64 total;		/* size addr space maps (ex. 2GB for ggtt) */
 
+	bool is_ggtt;
+
 	struct i915_page_scratch *scratch_page;
 	struct i915_page_table *scratch_pt;
 	struct i915_page_directory *scratch_pd;
@@ -330,6 +333,8 @@ struct i915_address_space {
 			u32 flags);
 };
 
+#define i915_is_ggtt(V) ((V)->is_ggtt)
+
 /* The Graphics Translation Table is the way in which GEN hardware translates a
  * Graphics Virtual Address into a Physical Address. In addition to the normal
  * collateral associated with any va->pa translations GEN hardware also has a
drivers/gpu/drm/i915/i915_trace.h +8 -19
index 52b2d409945d..fa09e5581137 100644
@@ -175,35 +175,24 @@ TRACE_EVENT(i915_vma_unbind,
 		      __entry->obj, __entry->offset, __entry->size, __entry->vm)
 );
 
-#define VM_TO_TRACE_NAME(vm) \
-	(i915_is_ggtt(vm) ? "G" : \
-		      "P")
-
-DECLARE_EVENT_CLASS(i915_va,
-	TP_PROTO(struct i915_address_space *vm, u64 start, u64 length, const char *name),
-	TP_ARGS(vm, start, length, name),
+TRACE_EVENT(i915_va_alloc,
+	TP_PROTO(struct i915_vma *vma),
+	TP_ARGS(vma),
 
 	TP_STRUCT__entry(
 		__field(struct i915_address_space *, vm)
 		__field(u64, start)
 		__field(u64, end)
-		__string(name, name)
 	),
 
 	TP_fast_assign(
-		__entry->vm = vm;
-		__entry->start = start;
-		__entry->end = start + length - 1;
-		__assign_str(name, name);
+		__entry->vm = vma->vm;
+		__entry->start = vma->node.start;
+		__entry->end = vma->node.start + vma->node.size - 1;
 	),
 
-	TP_printk("vm=%p (%s), 0x%llx-0x%llx",
-		  __entry->vm, __get_str(name),  __entry->start, __entry->end)
-);
-
-DEFINE_EVENT(i915_va, i915_va_alloc,
-	     TP_PROTO(struct i915_address_space *vm, u64 start, u64 length, const char *name),
-	     TP_ARGS(vm, start, length, name)
+	TP_printk("vm=%p (%c), 0x%llx-0x%llx",
+		  __entry->vm, i915_is_ggtt(__entry->vm) ? 'G' : 'P',  __entry->start, __entry->end)
 );
 
 DECLARE_EVENT_CLASS(i915_px_entry,
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Rename vma->*_list to *_link for consistency

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915: Rename vma->*_list to *_link for consistency
URL : https://patchwork.freedesktop.org/series/3844/
State : failure

== Summary ==

Series 3844v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/3844/revisions/1/mbox/

Test drv_hangman:

        Subgroup error-state-basic:
                pass       -> FAIL       (ilk-hp8440p)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (hsw-gt2)
Test kms_force_connector_basic:
        Subgroup force-edid:
                pass       -> SKIP       (ilk-hp8440p)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                pass       -> DMESG-WARN (skl-i7k-2) UNSTABLE
        Subgroup suspend-read-crc-pipe-b:
                pass       -> SKIP       (hsw-gt2)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (skl-i7k-2) UNSTABLE
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                dmesg-warn -> PASS       (byt-nuc)
        Subgroup basic-rte:
                fail       -> PASS       (bdw-nuci7)
                fail       -> PASS       (bdw-ultra)
bdw-nuci7        total:165  pass:154  dwarn:0   dfail:0   fail:0   skip:11 
bdw-ultra        total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14 
bsw-nuc-2        total:168  pass:137  dwarn:0   dfail:0   fail:1   skip:30 
byt-nuc          total:168  pass:143  dwarn:0   dfail:0   fail:0   skip:25 
hsw-brixbox      total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14 
hsw-gt2          total:168  pass:155  dwarn:0   dfail:1   fail:1   skip:11 
ilk-hp8440p      total:168  pass:115  dwarn:1   dfail:1   fail:1   skip:50 
ivb-t430s        total:168  pass:153  dwarn:0   dfail:0   fail:1   skip:14 
skl-i7k-2        total:168  pass:151  dwarn:1   dfail:0   fail:0   skip:16 
snb-dellxps      total:168  pass:145  dwarn:0   dfail:0   fail:1   skip:22 
snb-x220t        total:168  pass:145  dwarn:0   dfail:0   fail:2   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1481/

38f0cd5314ecb02d15d019631e388d3642275600 drm-intel-nightly: 2016y-02m-25d-15h-33m-53s UTC integration manifest bd7970fbebc10e807e7d3d99fafec0729bf1907a drm/i915: Reduce the pointer dance of i915_is_ggtt() 04b7dad1ec23e0bcfc77ce1970d8e6dc9260017a drm/i915: Rename vma->*_list to *_link for consistency

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Rename vma->*_list to *_link for consistency

Quoted 6 lines · Patchwork

== Series Details ==

Series: series starting with [1/2] drm/i915: Rename vma->*_list to *_link for consistency
URL : https://patchwork.freedesktop.org/series/3844/
State : failure

Quoted 8 lines

== Summary ==

Series 3844v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/3844/revisions/1/mbox/

Test drv_hangman:

         Subgroup error-state-basic:
                 pass       -> FAIL       (ilk-hp8440p)

Seen before but not filed until now?

https://bugs.freedesktop.org/show_bug.cgi?id=94305

Quoted 3 lines

Test kms_flip:

         Subgroup basic-flip-vs-dpms:
                 pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE

Existing unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=93787

Quoted 2 lines
         Subgroup basic-flip-vs-wf_vblank:
                 pass       -> FAIL       (hsw-gt2)

Existing unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=94294

Quoted 6 lines

Test kms_force_connector_basic:

         Subgroup force-edid:
                 pass       -> SKIP       (ilk-hp8440p)
Test kms_pipe_crc_basic:
         Subgroup suspend-read-crc-pipe-a:
                 pass       -> DMESG-WARN (skl-i7k-2) UNSTABLE

Existing unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=93294

Quoted 23 lines
         Subgroup suspend-read-crc-pipe-b:
                 pass       -> SKIP       (hsw-gt2)
         Subgroup suspend-read-crc-pipe-c:
                 dmesg-warn -> PASS       (skl-i7k-2) UNSTABLE
Test pm_rpm:
         Subgroup basic-pci-d3-state:
                 dmesg-warn -> PASS       (byt-nuc)
         Subgroup basic-rte:
                 fail       -> PASS       (bdw-nuci7)
                 fail       -> PASS       (bdw-ultra)
bdw-nuci7        total:165  pass:154  dwarn:0   dfail:0   fail:0   skip:11
bdw-ultra        total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14
bsw-nuc-2        total:168  pass:137  dwarn:0   dfail:0   fail:1   skip:30
byt-nuc          total:168  pass:143  dwarn:0   dfail:0   fail:0   skip:25
hsw-brixbox      total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14
hsw-gt2          total:168  pass:155  dwarn:0   dfail:1   fail:1   skip:11
ilk-hp8440p      total:168  pass:115  dwarn:1   dfail:1   fail:1   skip:50
ivb-t430s        total:168  pass:153  dwarn:0   dfail:0   fail:1   skip:14
skl-i7k-2        total:168  pass:151  dwarn:1   dfail:0   fail:0   skip:16
snb-dellxps      total:168  pass:145  dwarn:0   dfail:0   fail:1   skip:22
snb-x220t        total:168  pass:145  dwarn:0   dfail:0   fail:2   skip:21
Quoted 7 lines

Results at /archive/results/CI_IGT_test/Patchwork_1481/

38f0cd5314ecb02d15d019631e388d3642275600 drm-intel-nightly: 2016y-02m-25d-15h-33m-53s UTC integration manifest bd7970fbebc10e807e7d3d99fafec0729bf1907a drm/i915: Reduce the pointer dance of i915_is_ggtt() 04b7dad1ec23e0bcfc77ce1970d8e6dc9260017a drm/i915: Rename vma->*_list to *_link for consistency

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author Applied
#4 lore raw

Re: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Rename vma->*_list to *_link for consistency

Quoted 34 lines · Tvrtko Ursulin
Quoted 7 lines · Patchwork

== Series Details ==

Series: series starting with [1/2] drm/i915: Rename vma->*_list to *_link for consistency
URL : https://patchwork.freedesktop.org/series/3844/
State : failure

Quoted 8 lines

== Summary ==

Series 3844v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/3844/revisions/1/mbox/

Test drv_hangman:

         Subgroup error-state-basic:
                 pass       -> FAIL       (ilk-hp8440p)

Seen before but not filed until now?

https://bugs.freedesktop.org/show_bug.cgi?id=94305

Quoted 3 lines

Test kms_flip:

         Subgroup basic-flip-vs-dpms:
                 pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE

Existing unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=93787

Quoted 2 lines
         Subgroup basic-flip-vs-wf_vblank:
                 pass       -> FAIL       (hsw-gt2)

Existing unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=94294

Quoted 51 lines
Quoted 6 lines

Test kms_force_connector_basic:

         Subgroup force-edid:
                 pass       -> SKIP       (ilk-hp8440p)
Test kms_pipe_crc_basic:
         Subgroup suspend-read-crc-pipe-a:
                 pass       -> DMESG-WARN (skl-i7k-2) UNSTABLE

Existing unrelated: https://bugs.freedesktop.org/show_bug.cgi?id=93294

Quoted 42 lines
         Subgroup suspend-read-crc-pipe-b:
                 pass       -> SKIP       (hsw-gt2)
         Subgroup suspend-read-crc-pipe-c:
                 dmesg-warn -> PASS       (skl-i7k-2) UNSTABLE
Test pm_rpm:
         Subgroup basic-pci-d3-state:
                 dmesg-warn -> PASS       (byt-nuc)
         Subgroup basic-rte:
                 fail       -> PASS       (bdw-nuci7)
                 fail       -> PASS       (bdw-ultra)

bdw-nuci7 total:165 pass:154 dwarn:0 dfail:0 fail:0
skip:11
bdw-ultra total:168 pass:154 dwarn:0 dfail:0 fail:0
skip:14
bsw-nuc-2 total:168 pass:137 dwarn:0 dfail:0 fail:1
skip:30
byt-nuc total:168 pass:143 dwarn:0 dfail:0 fail:0
skip:25
hsw-brixbox total:168 pass:154 dwarn:0 dfail:0 fail:0
skip:14
hsw-gt2 total:168 pass:155 dwarn:0 dfail:1 fail:1
skip:11
ilk-hp8440p total:168 pass:115 dwarn:1 dfail:1 fail:1
skip:50
ivb-t430s total:168 pass:153 dwarn:0 dfail:0 fail:1
skip:14
skl-i7k-2 total:168 pass:151 dwarn:1 dfail:0 fail:0
skip:16
snb-dellxps total:168 pass:145 dwarn:0 dfail:0 fail:1
skip:22
snb-x220t total:168 pass:145 dwarn:0 dfail:0 fail:2
skip:21

Results at /archive/results/CI_IGT_test/Patchwork_1481/

38f0cd5314ecb02d15d019631e388d3642275600 drm-intel-nightly:
2016y-02m-25d-15h-33m-53s UTC integration manifest bd7970fbebc10e807e7d3d99fafec0729bf1907a drm/i915: Reduce the pointer dance of i915_is_ggtt() 04b7dad1ec23e0bcfc77ce1970d8e6dc9260017a drm/i915: Rename vma->*_list to *_link for consistency

Merged, thanks for the patches.

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx