[PATCH 14/21] drm/amdgpu: Add pg support for gfxoff for PCO

Alex Deucher alexdeucher at gmail.com
Wed Sep 12 18:56:25 UTC 2018


From: Kenneth Feng <kenneth.feng at amd.com>

Add pg support for gfxoff.

Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index d3b73afcb871..2539fa7b9594 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -740,7 +740,10 @@ static int soc15_common_early_init(void *handle)
 			AMD_CG_SUPPORT_SDMA_MGCG |
 			AMD_CG_SUPPORT_SDMA_LS;
 
-		adev->pg_flags = 0;
+		if (adev->powerplay.pp_feature & PP_GFXOFF_MASK)
+			adev->pg_flags |= AMD_PG_SUPPORT_GFX_PG |
+				AMD_PG_SUPPORT_CP |
+				AMD_PG_SUPPORT_RLC_SMU_HS;
 
 		adev->external_rev_id = adev->rev_id + 0x41;
 		break;
-- 
2.13.6



More information about the amd-gfx mailing list