linux/drivers/gpu/drm/armada
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
..
armada_510.c drm/armada: update Armada 510 (Dove) to use "ext_ref_clk1" as the clock 2014-07-11 15:40:14 +01:00
armada_crtc.c drm: Replace 'format->format' comparisons to just 'format' comparisons 2016-12-15 14:55:34 +02:00
armada_crtc.h drm/armada: use common helper for plane base address 2016-11-01 20:06:55 +00:00
armada_debugfs.c drm/armada: s/drm_mm_dump_table/drm_mm_print/ 2016-12-30 17:35:13 +01:00
armada_drm.h drm/armada: de-midlayer armada 2016-11-17 00:02:50 +00:00
armada_drv.c drm: Deduplicate driver initialization message 2016-12-30 12:37:39 +01:00
armada_fb.c drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() 2016-12-15 14:03:30 +02:00
armada_fb.h drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
armada_fbdev.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
armada_gem.c drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00
armada_gem.h drm: Remove unused drm_device from drm_gem_object_lookup() 2016-05-17 08:47:30 +02:00
armada_hw.h
armada_ioctlP.h
armada_overlay.c drm: Nuke fb->pixel_format 2016-12-15 14:55:34 +02:00
armada_trace.c drm/armada: add tracing support 2016-11-01 20:06:54 +00:00
armada_trace.h drm/armada: add tracing support 2016-11-01 20:06:54 +00:00
Kconfig drm: add more MMU dependencies 2017-01-11 17:24:58 +01:00
Makefile drm/armada: Fix compile fail 2016-12-30 17:47:04 +01:00