Skip to contentSkip to conversation

GFX PG for Stoney/Carrizo and UVD static PG for Carrizo

PATCH New Tom St Denis 1 participant 5 messages Jul 21, 2016 1 message not in the archive

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

These patches re-enable GFX PG on Stoney and Carrizo. I've found that AMD_PG_SUPPORT_CP and AMD_PG_SUPPORT_RLC_SMU_HS are both buggy so they are disabled. RLC_SMU_HS results in early system hangs whereas CP powergating results in harder to trigger system hangs.

With both disabled I've been able to stress test GFX without hangs.

The UVD PG is only enabled if powerplay is disabled. Tested by sampling with the debug tool I can see correct behaviour in the PGFSM TILE registers.

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/4 Revert "drm/amdgpu: disable GFX PG on CZ/BR/ST"

This partially reverts commit bd0ced160a2a7f1b23058bdca008f7770fd863c3.

But keeps the SMU SCLK slowdown and CP PG disabled since that is what is causing the system hangs on Carrizo(AM4) systems.

PG is still disabled for ST systems as that hasn't been fully tested yet.

---
 drivers/gpu/drm/amd/amdgpu/vi.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/vi.c +7 -0
index 9ba64989f092..e53bec87ec0f 100644
@@ -1578,7 +1578,13 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_HDP_LS |
 			AMD_CG_SUPPORT_SDMA_MGCG |
 			AMD_CG_SUPPORT_SDMA_LS;
+		/* rev0 hardware doesn't support PG */
 		adev->pg_flags = 0;
+		if (adev->rev_id != 0x00)
+			adev->pg_flags |= AMD_PG_SUPPORT_GFX_PG |
+				AMD_PG_SUPPORT_GFX_SMG |
+				AMD_PG_SUPPORT_GFX_DMG |
+				AMD_PG_SUPPORT_GFX_PIPELINE;
 		adev->external_rev_id = adev->rev_id + 0x1;
 		break;
 	case CHIP_STONEY:
@@ -1597,6 +1603,7 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_HDP_LS |
 			AMD_CG_SUPPORT_SDMA_MGCG |
 			AMD_CG_SUPPORT_SDMA_LS;
+		adev->pg_flags = 0;
 		adev->external_rev_id = adev->rev_id + 0x1;
 		break;
 	default:
Signature · 6 lines
2.9.2

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

PATCH 2/4 drm/amd/amdgpu: Re-enable PG for GFX on Stoney

In reply to a message not in the archive

With SMU SCLK and CP PG disabled testing passes.

---
 drivers/gpu/drm/amd/amdgpu/vi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vi.c +4 -1
index e53bec87ec0f..650a89bb3c82 100644
@@ -1603,7 +1603,10 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_HDP_LS |
 			AMD_CG_SUPPORT_SDMA_MGCG |
 			AMD_CG_SUPPORT_SDMA_LS;
-		adev->pg_flags = 0;
+		adev->pg_flags |= AMD_PG_SUPPORT_GFX_PG |
+			AMD_PG_SUPPORT_GFX_SMG |
+			AMD_PG_SUPPORT_GFX_DMG |
+			AMD_PG_SUPPORT_GFX_PIPELINE;
 		adev->external_rev_id = adev->rev_id + 0x1;
 		break;
 	default:
Signature · 6 lines
2.9.2

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

PATCH 3/4 drm/amd/dpm: Add PG support for UVD on Carrizo

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/cz_dpm.c +11 -0
index 8ba07e79d4cb..a3e710147a69 100644
@@ -41,6 +41,8 @@
 #include "gmc/gmc_8_1_d.h"
 #include "bif/bif_5_1_d.h"
 #include "gfx_v8_0.h"
+#include "uvd/uvd_6_0_d.h"
+#include "uvd/uvd_6_0_sh_mask.h"
 
 static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate);
 static void cz_dpm_powergate_vce(struct amdgpu_device *adev, bool gate);
@@ -2098,6 +2100,15 @@ static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate)
 	struct cz_power_info *pi = cz_get_pi(adev);
 	int ret;
 
+	if (pi->caps_uvd_pg) {
+		if (pi->uvd_dynamic_pg)
+			WREG32(mmUVD_POWER_STATUS,
+				UVD_POWER_STATUS__UVD_PG_EN_MASK |
+				UVD_POWER_STATUS__UVD_PG_MODE_MASK);
+		else
+			WREG32(mmUVD_POWER_STATUS,
+				UVD_POWER_STATUS__UVD_PG_EN_MASK);
+	}
 	if (pi->uvd_power_gated == gate)
 		return;
 
Signature · 6 lines
2.9.2

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

PATCH 4/4 drm/amd/amdgpu: Enable UVD PG on Carrizo

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vi.c +5 -1
index 650a89bb3c82..d711a3cf06f1 100644
@@ -1580,11 +1580,15 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_SDMA_LS;
 		/* rev0 hardware doesn't support PG */
 		adev->pg_flags = 0;
-		if (adev->rev_id != 0x00)
+		if (adev->rev_id != 0x00) {
 			adev->pg_flags |= AMD_PG_SUPPORT_GFX_PG |
 				AMD_PG_SUPPORT_GFX_SMG |
 				AMD_PG_SUPPORT_GFX_DMG |
 				AMD_PG_SUPPORT_GFX_PIPELINE;
+			/* powerplay UVD PG doesn't work yet */
+			if (!amdgpu_powerplay)
+				adev->pg_flags |= AMD_PG_SUPPORT_UVD;
+		}
 		adev->external_rev_id = adev->rev_id + 0x1;
 		break;
 	case CHIP_STONEY:
Signature · 6 lines
2.9.2

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