diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-11-21 17:50:55 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-11-28 15:39:35 +1000 |
commit | 0b2fe6594fa2c54c080a89d563eb16ea7b4c4a29 (patch) | |
tree | 49d2b86fe63c043452bf79e2e45b2f98aee6bb34 /drivers/gpu/drm/nouveau | |
parent | 81280d0e24e76c35f40f997af26c779bcb10b04d (diff) | |
download | talos-op-linux-0b2fe6594fa2c54c080a89d563eb16ea7b4c4a29.tar.gz talos-op-linux-0b2fe6594fa2c54c080a89d563eb16ea7b4c4a29.zip |
drm/nouveau: Queue hpd_work on (runtime) resume
We need to call drm_helper_hpd_irq_event() on resume to properly detect
monitor connection / disconnection on some laptops, use hpd_work for
this to avoid deadlocks.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 9876e6fcfcf0..064a925ed69a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -699,7 +699,12 @@ nouveau_pmops_resume(struct device *dev) return ret; pci_set_master(pdev); - return nouveau_do_resume(drm_dev, false); + ret = nouveau_do_resume(drm_dev, false); + + /* Monitors may have been connected / disconnected during suspend */ + schedule_work(&nouveau_drm(drm_dev)->hpd_work); + + return ret; } static int @@ -773,6 +778,10 @@ nouveau_pmops_runtime_resume(struct device *dev) nvif_mask(&device->object, 0x088488, (1 << 25), (1 << 25)); vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_ON); drm_dev->switch_power_state = DRM_SWITCH_POWER_ON; + + /* Monitors may have been connected / disconnected during suspend */ + schedule_work(&nouveau_drm(drm_dev)->hpd_work); + return ret; } |