Skip to content

Commit

Permalink
drm/i915/fbdev: Drain the suspend worker on retiring
Browse files Browse the repository at this point in the history
Since the suspend_work can arm itself if the console_lock() is currently
held elsewhere, simply calling flush_work() doesn't guarantee that the
work is idle upon return. To do so requires using cancel_work_sync().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1468431285-28264-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
  • Loading branch information
Chris Wilson committed Jul 14, 2016
1 parent e7852a4 commit 0b8c0e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ void intel_fbdev_fini(struct drm_device *dev)
if (!ifbdev)
return;

flush_work(&dev_priv->fbdev_suspend_work);
cancel_work_sync(&dev_priv->fbdev_suspend_work);
if (!current_is_async())
intel_fbdev_sync(ifbdev);

Expand Down

0 comments on commit 0b8c0e9

Please sign in to comment.