drm: replace drm_[cm]alloc* by kvmalloc alternatives
authorMichal Hocko <mhocko@suse.com>
Wed, 17 May 2017 06:55:08 +0000 (08:55 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 18 May 2017 15:10:23 +0000 (17:10 +0200)
commitc4f51dc8729645f755ee59b5a2535b6f567b4b05
treebd78f4e0f60ae8dd262131215b6c10e05e87e511
parentb12f601fe5f0e0cf37c4efd00c41a033dff67664
drm: replace drm_[cm]alloc* by kvmalloc alternatives

drm_[cm]alloc* has grown their own kvmalloc with vmalloc fallback
implementations. MM has grown kvmalloc* helpers in the meantime. Let's
use those because it a) reduces the code and b) MM has a better idea
how to implement fallbacks (e.g. do not vmalloc before kmalloc is tried
with __GFP_NORETRY).

drm_calloc_large needs to get __GFP_ZERO explicitly but it is the same
thing as kvmalloc_array in principle.

Signed-off-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170517065509.18659-1-mhocko@kernel.org
include/drm/drm_mem_util.h [deleted file]