drm/i915: Wait until the intel_wakeref idle callback is complete
When waiting for idle, serialise with any ongoing callback so that it will have completed before completing the wait. 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/20191118230254.2615942-12-chris@chris-wilson.co.uk
This commit is contained in:
@@ -109,8 +109,17 @@ void __intel_wakeref_init(struct intel_wakeref *wf,
|
||||
|
||||
int intel_wakeref_wait_for_idle(struct intel_wakeref *wf)
|
||||
{
|
||||
return wait_var_event_killable(&wf->wakeref,
|
||||
!intel_wakeref_is_active(wf));
|
||||
int err;
|
||||
|
||||
might_sleep();
|
||||
|
||||
err = wait_var_event_killable(&wf->wakeref,
|
||||
!intel_wakeref_is_active(wf));
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
intel_wakeref_unlock_wait(wf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void wakeref_auto_timeout(struct timer_list *t)
|
||||
|
Reference in New Issue
Block a user