Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01172772 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie
Browse files

drm/nouveau: fix oops on runtime suspend/resume



if we have no crtcs we need to not call the display resume code.

Reported-by: default avatarTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 48016851
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -636,6 +636,7 @@ int nouveau_pmops_resume(struct device *dev)
		nouveau_fbcon_set_suspend(drm_dev, 0);

	nouveau_fbcon_zfill_all(drm_dev);
	if (drm_dev->mode_config.num_crtc)
		nouveau_display_resume(drm_dev);
	nv_suspend_set_printk_level(NV_DBG_DEBUG);
	return 0;
@@ -671,6 +672,7 @@ 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);
	if (drm_dev->mode_config.num_crtc)
		nouveau_display_resume(drm_dev);
	nv_suspend_set_printk_level(NV_DBG_DEBUG);
	return 0;
@@ -906,6 +908,7 @@ static int nouveau_pmops_runtime_resume(struct device *dev)
	pci_set_master(pdev);

	ret = nouveau_do_resume(drm_dev);
	if (drm_dev->mode_config.num_crtc)
		nouveau_display_resume(drm_dev);
	drm_kms_helper_poll_enable(drm_dev);
	/* do magic */