Skip to content

Commit

Permalink
drm/nouveau: fix oops on runtime suspend/resume
Browse files Browse the repository at this point in the history
if we have no crtcs we need to not call the display resume code.

Reported-by: Tobias Klausmann <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
airlied committed Sep 10, 2013
1 parent 4801685 commit 0117277
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/gpu/drm/nouveau/nouveau_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,8 @@ int nouveau_pmops_resume(struct device *dev)
nouveau_fbcon_set_suspend(drm_dev, 0);

nouveau_fbcon_zfill_all(drm_dev);
nouveau_display_resume(drm_dev);
if (drm_dev->mode_config.num_crtc)
nouveau_display_resume(drm_dev);
nv_suspend_set_printk_level(NV_DBG_DEBUG);
return 0;
}
Expand Down Expand Up @@ -671,7 +672,8 @@ static int nouveau_pmops_thaw(struct device *dev)
if (drm_dev->mode_config.num_crtc)
nouveau_fbcon_set_suspend(drm_dev, 0);
nouveau_fbcon_zfill_all(drm_dev);
nouveau_display_resume(drm_dev);
if (drm_dev->mode_config.num_crtc)
nouveau_display_resume(drm_dev);
nv_suspend_set_printk_level(NV_DBG_DEBUG);
return 0;
}
Expand Down Expand Up @@ -906,7 +908,8 @@ static int nouveau_pmops_runtime_resume(struct device *dev)
pci_set_master(pdev);

ret = nouveau_do_resume(drm_dev);
nouveau_display_resume(drm_dev);
if (drm_dev->mode_config.num_crtc)
nouveau_display_resume(drm_dev);
drm_kms_helper_poll_enable(drm_dev);
/* do magic */
nv_mask(device, 0x88488, (1 << 25), (1 << 25));
Expand Down

0 comments on commit 0117277

Please sign in to comment.