drm/i915: Allow for different modes of interruptible i915_active_wait
Allow some users the discretion to not immediately return on a normal signal. Hopefully, they will opt to use TASK_KILLABLE instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200327112212.16046-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -496,7 +496,7 @@ static int flush_lazy_signals(struct i915_active *ref)
|
||||
return err;
|
||||
}
|
||||
|
||||
int i915_active_wait(struct i915_active *ref)
|
||||
int __i915_active_wait(struct i915_active *ref, int state)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -511,7 +511,9 @@ int i915_active_wait(struct i915_active *ref)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
|
||||
if (!i915_active_is_idle(ref) &&
|
||||
___wait_var_event(ref, i915_active_is_idle(ref),
|
||||
state, 0, 0, schedule()))
|
||||
return -EINTR;
|
||||
|
||||
flush_work(&ref->work);
|
||||
|
Reference in New Issue
Block a user