aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2013-09-08 17:30:56 -0400
committerDave Airlie <airlied@redhat.com>2013-09-09 22:38:53 -0400
commit01172772c7c973debf5b4881fcb9463891ea97ec (patch)
tree8ead82f4ea9a512130f49a13541c71b979f0e49c /drivers/gpu
parent48016851c89fcb1e9ea4daa7ace142e95f7875fe (diff)
drm/nouveau: fix oops on runtime suspend/resume
if we have no crtcs we need to not call the display resume code. Reported-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 8863644024b7..e893c5362402 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -636,7 +636,8 @@ int nouveau_pmops_resume(struct device *dev)
636 nouveau_fbcon_set_suspend(drm_dev, 0); 636 nouveau_fbcon_set_suspend(drm_dev, 0);
637 637
638 nouveau_fbcon_zfill_all(drm_dev); 638 nouveau_fbcon_zfill_all(drm_dev);
639 nouveau_display_resume(drm_dev); 639 if (drm_dev->mode_config.num_crtc)
640 nouveau_display_resume(drm_dev);
640 nv_suspend_set_printk_level(NV_DBG_DEBUG); 641 nv_suspend_set_printk_level(NV_DBG_DEBUG);
641 return 0; 642 return 0;
642} 643}
@@ -671,7 +672,8 @@ static int nouveau_pmops_thaw(struct device *dev)
671 if (drm_dev->mode_config.num_crtc) 672 if (drm_dev->mode_config.num_crtc)
672 nouveau_fbcon_set_suspend(drm_dev, 0); 673 nouveau_fbcon_set_suspend(drm_dev, 0);
673 nouveau_fbcon_zfill_all(drm_dev); 674 nouveau_fbcon_zfill_all(drm_dev);
674 nouveau_display_resume(drm_dev); 675 if (drm_dev->mode_config.num_crtc)
676 nouveau_display_resume(drm_dev);
675 nv_suspend_set_printk_level(NV_DBG_DEBUG); 677 nv_suspend_set_printk_level(NV_DBG_DEBUG);
676 return 0; 678 return 0;
677} 679}
@@ -906,7 +908,8 @@ static int nouveau_pmops_runtime_resume(struct device *dev)
906 pci_set_master(pdev); 908 pci_set_master(pdev);
907 909
908 ret = nouveau_do_resume(drm_dev); 910 ret = nouveau_do_resume(drm_dev);
909 nouveau_display_resume(drm_dev); 911 if (drm_dev->mode_config.num_crtc)
912 nouveau_display_resume(drm_dev);
910 drm_kms_helper_poll_enable(drm_dev); 913 drm_kms_helper_poll_enable(drm_dev);
911 /* do magic */ 914 /* do magic */
912 nv_mask(device, 0x88488, (1 << 25), (1 << 25)); 915 nv_mask(device, 0x88488, (1 << 25), (1 << 25));