linux_dsm_epyc7002/drivers/gpu/drm/ttm
Chris Wilson 4e64e5539d drm: Improve drm_mm search (and fix topdown allocation) with rbtrees
The drm_mm range manager claimed to support top-down insertion, but it
was neither searching for the top-most hole that could fit the
allocation request nor fitting the request to the hole correctly.

In order to search the range efficiently, we create a secondary index
for the holes using either their size or their address. This index
allows us to find the smallest hole or the hole at the bottom or top of
the range efficiently, whilst keeping the hole stack to rapidly service
evictions.

v2: Search for holes both high and low. Rename flags to mode.
v3: Discover rb_entry_safe() and use it!
v4: Kerneldoc for enum drm_mm_insert_mode.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com> # vmwgfx
Reviewed-by: Lucas Stach <l.stach@pengutronix.de> #etnaviv
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170202210438.28702-1-chris@chris-wilson.co.uk
2017-02-03 11:10:32 +01:00
..
Makefile drm/ttm: Remove TTM_HAS_AGP 2016-03-30 17:20:43 +02:00
ttm_agp_backend.c drm/ttm: Remove TTM_HAS_AGP 2016-03-30 17:20:43 +02:00
ttm_bo_manager.c drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00
ttm_bo_util.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
ttm_bo_vm.c mm: use vmf->address instead of of vmf->virtual_address 2016-12-14 16:04:09 -08:00
ttm_bo.c Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-02-01 08:39:35 +10:00
ttm_execbuf_util.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
ttm_lock.c drm/ttm: Fixed a read/write lock imbalance 2015-11-26 15:47:38 +01:00
ttm_memory.c drm/ttm: Add interface to export kernel_zone max memory size in ttm 2016-08-08 11:33:08 -04:00
ttm_module.c drm/ttm: make device_released static 2014-07-22 12:59:32 +10:00
ttm_object.c dma-buf: cleanup dma_buf_export() to make it easily extensible 2015-04-21 14:47:16 +05:30
ttm_page_alloc_dma.c drm/ttm: remove cpu_address member from ttm_tt 2016-09-16 15:53:05 -04:00
ttm_page_alloc.c drm/ttm: Remove TTM_HAS_AGP 2016-03-30 17:20:43 +02:00
ttm_tt.c drm/ttm: remove cpu_address member from ttm_tt 2016-09-16 15:53:05 -04:00