All of lore.kernel.org
 help / color / mirror / Atom feed
* GFX PG for Stoney/Carrizo and UVD static PG for Carrizo
@ 2016-07-21 17:18 Tom St Denis
       [not found] ` <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Tom St Denis @ 2016-07-21 17:18 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] Revert "drm/amdgpu: disable GFX PG on CZ/BR/ST"
       [not found] ` <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
@ 2016-07-21 17:18   ` Tom St Denis
  2016-07-21 17:18   ` [PATCH 2/4] drm/amd/amdgpu: Re-enable PG for GFX on Stoney Tom St Denis
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Tom St Denis @ 2016-07-21 17:18 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis

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.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 9ba64989f092..e53bec87ec0f 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -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:
-- 
2.9.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] drm/amd/amdgpu: Re-enable PG for GFX on Stoney
       [not found] ` <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
  2016-07-21 17:18   ` [PATCH 1/4] Revert "drm/amdgpu: disable GFX PG on CZ/BR/ST" Tom St Denis
@ 2016-07-21 17:18   ` Tom St Denis
  2016-07-21 17:18   ` [PATCH 3/4] drm/amd/dpm: Add PG support for UVD on Carrizo Tom St Denis
  2016-07-21 17:18   ` [PATCH 4/4] drm/amd/amdgpu: Enable UVD PG " Tom St Denis
  3 siblings, 0 replies; 5+ messages in thread
From: Tom St Denis @ 2016-07-21 17:18 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis

With SMU SCLK and CP PG disabled testing passes.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index e53bec87ec0f..650a89bb3c82 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -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:
-- 
2.9.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] drm/amd/dpm: Add PG support for UVD on Carrizo
       [not found] ` <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
  2016-07-21 17:18   ` [PATCH 1/4] Revert "drm/amdgpu: disable GFX PG on CZ/BR/ST" Tom St Denis
  2016-07-21 17:18   ` [PATCH 2/4] drm/amd/amdgpu: Re-enable PG for GFX on Stoney Tom St Denis
@ 2016-07-21 17:18   ` Tom St Denis
  2016-07-21 17:18   ` [PATCH 4/4] drm/amd/amdgpu: Enable UVD PG " Tom St Denis
  3 siblings, 0 replies; 5+ messages in thread
From: Tom St Denis @ 2016-07-21 17:18 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
index 8ba07e79d4cb..a3e710147a69 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
@@ -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;
 
-- 
2.9.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] drm/amd/amdgpu: Enable UVD PG on Carrizo
       [not found] ` <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
                     ` (2 preceding siblings ...)
  2016-07-21 17:18   ` [PATCH 3/4] drm/amd/dpm: Add PG support for UVD on Carrizo Tom St Denis
@ 2016-07-21 17:18   ` Tom St Denis
  3 siblings, 0 replies; 5+ messages in thread
From: Tom St Denis @ 2016-07-21 17:18 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 650a89bb3c82..d711a3cf06f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -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:
-- 
2.9.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-21 17:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 17:18 GFX PG for Stoney/Carrizo and UVD static PG for Carrizo Tom St Denis
     [not found] ` <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2016-07-21 17:18   ` [PATCH 1/4] Revert "drm/amdgpu: disable GFX PG on CZ/BR/ST" Tom St Denis
2016-07-21 17:18   ` [PATCH 2/4] drm/amd/amdgpu: Re-enable PG for GFX on Stoney Tom St Denis
2016-07-21 17:18   ` [PATCH 3/4] drm/amd/dpm: Add PG support for UVD on Carrizo Tom St Denis
2016-07-21 17:18   ` [PATCH 4/4] drm/amd/amdgpu: Enable UVD PG " Tom St Denis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.