aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-06-29 08:53:20 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-07-11 14:38:45 +0100
commit655250a8d1aa3b18949a72869858d07ceac12799 (patch)
treebf8fc60a9d4b678ca1d11fb8bed90d3e3c087072 /drivers/gpu/drm/i915/intel_ringbuffer.h
parentdrm/i915/selftests: Add a safety net to live_workarounds (diff)
downloadlinux-dev-655250a8d1aa3b18949a72869858d07ceac12799.tar.xz
linux-dev-655250a8d1aa3b18949a72869858d07ceac12799.zip
drm/i915/execlists: Switch to rb_root_cached
The kernel recently gained an augmented rbtree with the purpose of cacheing the leftmost element of the rbtree, a frequent optimisation to avoid calls to rb_first() which is also employed by the execlists->queue. Switch from our open-coded cache to the library. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180629075348.27358-9-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index ce6cc2a6cf7a..d1eee08e5f6b 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -292,12 +292,7 @@ struct intel_engine_execlists {
/**
* @queue: queue of requests, in priority lists
*/
- struct rb_root queue;
-
- /**
- * @first: leftmost level in priority @queue
- */
- struct rb_node *first;
+ struct rb_root_cached queue;
/**
* @csb_read: control register for Context Switch buffer