As we use the global workqueue for delayed tasks, such as enabling FBC, we need to be sure that they have finished executing before we unload the module and remove their code pages.
Signed-off-by: Chris Wilson <[email protected]> --- Right, as Jesse hinted, since we add a task to the global workqueue and only asynchronously cancel it, we need to be sure that it has indeed finished executing before we unload the module. This is a delta patch that can be applied on top of the delayed FBC enable path. --- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7395e8a..cfa9b61 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8038,6 +8038,9 @@ void intel_modeset_cleanup(struct drm_device *dev) drm_irq_uninstall(dev); cancel_work_sync(&dev_priv->hotplug_work); + /* flush any delayed tasks or pending work */ + flush_scheduled_work(); + /* Shut off idle work before the crtcs get freed. */ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { intel_crtc = to_intel_crtc(crtc); -- 1.7.5.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
