All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Quan, Evan" <Evan.Quan@amd.com>
To: "Gao, Likun" <Likun.Gao@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Clements, John" <John.Clements@amd.com>,
	"Zhang, Hawking" <Hawking.Zhang@amd.com>
Subject: RE: [PATCH] drm/amdgpu: add condition to set MP1 state on gpu reset
Date: Wed, 20 May 2020 03:13:32 +0000	[thread overview]
Message-ID: <DM6PR12MB2619231609F3C5C62A52C5CCE4B60@DM6PR12MB2619.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20200518103504.2176521-1-likun.gao@amd.com>

[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Evan Quan <evan.quan@amd.com>

-----Original Message-----
From: Gao, Likun <Likun.Gao@amd.com>
Sent: Monday, May 18, 2020 6:35 PM
To: amd-gfx@lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang@amd.com>; Quan, Evan <Evan.Quan@amd.com>; Clements, John <John.Clements@amd.com>; Gao, Likun <Likun.Gao@amd.com>
Subject: [PATCH] drm/amdgpu: add condition to set MP1 state on gpu reset

From: Likun Gao <Likun.Gao@amd.com>

Only ras supportted need to set MP1 state to prepare for unload before reloading SMU FW.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Change-Id: I9e49b3f13aa613393381fe15b6b060665026078a
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 5de5b27bf4c4..a349cf15f90a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -1399,12 +1399,13 @@ static int psp_load_smu_fw(struct psp_context *psp)
 struct amdgpu_device* adev = psp->adev;
 struct amdgpu_firmware_info *ucode =
 &adev->firmware.ucode[AMDGPU_UCODE_ID_SMC];
+struct amdgpu_ras *ras = psp->ras.ras;

 if (!ucode->fw || amdgpu_sriov_vf(psp->adev))
 return 0;


-if (adev->in_gpu_reset) {
+if (adev->in_gpu_reset && ras && ras->supported) {
 ret = amdgpu_dpm_set_mp1_state(adev, PP_MP1_STATE_UNLOAD);
 if (ret) {
 DRM_WARN("Failed to set MP1 state prepare for reload\n");
--
2.25.1

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

      reply	other threads:[~2020-05-20  3:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 10:35 [PATCH] drm/amdgpu: add condition to set MP1 state on gpu reset Likun Gao
2020-05-20  3:13 ` Quan, Evan [this message]

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=DM6PR12MB2619231609F3C5C62A52C5CCE4B60@DM6PR12MB2619.namprd12.prod.outlook.com \
    --to=evan.quan@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=John.Clements@amd.com \
    --cc=Likun.Gao@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.