drm/amd/powerplay: fix set tools address for Vega10
authorEric Huang <JinHuiEric.Huang@amd.com>
Thu, 25 May 2017 19:59:59 +0000 (15:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 May 2017 18:16:31 +0000 (14:16 -0400)
Tools fb address was failed to send to smu when smu
was not running. Changing sequence will fix it.

Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c

index 115f0e4b16032d89aa48b43f18d72905036bc59b..269678443862d8e446a6256b6bb91c3d8789dc8d 100644 (file)
@@ -500,7 +500,6 @@ static int vega10_smu_init(struct pp_smumgr *smumgr)
                                        smu_lower_32_bits(mc_addr);
                        priv->smu_tables.entry[TOOLSTABLE].table = kaddr;
                        priv->smu_tables.entry[TOOLSTABLE].handle = handle;
-                       vega10_set_tools_address(smumgr);
                }
        }
 
@@ -569,6 +568,9 @@ static int vega10_start_smu(struct pp_smumgr *smumgr)
        PP_ASSERT_WITH_CODE(!vega10_verify_smc_interface(smumgr),
                        "Failed to verify SMC interface!",
                        return -EINVAL);
+
+       vega10_set_tools_address(smumgr);
+
        return 0;
 }