linux-stable/drivers/gpu/drm/etnaviv
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
..
cmdstream.xml.h drm/etnaviv: Allow DRAW_INSTANCED commands 2016-12-02 19:30:22 +01:00
common.xml.h drm/etnaviv: update common and state_hi xml.h files 2016-01-26 18:53:55 +01:00
etnaviv_buffer.c drm/etnaviv: wire up iova handling in new cmdbuf abstraction 2017-02-02 10:30:20 +01:00
etnaviv_cmd_parser.c drm/etnaviv: add new GC3000 sensitive states 2017-01-30 12:43:54 +01:00
etnaviv_cmdbuf.c drm/etnaviv: add cmdbuf suballocator 2017-02-02 10:30:37 +01:00
etnaviv_cmdbuf.h drm/etnaviv: add cmdbuf suballocator 2017-02-02 10:30:37 +01:00
etnaviv_drv.c Merge branch 'drm-etnaviv-next' of https://git.pengutronix.de/git/lst/linux into drm-next 2017-02-03 05:41:58 +10:00
etnaviv_drv.h drm/etnaviv: implement dma-buf mmap 2016-12-02 19:30:21 +01:00
etnaviv_dump.c drm/etnaviv: wire up iova handling in new cmdbuf abstraction 2017-02-02 10:30:20 +01:00
etnaviv_dump.h
etnaviv_gem.c mm: use vmf->address instead of of vmf->virtual_address 2016-12-14 16:04:09 -08:00
etnaviv_gem.h drm/etnaviv: fix mmap operations for userptr and dma-buf objects 2016-05-06 10:42:33 +02:00
etnaviv_gem_prime.c drm/etnaviv: fix gem_prime_get_sg_table to return new SG table 2016-12-02 19:30:23 +01:00
etnaviv_gem_submit.c drm/etnaviv: add cmdbuf suballocator 2017-02-02 10:30:37 +01:00
etnaviv_gpu.c drm/etnaviv: add cmdbuf suballocator 2017-02-02 10:30:37 +01:00
etnaviv_gpu.h drm/etnaviv: add cmdbuf suballocator 2017-02-02 10:30:37 +01:00
etnaviv_iommu.c drm/etnaviv: constify etnaviv_iommu_ops structures 2017-02-02 10:29:52 +01:00
etnaviv_iommu.h drm/etnaviv: implement IOMMUv2 translation 2016-09-15 15:29:43 +02:00
etnaviv_iommu_v2.c drm/etnaviv: get cmdbuf physical address through the cmdbuf abstraction 2017-02-02 10:30:27 +01:00
etnaviv_mmu.c drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00
etnaviv_mmu.h drm/etnaviv: add cmdbuf suballocator 2017-02-02 10:30:37 +01:00
Kconfig drm/etnaviv: allow build with COMPILE_TEST 2017-01-27 15:23:47 +01:00
Makefile drm/etnaviv: move cmdbuf de-/allocation into own file 2017-02-02 10:30:15 +01:00
state.xml.h
state_3d.xml.h drm: etnaviv: flush all GPU caches when stopping GPU 2016-03-07 15:36:56 +01:00
state_hi.xml.h drm/etnaviv: handle MMU exception in IRQ handler 2016-09-15 15:29:42 +02:00