Skip to contentSkip to conversation

drm/amdgpu:bypass avfs event manager for sriov

PATCH Superseded Trigger Huang 3 participants 3 messages Nov 1, 2016 – Nov 2, 2016 2 messages not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu:bypass avfs event manager for sriov

This patch is used for virtualization support. In virtualization case, the initialization sequences are not totally the same as non-Virtualization's. The avfs event manager should be bypassed if in SRIOV virtualization case.

---
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +5 -1
index b86e48f..26eff56 100755
@@ -396,7 +396,8 @@ static int fiji_start_smu(struct pp_smumgr *smumgr)
 	struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
 
 	/* 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))) {
 		fiji_avfs_event_mgr(smumgr, false);
 
 		/* Check if SMU is running in protected mode */
@@ -443,6 +444,9 @@ static bool fiji_is_hw_avfs_present(struct pp_smumgr *smumgr)
 	uint32_t efuse = 0;
 	uint32_t mask = (1 << ((AVFS_EN_MSB - AVFS_EN_LSB) + 1)) - 1;
 
+	if (cgs_is_virtualization_enabled(smumgr->device))
+		return 0;
+
 	if (!atomctrl_read_efuse(smumgr->device, AVFS_EN_LSB, AVFS_EN_MSB,
 			mask, &efuse)) {
 		if (efuse)
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: Tuesday, November 01, 2016 3:23 AM
To: [email protected]
Cc: Min, Frank; Yu, Xiangliang; Liu, Monk; Huang, Trigger
Subject: [PATCH] drm/amdgpu:bypass avfs event manager for sriov

Quoted 8 lines

This patch is used for virtualization support. In virtualization case, the initialization sequences are not totally the same as non-Virtualization's. The avfs event manager should be bypassed if in SRIOV virtualization case.

Doesn't tonga need something similar?

Quoted 34 lines
---
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +5 -1
index b86e48f..26eff56 100755
@@ -396,7 +396,8 @@ static int fiji_start_smu(struct pp_smumgr *smumgr)
 	struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
 
 	/* 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))) {
 		fiji_avfs_event_mgr(smumgr, false);
 
 		/* Check if SMU is running in protected mode */
@@ -443,6 +444,9 @@ static bool fiji_is_hw_avfs_present(struct
 pp_smumgr *smumgr)
 	uint32_t efuse = 0;
 	uint32_t mask = (1 << ((AVFS_EN_MSB - AVFS_EN_LSB) + 1)) - 1;
 
+	if (cgs_is_virtualization_enabled(smumgr->device))
+		return 0;
+
 	if (!atomctrl_read_efuse(smumgr->device, AVFS_EN_LSB,
 AVFS_EN_MSB,
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +0 -1
 			mask, &efuse)) {
 		if (efuse)
--

2.7.4

Quoted 4 lines

_______________________________________________
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

Reviewed-by Alex Deucher
#4 lore raw
In reply to a message not in the archive

Tonga have no avfs event manager,

Trigger, please take care and double check you didn't lost tonga's patch, we are more concern if Tonga could support SRIOV than FIJI

BR Monk

-----Original Message-----
From: Deucher, Alexander
Sent: Tuesday, November 01, 2016 11:18 PM
To: Huang, Trigger <[email protected]>; [email protected]
Cc: Min, Frank <[email protected]>; Yu, Xiangliang <[email protected]>; Liu, Monk <[email protected]>; Huang, Trigger <[email protected]>
Subject: RE: [PATCH] drm/amdgpu:bypass avfs event manager for sriov

Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Trigger Huang
Sent: Tuesday, November 01, 2016 3:23 AM
To: [email protected]
Cc: Min, Frank; Yu, Xiangliang; Liu, Monk; Huang, Trigger
Subject: [PATCH] drm/amdgpu:bypass avfs event manager for sriov

Quoted 8 lines

This patch is used for virtualization support. In virtualization case, the initialization sequences are not totally the same as non-Virtualization's. The avfs event manager should be bypassed if in SRIOV virtualization case.

Doesn't tonga need something similar?

Quoted 32 lines
---
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +2 -1
index b86e48f..26eff56 100755
@@ -396,7 +396,8 @@ static int fiji_start_smu(struct pp_smumgr *smumgr)
 	struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
 
 	/* 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))) {
 		fiji_avfs_event_mgr(smumgr, false);
 
 		/* Check if SMU is running in protected mode */ @@ -443,6 +444,9 @@ 

static bool fiji_is_hw_avfs_present(struct pp_smumgr *smumgr)

drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +3 -1
 	uint32_t efuse = 0;
 	uint32_t mask = (1 << ((AVFS_EN_MSB - AVFS_EN_LSB) + 1)) - 1;
 
+	if (cgs_is_virtualization_enabled(smumgr->device))
+		return 0;
+
 	if (!atomctrl_read_efuse(smumgr->device, AVFS_EN_LSB, AVFS_EN_MSB,
 			mask, &efuse)) {
 		if (efuse)
--

2.7.4

Quoted 4 lines

_______________________________________________
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