OpenCloudOS-Kernel/drivers/gpu/drm/vc4
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
..
Kconfig drm/vc4: Add DSI driver 2017-02-01 12:51:23 -08:00
Makefile drm/vc4: Add DSI driver 2017-02-01 12:51:23 -08:00
vc4_bo.c drm/vc4: mark vc4_bo_cache_purge() static 2016-09-09 12:21:43 -07:00
vc4_crtc.c drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00
vc4_debugfs.c drm/vc4: Add DSI driver 2017-02-01 12:51:23 -08:00
vc4_dpi.c drm/vc4: Disallow interlaced modes on DPI. 2016-08-19 19:05:43 -07:00
vc4_drv.c drm/vc4: Add DSI driver 2017-02-01 12:51:23 -08:00
vc4_drv.h drm/vc4: Add DSI driver 2017-02-01 12:51:23 -08:00
vc4_dsi.c drm/vc4: Add DSI driver 2017-02-01 12:51:23 -08:00
vc4_gem.c drm/vc4: Use runtime autosuspend to avoid thrashing V3D power state. 2016-11-04 16:12:35 -07:00
vc4_hdmi.c drm/edid: Set AVI infoframe Q even when QS=0 2017-01-26 18:37:13 +02:00
vc4_hvs.c drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00
vc4_irq.c drm/vc4: Fix overflow mem unreferencing when the binner runs dry. 2016-08-19 19:17:34 -07:00
vc4_kms.c drm: Rely on mode_config data for fb_helper initialization 2017-02-02 19:12:00 +01:00
vc4_packet.h drm/vc4: Add support for drawing 3D frames. 2015-12-07 20:05:10 -08:00
vc4_plane.c drm: Improve drm_mm search (and fix topdown allocation) with rbtrees 2017-02-03 11:10:32 +01:00
vc4_qpu_defines.h drm/vc4: Fix definition of QPU_R_MS_REV_FLAGS 2016-07-15 15:19:52 -07:00
vc4_regs.h drm/vc4: Add support for feeding DSI encoders from the pixel valve. 2017-02-01 12:51:22 -08:00
vc4_render_cl.c drm/vc4: Fix races when the CS reads from render targets. 2016-10-06 11:53:50 -07:00
vc4_trace.h drm/vc4: Add support for drawing 3D frames. 2015-12-07 20:05:10 -08:00
vc4_trace_points.c drm/vc4: Add support for drawing 3D frames. 2015-12-07 20:05:10 -08:00
vc4_v3d.c drm/vc4: Use runtime autosuspend to avoid thrashing V3D power state. 2016-11-04 16:12:35 -07:00
vc4_validate.c drm/vc4: Add fragment shader threading support 2016-11-16 13:25:26 -08:00
vc4_validate_shaders.c drm/vc4: Add fragment shader threading support 2016-11-16 13:25:26 -08:00
vc4_vec.c drm/vc4: Add support for the VEC (Video Encoder) IP 2016-12-09 15:26:31 -08:00