aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-04-03 11:51:24 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-04-04 11:03:33 +0100
commitb1becb88268beb72df6495e35d3d76c138d215bb (patch)
tree96842133a2630ea8d862733a2c4e2768e55f16c7 /drivers/gpu/drm
parentdrm/i915: Remove user-triggerable WARN from i915_gem_object_create (diff)
downloadlinux-dev-b1becb88268beb72df6495e35d3d76c138d215bb.tar.xz
linux-dev-b1becb88268beb72df6495e35d3d76c138d215bb.zip
drm/i915: Park the signaler before sleeping
If the signal to park arrives before we sleep, then we need to check kthread_should_park() before sleeping to avoid missing the signal. Otherwise, if the signal arrives whilst we are processing completed requests, we will reset the current->state back to TASK_INTERRUPTIBLE and so miss the wakeup. Fixes: fe3288b5da2c ("drm/i915: Park the breadcrumbs signaler across a GPU reset") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403105124.8969-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_breadcrumbs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index b6ea192ad550..308c56a021ab 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -629,6 +629,9 @@ static int intel_breadcrumbs_signaler(void *arg)
} else {
DEFINE_WAIT(exec);
+ if (kthread_should_park())
+ kthread_parkme();
+
if (kthread_should_stop()) {
GEM_BUG_ON(request);
break;
@@ -641,9 +644,6 @@ static int intel_breadcrumbs_signaler(void *arg)
if (request)
remove_wait_queue(&request->execute, &exec);
-
- if (kthread_should_park())
- kthread_parkme();
}
i915_gem_request_put(request);
} while (1);