AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Xiaomeng Hou <Xiaomeng.Hou@amd.com>
To: amd-gfx@lists.freedesktop.org
Cc: Alexander.Deucher@amd.com, Ray.Huang@amd.com,
	Xiaomeng Hou <Xiaomeng.Hou@amd.com>,
	Evan.Quan@amd.com
Subject: [PATCH 3/3] drm/amdgpu/pm: inform PMFW rlc status before start/stop rlc for vangogh
Date: Tue,  8 Dec 2020 19:19:42 +0800	[thread overview]
Message-ID: <20201208111942.6292-3-Xiaomeng.Hou@amd.com> (raw)
In-Reply-To: <20201208111942.6292-1-Xiaomeng.Hou@amd.com>

RLC is halted when system suspend/shutdown. However, due to DPM enabled, PMFM is
unaware of RLC being halted and will continue sending messages, which would
eventually caused ACPI related hang. So send message to inform PMFM the rlc
status before start/stop rlc.

Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com>
Change-Id: I7b1a04f6e249ac6753109079ecb3019c99161d9f
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index cf999b7a2164..42a32c0e5bab 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -920,6 +920,14 @@ static int smu_smc_hw_setup(struct smu_context *smu)
 	uint32_t pcie_gen = 0, pcie_width = 0;
 	int ret = 0;
 
+	if (adev->in_suspend && smu->is_apu) {
+		ret = smu_notify_rlc_status(smu, 1);
+		if (ret) {
+			dev_info(adev->dev, "Failed to notify rlc status!\n");
+			return ret;
+		}
+	}
+
 	if (adev->in_suspend && smu_is_dpm_running(smu)) {
 		dev_info(adev->dev, "dpm has been enabled\n");
 		/* this is needed specifically */
@@ -1213,6 +1221,14 @@ static int smu_disable_dpms(struct smu_context *smu)
 			dev_err(adev->dev, "Failed to disable smu features.\n");
 	}
 
+	if (smu->is_apu) {
+		ret = smu_notify_rlc_status(smu, 0);
+		if (ret) {
+			dev_info(adev->dev, "Failed to notify rlc status!\n");
+			return ret;
+		}
+	}
+
 	if (adev->asic_type >= CHIP_NAVI10 &&
 	    adev->gfx.rlc.funcs->stop)
 		adev->gfx.rlc.funcs->stop(adev);
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2020-12-08 11:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 11:19 [PATCH 1/3] drm/amd/pm: update the smu v11.5 smc header for vangogh Xiaomeng Hou
2020-12-08 11:19 ` [PATCH 2/3] drm/amd/pm: add interface to notify RLC status " Xiaomeng Hou
2020-12-08 11:43   ` Wang, Kevin(Yang)
2020-12-08 11:19 ` Xiaomeng Hou [this message]
2020-12-08 11:47   ` [PATCH 3/3] drm/amdgpu/pm: inform PMFW rlc status before start/stop rlc " Wang, Kevin(Yang)
2020-12-08 13:08   ` Huang Rui
2020-12-08 13:39     ` Lazar, Lijo
2020-12-08 14:10       ` Huang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201208111942.6292-3-Xiaomeng.Hou@amd.com \
    --to=xiaomeng.hou@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Evan.Quan@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox