drm/i915/selftests: Use NOWARN for large allocations
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Nov 2017 12:06:00 +0000 (12:06 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Nov 2017 12:15:39 +0000 (12:15 +0000)
We may try to do a large kmalloc for the permutation array, falling back
to a smaller array/test if the first allocation fails. Since we are
intentionally trying a large allocation which may fail, pass __GFP_NOWARN.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103842
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171122120600.27025-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
drivers/gpu/drm/i915/selftests/i915_random.c

index b85872cc7fbe0ff5ec7503b09bb9956f160a9954..2088ae57aa899184e611b219bda5202d68b51d51 100644 (file)
@@ -57,7 +57,7 @@ unsigned int *i915_random_order(unsigned int count, struct rnd_state *state)
 {
        unsigned int *order, i;
 
-       order = kmalloc_array(count, sizeof(*order), GFP_KERNEL);
+       order = kmalloc_array(count, sizeof(*order), GFP_KERNEL | __GFP_NOWARN);
        if (!order)
                return order;