Skip to contentSkip to conversation

drm/amd/powerplay:Tonga not to start SMC if SRIOV

PATCH In review Trigger Huang 2 participants 2 messages Nov 3, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/powerplay:Tonga not to start SMC if SRIOV

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.

---
 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c +2 -1
index 5f91240..eff9a232 100644
@@ -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)) {
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by Alex Deucher
#2 lore raw
In reply to a message not in the archive
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Trigger Huang
Sent: Thursday, November 03, 2016 8:49 AM
To: [email protected]
Cc: Liu, Monk; Huang, Trigger
Subject: [PATCH] drm/amd/powerplay:Tonga not to start SMC if SRIOV

Quoted 7 lines

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.

Quoted 20 lines
---
 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c +2 -1
index 5f91240..eff9a232 100644
@@ -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-
Quoted 1 line

device, CGS_IND_REG__SMC,

Quoted 8 lines

SMU_FIRMWARE, SMU_MODE)) {
--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx