AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 3/5] drm/amd/pp: Implement load_firmware interface
Date: Wed, 3 Oct 2018 19:09:58 +0800	[thread overview]
Message-ID: <1538565000-30532-4-git-send-email-Rex.Zhu@amd.com> (raw)
In-Reply-To: <1538565000-30532-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>

with this interface, gfx/sdma can be initialized
before smu.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index b2ebcb1..6bc8e9c 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -270,8 +270,23 @@ static int pp_set_clockgating_state(void *handle,
 	.funcs = &pp_ip_funcs,
 };
 
+/* This interface only be supported On Vi,
+ * because only smu7/8 can help to load gfx/sdma fw,
+ * smu need to be enabled before load other ip's fw.
+ * so call start smu to load smu7 fw and other ip's fw
+ */
 static int pp_dpm_load_fw(void *handle)
 {
+	struct pp_hwmgr *hwmgr = handle;
+
+	if (!hwmgr || !hwmgr->smumgr_funcs || !hwmgr->smumgr_funcs->start_smu)
+		return -EINVAL;
+
+	if (hwmgr->smumgr_funcs->start_smu(hwmgr)) {
+		pr_err("fw load failed\n");
+		return -EINVAL;
+	}
+
 	return 0;
 }
 
-- 
1.9.1

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

  parent reply	other threads:[~2018-10-03 11:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 11:09 [PATCH 0/5] Change the hw ip initialize sequence Rex Zhu
     [not found] ` <1538565000-30532-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-10-03 11:09   ` [PATCH 1/5] drm/amdgpu: Don't reallocate ucode bo when suspend Rex Zhu
     [not found]     ` <1538565000-30532-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-10-04  3:34       ` Alex Deucher
     [not found]         ` <CADnq5_MvoNsbMCxxv7QNg7Xd1Ufp2y_Tzb=Ls11R_0gaeFwxOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-10-08 15:56           ` Zhu, Rex
     [not found]             ` <BYAPR12MB2775AA30E68EEE0FFE883492FBE60-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-08 16:21               ` Deucher, Alexander
     [not found]                 ` <BN6PR12MB18090E11A7EE4A4E6901C3A1F7E60-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-08 16:30                   ` Zhu, Rex
     [not found]                     ` <BYAPR12MB2775299C03A4F9BCFF6B9F2BFBE60-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-08 17:31                       ` Christian König
     [not found]                         ` <37f64613-0ae4-df1e-b306-00abdb71eb11-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-08 17:58                           ` Zhu, Rex
     [not found]                             ` <BYAPR12MB2775618E156FC2AFC3ACAEDEFBE60-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-08 18:03                               ` Koenig, Christian
     [not found]                                 ` <dfa9ab3d-56f9-33d5-39e2-04a5cd6269d3-5C7GfCeVMHo@public.gmane.org>
2018-10-08 18:15                                   ` Zhu, Rex
     [not found]                                     ` <BYAPR12MB27754292CE2CA3E542075A01FBE60-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-08 18:21                                       ` Christian König
     [not found]                                         ` <872987e6-57a0-ff6f-c39e-b75c98fd6ecd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-08 18:37                                           ` Zhu, Rex
2018-10-03 11:09   ` [PATCH 2/5] drm/amd/pp: Allocate ucode bo in request_smu_load_fw Rex Zhu
     [not found]     ` <1538565000-30532-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-10-04  3:35       ` Alex Deucher
2018-10-03 11:09   ` Rex Zhu [this message]
     [not found]     ` <1538565000-30532-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-10-04  3:36       ` [PATCH 3/5] drm/amd/pp: Implement load_firmware interface Alex Deucher
2018-10-03 11:09   ` [PATCH 4/5] drm/amdgpu: Add fw load in gfx_v8 and sdma_v3 Rex Zhu
     [not found]     ` <1538565000-30532-5-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-10-04  3:33       ` Alex Deucher
     [not found]         ` <CADnq5_N5A9rkwkTJQSuvb1O=B+c3CD=siTVU6uDc6FRMgkzeow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-10-08 15:57           ` Zhu, Rex
2018-10-03 11:10   ` [PATCH 5/5] drm/amdgpu: Change VI gfx/sdma/smu init sequence Rex Zhu

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=1538565000-30532-4-git-send-email-Rex.Zhu@amd.com \
    --to=rex.zhu-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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