From 08b221ab0a19073e0e4cf88a093ad8f5c8302e96 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Sat, 14 Jan 2017 21:52:30 +0200 Subject: [PATCH] drm/nouveau: Start poll as the last thing on resume To avoid race condition when we have pending delayed event waiting to be handled. Signed-off-by: Peter Ujfalusi --- drivers/gpu/drm/nouveau/nouveau_drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 59348fc41c77..1e5340bae7db 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -773,7 +773,6 @@ nouveau_pmops_runtime_resume(struct device *dev) pci_set_master(pdev); ret = nouveau_do_resume(drm_dev, true); - drm_kms_helper_poll_enable(drm_dev); /* do magic */ nvif_mask(&device->object, 0x088488, (1 << 25), (1 << 25)); vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_ON); @@ -782,6 +781,9 @@ nouveau_pmops_runtime_resume(struct device *dev) /* Monitors may have been connected / disconnected during suspend */ schedule_work(&nouveau_drm(drm_dev)->hpd_work); + /* Enable poll */ + drm_kms_helper_poll_enable(drm_dev); + return ret; } -- 2.11.0