[Intel-gfx] [PATCH] drm/i915/selftests: Skip mixed page exhaustion if only small pages available

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 7 11:05:59 UTC 2017


If we only have 4k pages, we can't mix together different combinations
of hugepages to see if the world burns. However, as the loops did
nothing, we never set err to 0 and reported ENODEV aborting the test.
Teach the test to skip instead.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Matthew Auld <matthew.william.auld at gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
 drivers/gpu/drm/i915/selftests/huge_pages.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/huge_pages.c b/drivers/gpu/drm/i915/selftests/huge_pages.c
index 5cc8101bb2b1..a8d3328b8b64 100644
--- a/drivers/gpu/drm/i915/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/selftests/huge_pages.c
@@ -1156,8 +1156,11 @@ static int igt_ppgtt_exhaust_huge(void *arg)
 	struct drm_i915_gem_object *obj;
 	unsigned int size_mask;
 	unsigned int page_mask;
-	int n, i;
 	int err = -ENODEV;
+	int n, i;
+
+	if (supported == I915_GTT_PAGE_SIZE_4K)
+		return 0;
 
 	/*
 	 * Sanity check creating objects with a varying mix of page sizes --
-- 
2.15.0



More information about the Intel-gfx mailing list