linux/include/drm
Jesse Barnes 8e7d2b2c6e drm/i915: allocate large pointer arrays with vmalloc
For awhile now, many of the GEM code paths have allocated page or
object arrays with the slab allocator.  This is nice and fast, but
won't work well if memory is fragmented, since the slab allocator works
with physically contiguous memory (i.e. order > 2 allocations are
likely to fail fairly early after booting and doing some work).

This patch works around the issue by falling back to vmalloc for
>PAGE_SIZE allocations.  This is ugly, but much less work than chaining
a bunch of pages together by hand (suprisingly there's not a bunch of
generic kernel helpers for this yet afaik).  vmalloc space is somewhat
precious on 32 bit kernels, but our allocations shouldn't be big enough
to cause problems, though they're routinely more than a page.

Note that this patch doesn't address the unchecked
alloc-based-on-ioctl-args in GEM; that needs to be fixed in a separate
patch.

Also, I've deliberately ignored the DRM's "area" junk.  I don't think
anyone actually uses it anymore and I'm hoping it gets ripped out soon.

[Updated: removed size arg to new free function.  We could unify the
free functions as well once the DRM mem tracking is ripped out.]

fd.o bug #20152 (part 1/3)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-19 10:07:14 -07:00
..
drm_core.h
drm_crtc_helper.h drm: remove unused "can_grow" parameter from drm_crtc_helper_initial_config 2009-04-03 10:21:44 +10:00
drm_crtc.h drm: detect hdmi monitor by hdmi identifier (v3) 2009-03-29 18:31:49 +10:00
drm_edid.h drm: fix EDID parser problem with positive/negative hsync/vsync 2009-03-11 12:18:48 +10:00
drm_hashtab.h
drm_memory_debug.h
drm_memory.h
drm_mode.h make drm headers use strict integer types 2009-03-26 18:14:18 +01:00
drm_os_linux.h drm: fix missing inline function on 32-bit powerpc. 2009-04-03 09:07:07 +10:00
drm_pciids.h drm/i915: add support for G41 chipset 2009-04-21 17:22:53 -07:00
drm_sarea.h drm: move to kref per-master structures. 2008-12-29 17:47:22 +10:00
drm_sman.h
drm.h make drm headers use strict integer types 2009-03-26 18:14:18 +01:00
drmP.h drm/i915: allocate large pointer arrays with vmalloc 2009-05-19 10:07:14 -07:00
i810_drm.h
i830_drm.h
i915_drm.h drm/i915: Add new GET_PIPE_FROM_CRTC_ID ioctl. 2009-05-14 16:00:32 -07:00
Kbuild DRM: add mode setting support 2008-12-29 17:47:23 +10:00
mga_drm.h make drm headers use strict integer types 2009-03-26 18:14:18 +01:00
r128_drm.h
radeon_drm.h drm: merge Linux master into HEAD 2009-03-28 20:22:18 -04:00
savage_drm.h
sis_drm.h
via_drm.h make drm headers use strict integer types 2009-03-26 18:14:18 +01:00