Commit 95b456d3 authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher

drm/amd: Move microcode init from sw_init to early_init for SDMA v6.0

As part of IP discovery early_init is run for all HW IP blocks.
During this phase all firmware is supposed to be identified that may
be missing so that the driver can avoid releasing resources used by
the EFI framebuffer or simpledrm until the last possible moment.

Move microcode loading from sw_init to early_init.
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ed1c1053
...@@ -1258,6 +1258,11 @@ static void sdma_v6_0_set_ras_funcs(struct amdgpu_device *adev) ...@@ -1258,6 +1258,11 @@ static void sdma_v6_0_set_ras_funcs(struct amdgpu_device *adev)
static int sdma_v6_0_early_init(void *handle) static int sdma_v6_0_early_init(void *handle)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int r;
r = amdgpu_sdma_init_microcode(adev, 0, true);
if (r)
return r;
sdma_v6_0_set_ring_funcs(adev); sdma_v6_0_set_ring_funcs(adev);
sdma_v6_0_set_buffer_funcs(adev); sdma_v6_0_set_buffer_funcs(adev);
...@@ -1282,10 +1287,6 @@ static int sdma_v6_0_sw_init(void *handle) ...@@ -1282,10 +1287,6 @@ static int sdma_v6_0_sw_init(void *handle)
if (r) if (r)
return r; return r;
r = amdgpu_sdma_init_microcode(adev, 0, true);
if (r)
return r;
for (i = 0; i < adev->sdma.num_instances; i++) { for (i = 0; i < adev->sdma.num_instances; i++) {
ring = &adev->sdma.instance[i].ring; ring = &adev->sdma.instance[i].ring;
ring->ring_obj = NULL; ring->ring_obj = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment