Skip to content

Commit fbe1a9e

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amdgpu: Restrict bootloader wait to SMUv13.0.6
Restrict the wait for boot loader steady state only to SMUv13.0.6. For older SOCs, ASIC init has a longer wait period and that takes care. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 07e388a commit fbe1a9e

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

drivers/gpu/drm/amd/amdgpu/psp_v13_0.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ static int psp_v13_0_wait_for_bootloader(struct psp_context *psp)
160160
struct amdgpu_device *adev = psp->adev;
161161
int retry_loop, ret;
162162

163-
if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(13, 0, 6))
164-
psp_v13_0_wait_for_vmbx_ready(psp);
165-
166163
/* Wait for bootloader to signify that it is ready having bit 31 of
167164
* C2PMSG_35 set to 1. All other bits are expected to be cleared.
168165
* If there is an error in processing command, bits[7:0] will be set.
@@ -180,6 +177,19 @@ static int psp_v13_0_wait_for_bootloader(struct psp_context *psp)
180177
return ret;
181178
}
182179

180+
static int psp_v13_0_wait_for_bootloader_steady_state(struct psp_context *psp)
181+
{
182+
struct amdgpu_device *adev = psp->adev;
183+
184+
if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(13, 0, 6)) {
185+
psp_v13_0_wait_for_vmbx_ready(psp);
186+
187+
return psp_v13_0_wait_for_bootloader(psp);
188+
}
189+
190+
return 0;
191+
}
192+
183193
static int psp_v13_0_bootloader_load_component(struct psp_context *psp,
184194
struct psp_bin_desc *bin_desc,
185195
enum psp_bootloader_cmd bl_cmd)
@@ -737,7 +747,7 @@ static int psp_v13_0_fatal_error_recovery_quirk(struct psp_context *psp)
737747

738748
static const struct psp_funcs psp_v13_0_funcs = {
739749
.init_microcode = psp_v13_0_init_microcode,
740-
.wait_for_bootloader = psp_v13_0_wait_for_bootloader,
750+
.wait_for_bootloader = psp_v13_0_wait_for_bootloader_steady_state,
741751
.bootloader_load_kdb = psp_v13_0_bootloader_load_kdb,
742752
.bootloader_load_spl = psp_v13_0_bootloader_load_spl,
743753
.bootloader_load_sysdrv = psp_v13_0_bootloader_load_sysdrv,

0 commit comments

Comments
 (0)