diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-27 21:21:43 +0100 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2017-03-31 13:39:47 +0300 |
commit | 6c9a8cdad48a04795dbc35ac3370afa3180045ae (patch) | |
tree | 63af6bf314b71588fc6d52fd4a4adbf2482cb078 /drivers/gpu/drm/i915/intel_i2c.c | |
parent | dd68f2ba0720e76c3a5bfa3f639c546f926792f5 (diff) | |
download | blackbird-op-linux-6c9a8cdad48a04795dbc35ac3370afa3180045ae.tar.gz blackbird-op-linux-6c9a8cdad48a04795dbc35ac3370afa3180045ae.zip |
drm/i915: Avoid lock dropping between rescheduling
Unlocking is dangerous. In this case we combine an early update to the
out-of-queue request, because we know that it will be inserted into the
correct FIFO priority-ordered slot when it becomes ready in the future.
However, given sufficient enthusiasm, it may become ready as we are
continuing to reschedule, and so may gazump the FIFO if we have since
dropped its spinlock. The result is that it may be executed too early,
before its dependencies.
v2: Move all work into the second phase over the topological sort. This
removes the shortcut on the out-of-rbtree request to ensure that we only
adjust its priority after adjusting all of its dependencies.
Fixes: 20311bd35060 ("drm/i915/scheduler: Execute requests in order of priorities")
Testcase: igt/gem_exec_whisper
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: <stable@vger.kernel.org> # v4.10+
Link: http://patchwork.freedesktop.org/patch/msgid/20170327202143.7972-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
(cherry picked from commit a79a524e9260d4ffaff88348615e70fb3d393692)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_i2c.c')
0 files changed, 0 insertions, 0 deletions