Commit 7c5609b7 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/smu: Handle S0ix for vangogh

Fix the flows for S0ix.  There is no need to stop
rlc or reintialize PMFW in S0ix.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659


Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Reported-by: default avatarAntheas Kapenekakis <lkml@antheas.dev>
Tested-by: default avatarAntheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit fd39b5a5)
Cc: <stable@vger.kernel.org> # c81f5ceb: drm/amdgpu: Drop PMFW RLC notifier from amdgpu_device_suspend()
Cc: <stable@vger.kernel.org>
parent c81f5ceb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2040,6 +2040,12 @@ static int smu_disable_dpms(struct smu_context *smu)
	    smu->is_apu && (amdgpu_in_reset(adev) || adev->in_s0ix))
		return 0;

	/* vangogh s0ix */
	if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
	     amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2)) &&
	    adev->in_s0ix)
		return 0;

	/*
	 * For gpu reset, runpm and hibernation through BACO,
	 * BACO feature has to be kept enabled.
+3 −0
Original line number Diff line number Diff line
@@ -2217,6 +2217,9 @@ static int vangogh_post_smu_init(struct smu_context *smu)
	uint32_t total_cu = adev->gfx.config.max_cu_per_sh *
		adev->gfx.config.max_sh_per_se * adev->gfx.config.max_shader_engines;

	if (adev->in_s0ix)
		return 0;

	/* allow message will be sent after enable message on Vangogh*/
	if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_GFXCLK_BIT) &&
			(adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {