linux/include/drm
Pauli Nieminen 1403b1a38e drm/ttm: add pool wc/uc page allocator V3
On AGP system we might allocate/free routinely uncached or wc memory,
changing page from cached (wb) to uc or wc is very expensive and involves
a lot of flushing. To improve performance this allocator use a pool
of uc,wc pages.

Pools are protected with spinlocks to allow multiple threads to allocate pages
simultanously. Expensive operations are done outside of spinlock to maximize
concurrency.

Pools are linked lists of pages that were recently freed. mm shrink callback
allows kernel to claim back pages when they are required for something else.

Fixes:
* set_pages_array_wb handles highmem pages so we don't have to remove them
  from pool.
* Add count parameter to ttm_put_pages to avoid looping in free code.
* Change looping from _safe to normal in pool fill error path.
* Initialize sum variable and make the loop prettier in get_num_unused_pages.

* Moved pages_freed reseting inside the loop in ttm_page_pool_free.
* Add warning comment about spinlock context in ttm_page_pool_free.

Based on Jerome Glisse's and Dave Airlie's pool allocator.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06 11:35:26 +10:00
..
i2c drm/nouveau: Add DRM driver for NVIDIA GPUs 2009-12-11 21:29:34 +10:00
ttm drm/ttm: add pool wc/uc page allocator V3 2010-04-06 11:35:26 +10:00
Kbuild Merge remote branch 'korg/drm-vmware-staging' into drm-core-next 2009-12-18 09:53:50 +10:00
drm.h Merge remote branch 'anholt/drm-intel-next' into drm-linus 2009-12-08 14:03:47 +10:00
drmP.h drm/ttm: use drm calloc large and free large 2010-03-15 10:31:43 +10:00
drm_buffer.h drm: Add generic multipart buffer. 2010-02-23 09:46:20 +10:00
drm_cache.h drm/ttm: consolidate cache flushing code in one place. 2009-08-27 09:53:47 +10:00
drm_core.h
drm_crtc.h drm/radeon/kms: add support for hardcoded edids in rom (v2) 2010-02-09 09:31:20 +10:00
drm_crtc_helper.h drm/fb: add setcmap and fix 8-bit support. 2009-10-05 10:00:59 +10:00
drm_dp_helper.h drm/radeon/kms: add support for DP modesetting 2009-12-08 10:22:44 +10:00
drm_edid.h drm/radeon/kms: add support for hardcoded edids in rom (v2) 2010-02-09 09:31:20 +10:00
drm_encoder_slave.h drm/kms: no need to return void value (encoder) 2009-08-19 16:06:49 +10:00
drm_fb_helper.h drm/fb: add more correct 8/16/24/32 bpp fb support. 2009-10-06 13:54:01 +10:00
drm_hashtab.h drm: include kernel list header file in hashtab header 2009-06-12 15:56:34 +10:00
drm_mem_util.h drm/ttm: use drm calloc large and free large 2010-03-15 10:31:43 +10:00
drm_memory.h includecheck fix: include/drm, drm_memory.h 2009-09-20 16:02:58 +05:30
drm_mm.h drm: Add memory manager debug function 2009-12-10 15:28:06 +10:00
drm_mode.h drm/kms: Remove incorrect comment in struct drm_mode_modeinfo 2010-02-01 11:26:39 +10:00
drm_os_linux.h drm/i915: add i915_lp_ring_sync helper 2009-11-05 14:47:07 -08:00
drm_pciids.h drm/radeon: add new RS880 pci id 2010-03-15 09:22:12 +10:00
drm_sarea.h drm: move to kref per-master structures. 2008-12-29 17:47:22 +10:00
drm_sman.h
drm_sysfs.h drm: Enable drm drivers to add drm sysfs devices. 2009-08-19 16:08:51 +10:00
i810_drm.h
i830_drm.h
i915_drm.h drm/i915: execbuf2 support 2010-01-06 09:39:39 -08:00
mga_drm.h drm: Add compatibility #ifdefs for *BSD 2009-12-04 08:59:28 +10:00
nouveau_drm.h drm/nouveau: new gem pushbuf interface, bump to 0.0.16 2010-02-25 15:08:44 +10:00
r128_drm.h
radeon_drm.h drm/radeon/kms: add support for square microtiles on r3xx-r5xx 2010-02-25 11:36:12 +10:00
savage_drm.h
sis_drm.h
via_drm.h drm: Add compatibility #ifdefs for *BSD 2009-12-04 08:59:28 +10:00
vmwgfx_drm.h drm/vmwgfx: Drop scanout flag compat and add execbuf ioctl parameter members. Bumps major. 2010-02-11 12:03:26 +10:00