Commit 244a07c4 authored by Mario Limonciello (AMD)'s avatar Mario Limonciello (AMD) Committed by Alex Deucher
Browse files

drm/amd: Resume the device in thaw() callback when console suspend is disabled

If console suspend has been disabled using `no_console_suspend` also
wake up during thaw() so that some messages can be seen for debugging.

Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/4191


Signed-off-by: default avatarMario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 63387cbb)
parent 8f0b4cce
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <drm/drm_vblank.h>

#include <linux/cc_platform.h>
#include <linux/console.h>
#include <linux/dynamic_debug.h>
#include <linux/module.h>
#include <linux/mmu_notifier.h>
@@ -2704,7 +2705,9 @@ static int amdgpu_pmops_thaw(struct device *dev)
	struct drm_device *drm_dev = dev_get_drvdata(dev);

	/* do not resume device if it's normal hibernation */
	if (!pm_hibernate_is_recovering() && !pm_hibernation_mode_is_suspend())
	if (console_suspend_enabled &&
	    !pm_hibernate_is_recovering() &&
	    !pm_hibernation_mode_is_suspend())
		return 0;

	return amdgpu_device_resume(drm_dev, true);