summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-09-29 15:57:31 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-10-09 17:08:17 -0500
commit9d5aa2ef3862197eb31e2df7c5d6b9b6dadcaf8a (patch)
tree57cfb71d2e77391009db5a175f5afe578d44f262 /drivers
parent9c8bc8d3394963c9bd4b5bcce03303c56dc3104b (diff)
downloadblackbird-obmc-linux-9d5aa2ef3862197eb31e2df7c5d6b9b6dadcaf8a.tar.gz
blackbird-obmc-linux-9d5aa2ef3862197eb31e2df7c5d6b9b6dadcaf8a.zip
drm/amdgpu: Add fw load in gfx_v8 and sdma_v3
gfx and sdma can be initialized before smu. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c11
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c8
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 3d0f277a6523..8439f9a6f281 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -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)
{
+ int r;
+
gfx_v8_0_rlc_stop(adev);
gfx_v8_0_rlc_reset(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);
return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 6fb3edaba0ec..0bdde7f84adf 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -788,6 +788,14 @@ static int sdma_v3_0_start(struct amdgpu_device *adev)
{
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 */
sdma_v3_0_ctx_switch_enable(adev, false);
sdma_v3_0_enable(adev, false);
OpenPOWER on IntegriCloud