aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_scheduler.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-02-20 12:36:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-02-20 13:27:36 +0000
commit54738e8ad5a5e5eeab7cc762de022b00bcd9af9f (patch)
tree1cdb46c554ca20841b84eaccee2c8c0833b94471 /drivers/gpu/drm/i915/i915_scheduler.c
parentdrm/i915/gt: Protect signaler walk with RCU (diff)
downloadlinux-dev-54738e8ad5a5e5eeab7cc762de022b00bcd9af9f.tar.xz
linux-dev-54738e8ad5a5e5eeab7cc762de022b00bcd9af9f.zip
drm/i915: Double check bumping after the spinlock
In preparation for making GEM execbuf parallel, we need to be prepared to handle very early declaration of dependencies -- even before our signaler has itself been submitted. References: a79ca656b648 ("drm/i915: Push the wakeref->count deferral to the backend") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200220123608.1666271-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_scheduler.c')
-rw-r--r--drivers/gpu/drm/i915/i915_scheduler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index 59f70b674665..be770f2419b1 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -363,6 +363,9 @@ static void __bump_priority(struct i915_sched_node *node, unsigned int bump)
{
struct i915_sched_attr attr = node->attr;
+ if (attr.priority & bump)
+ return;
+
attr.priority |= bump;
__i915_schedule(node, &attr);
}