drm/i915: Use the right mapping_gfp_mask for final shmem allocation
authorChris Wilson <[email protected]>
Wed, 5 Apr 2017 22:15:14 +0000 (23:15 +0100)
committerChris Wilson <[email protected]>
Thu, 6 Apr 2017 12:02:02 +0000 (13:02 +0100)
commitb268d9fe0f10544f5f7a1b7015e2b97075e6215d
tree6d243e8295866393e31423cc8332822b83abae82
parent97f55ca5b6625bb4ddeca7b1272b53ca04ab3cf0
drm/i915: Use the right mapping_gfp_mask for final shmem allocation

Many sightings report the greater prevalence of allocation failures.
This is all due to the incorrect use of mapping_gfp_constraint(), so
remove it in favour of just querying the mapping_gfp_mask() which are
the exact gfp_t we wanted in the first place.

We still do expect a higher chance of reporting ENOMEM, as that is the
intention of using __GFP_NORETRY -- to fail rather than oom after having
reclaimed from our bo caches, and having done a direct|kswapd reclaim
pass.

Reported-by: Jason Ekstrand <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100594
Fixes: 24f8e00a8a2e ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Joonas Lahtinen <[email protected]>
drivers/gpu/drm/i915/i915_gem.c