drm/amd/powerplay:Tonga not to start SMC if SRIOV
authorTrigger Huang <trigger.huang@amd.com>
Tue, 11 Oct 2016 05:21:11 +0000 (13:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Nov 2016 15:21:04 +0000 (10:21 -0500)
This patch is used for virtualization support. In virtualization case,
Tonga SMC should not be started and SMU firmware should not be loaded
if in SRIOV environment. The same operation will be applied on FIJI in
other patch.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Trigger Huang <trigger.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c

index 5f9124046b9b79d8fa7b763b3a3e41877571e859..eff9a232e72e52f78ec40c3bada79e52b8e5b4fe 100644 (file)
@@ -140,7 +140,8 @@ static int tonga_start_smu(struct pp_smumgr *smumgr)
        int result;
 
        /* Only start SMC if SMC RAM is not running */
-       if (!smu7_is_smc_ram_running(smumgr)) {
+       if (!(smu7_is_smc_ram_running(smumgr) ||
+               cgs_is_virtualization_enabled(smumgr->device))) {
                /*Check if SMU is running in protected mode*/
                if (0 == SMUM_READ_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC,
                                        SMU_FIRMWARE, SMU_MODE)) {