All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: use correct node for handling cache domain eviction
@ 2017-03-03 18:03 Matthew Auld
  2017-03-03 18:03 ` [PATCH 2/2] drm/i915/selftests: exercise " Matthew Auld
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Matthew Auld @ 2017-03-03 18:03 UTC (permalink / raw)
  To: intel-gfx

It looks like we were incorrectly comparing vma->node against itself
instead of the target node, when evicting for a node on systems where we
need guard pages between regions with different cache domains. As a
consequence we can end up trying to needlessly evict neighbouring nodes,
even if they have the same cache domain, and if they were pinned we
would fail the eviction.

Fixes: 625d988acc28 ("drm/i915: Extract reserving space in the GTT to a helper")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_evict.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index a0de5734f7d0..2da3a94fc9f3 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -299,12 +299,12 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,
 		 * those as well to make room for our guard pages.
 		 */
 		if (check_color) {
-			if (vma->node.start + vma->node.size == node->start) {
-				if (vma->node.color == node->color)
+			if (node->start + node->size == target->start) {
+				if (node->color == target->color)
 					continue;
 			}
-			if (vma->node.start == node->start + node->size) {
-				if (vma->node.color == node->color)
+			if (node->start == target->start + target->size) {
+				if (node->color == target->color)
 					continue;
 			}
 		}
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-06 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-03 18:03 [PATCH 1/2] drm/i915: use correct node for handling cache domain eviction Matthew Auld
2017-03-03 18:03 ` [PATCH 2/2] drm/i915/selftests: exercise " Matthew Auld
2017-03-03 18:28   ` Chris Wilson
2017-03-03 18:18 ` [PATCH 1/2] drm/i915: use correct node for handling " Chris Wilson
2017-03-06 18:34   ` Joonas Lahtinen
2017-03-03 18:48 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.