From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu, 9 Jan 2014 22:57:22 +0000 (+0000)
Subject: drm/i915: Place the Global GTT VM first in the list of VM
X-Git-Tag: firefly_0821_release~176^2~4105^2~62^2~80^2
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f72d21eddfa900bfa2674195dcc0203e18d0cc62;p=firefly-linux-kernel-4.4.55.git

drm/i915: Place the Global GTT VM first in the list of VM

This is useful for debugging as we then know that the first entry is
always the global GTT, and all later entries the per-process GTT VM.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4f54a1323171..03c21792ba3e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4577,7 +4577,7 @@ void i915_init_vm(struct drm_i915_private *dev_priv,
 	INIT_LIST_HEAD(&vm->active_list);
 	INIT_LIST_HEAD(&vm->inactive_list);
 	INIT_LIST_HEAD(&vm->global_link);
-	list_add(&vm->global_link, &dev_priv->vm_list);
+	list_add_tail(&vm->global_link, &dev_priv->vm_list);
 }
 
 void