Commit 9d5aa2ef authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amdgpu: Add fw load in gfx_v8 and sdma_v3

gfx and sdma can be initialized before smu.
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9c8bc8d3
...@@ -4175,9 +4175,20 @@ static void gfx_v8_0_rlc_start(struct amdgpu_device *adev) ...@@ -4175,9 +4175,20 @@ static void gfx_v8_0_rlc_start(struct amdgpu_device *adev)
static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev) static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
{ {
int r;
gfx_v8_0_rlc_stop(adev); gfx_v8_0_rlc_stop(adev);
gfx_v8_0_rlc_reset(adev); gfx_v8_0_rlc_reset(adev);
gfx_v8_0_init_pg(adev); gfx_v8_0_init_pg(adev);
if (adev->powerplay.pp_funcs->load_firmware) {
r = adev->powerplay.pp_funcs->load_firmware(adev->powerplay.pp_handle);
if (r) {
pr_err("firmware loading failed\n");
return r;
}
}
gfx_v8_0_rlc_start(adev); gfx_v8_0_rlc_start(adev);
return 0; return 0;
......
...@@ -788,6 +788,14 @@ static int sdma_v3_0_start(struct amdgpu_device *adev) ...@@ -788,6 +788,14 @@ static int sdma_v3_0_start(struct amdgpu_device *adev)
{ {
int r; int r;
if (adev->powerplay.pp_funcs->load_firmware) {
r = adev->powerplay.pp_funcs->load_firmware(adev->powerplay.pp_handle);
if (r) {
pr_err("firmware loading failed\n");
return r;
}
}
/* disable sdma engine before programing it */ /* disable sdma engine before programing it */
sdma_v3_0_ctx_switch_enable(adev, false); sdma_v3_0_ctx_switch_enable(adev, false);
sdma_v3_0_enable(adev, false); sdma_v3_0_enable(adev, false);
......
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