diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index b28e563..db84bfc 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1412,3 +1412,8 @@ static struct slow_work_ops output_status_change_ops = { .execute = output_status_change_execute, }; +void drm_fb_helper_cancel_poll(struct drm_fb_helper *fb_helper) +{ + delayed_slow_work_cancel(&fb_helper->output_status_change_slow_work); +} +EXPORT_SYMBOL(drm_fb_helper_cancel_poll); diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index c6079e3..834ca36 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -161,6 +161,9 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state) if (pm_state.event == PM_EVENT_PRETHAW) return 0; + /* cancel poll slow work thread */ + nouveau_fbcon_cancel_poll(dev); + NV_INFO(dev, "Disabling fbcon acceleration...\n"); nouveau_fbcon_save_disable_accel(dev); diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index f29fa8c..f367ea5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -486,3 +486,9 @@ void nouveau_fbcon_zfill_all(struct drm_device *dev) struct drm_nouveau_private *dev_priv = dev->dev_private; nouveau_fbcon_zfill(dev, dev_priv->nfbdev); } + +void nouveau_fbcon_cancel_poll(struct drm_device *dev) +{ + struct drm_nouveau_private *dev_priv = dev->dev_private; + drm_fb_helper_cancel_poll(&dev_priv->nfbdev->helper); +} diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h index bf8e00d..df52f5a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h @@ -59,5 +59,6 @@ void nouveau_fbcon_save_disable_accel(struct drm_device *dev); void nouveau_fbcon_restore_accel(struct drm_device *dev); void nouveau_fbcon_hotplug(struct drm_device *dev); +void nouveau_fbcon_cancel_poll(struct drm_device *dev); #endif /* __NV50_FBCON_H__ */ diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index 9b55a94..59b5d2d 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -136,4 +136,5 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel); int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); void drm_helper_fb_hpd_irq_event(struct drm_fb_helper *fb_helper); +void drm_fb_helper_cancel_poll(struct drm_fb_helper *fb_helper); #endif