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 2/5] drm/amd/pp: Allocate ucode bo in request_smu_load_fw
Date: Wed, 3 Oct 2018 19:09:57 +0800	[thread overview]
Message-ID: <1538565000-30532-3-git-send-email-Rex.Zhu@amd.com> (raw)
In-Reply-To: <1538565000-30532-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>

ucode bo is needed by request_smu_load_fw,
the request_smu_load_fw maybe called by gfx/sdma
before smu hw init.
so move amdgpu_ucode_bo_init to request_smu_lowd_fw
from smu hw init.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c      | 3 ---
 drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 ++
 drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 2 ++
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index e51d961..b2ebcb1 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -124,9 +124,6 @@ static int pp_hw_init(void *handle)
 	struct amdgpu_device *adev = handle;
 	struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;
 
-	if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
-		amdgpu_ucode_init_bo(adev);
-
 	ret = hwmgr_hw_init(hwmgr);
 
 	if (ret)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
index 794a165..99b4e4f 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
@@ -346,6 +346,8 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr)
 	if (!hwmgr->reload_fw)
 		return 0;
 
+	amdgpu_ucode_init_bo(hwmgr->adev);
+
 	if (smu_data->soft_regs_start)
 		cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC,
 					smu_data->soft_regs_start + smum_get_offsetof(hwmgr,
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
index 7b3b66d..abbf2f2 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
@@ -664,6 +664,8 @@ static int smu8_request_smu_load_fw(struct pp_hwmgr *hwmgr)
 	if (!hwmgr->reload_fw)
 		return 0;
 
+	amdgpu_ucode_init_bo(hwmgr->adev);
+
 	smu8_smu_populate_firmware_entries(hwmgr);
 
 	smu8_smu_construct_toc(hwmgr);
-- 
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   ` Rex Zhu [this message]
     [not found]     ` <1538565000-30532-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-10-04  3:35       ` [PATCH 2/5] drm/amd/pp: Allocate ucode bo in request_smu_load_fw Alex Deucher
2018-10-03 11:09   ` [PATCH 3/5] drm/amd/pp: Implement load_firmware interface Rex Zhu
     [not found]     ` <1538565000-30532-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-10-04  3:36       ` 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-3-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