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

Commit a93f344d authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

drm/radeon/kms: reorder display resume to avoid problems



On resume, we were attemping to unblank the displays before the
timing and plls had be reprogrammed which led to atom timeouts
waiting for things that are not yet programmed.  Re-program
the mode first, then reset the dpms state.

This fixes the infamous atombios timeouts on resume.

Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 86f5c9ed
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
	case DRM_MODE_DPMS_SUSPEND:
	case DRM_MODE_DPMS_OFF:
		drm_vblank_pre_modeset(dev, radeon_crtc->crtc_id);
		if (radeon_crtc->enabled)
			atombios_blank_crtc(crtc, ATOM_ENABLE);
		if (ASIC_IS_DCE3(rdev))
			atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
+4 −5
Original line number Diff line number Diff line
@@ -910,11 +910,6 @@ int radeon_resume_kms(struct drm_device *dev)
	radeon_pm_resume(rdev);
	radeon_restore_bios_scratch_regs(rdev);

	/* turn on display hw */
	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
		drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
	}

	radeon_fbdev_set_suspend(rdev, 0);
	release_console_sem();

@@ -922,6 +917,10 @@ int radeon_resume_kms(struct drm_device *dev)
	radeon_hpd_init(rdev);
	/* blat the mode back in */
	drm_helper_resume_force_mode(dev);
	/* turn on display hw */
	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
		drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
	}
	return 0;
}