From a5fc2102ff5429bbd01200e5e27c59233e8171d4 Mon Sep 17 00:00:00 2001 From: Tom St Denis Date: Sat, 2 Jul 2016 00:52:32 +0530 Subject: [PATCH 1088/1110] drm/amdgpu/gfx8: Enable GFX PG on CZ Based on Alex's patches this enables GFX PG on CZ. Tested with xonotic-glx/glxgears/supertuxkart and idle desktop. Also read-back registers via umr for verificiation that the bits are truly enabled. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Kalyan Alle --- drivers/gpu/drm/amd/amdgpu/vi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index cc5ebd3..16070de 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -1537,7 +1537,15 @@ 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; + /* rev0 hardware doesn't support PG */ + if (adev->rev_id != 0x00) + adev->pg_flags |= AMDGPU_PG_SUPPORT_GFX_PG | + AMDGPU_PG_SUPPORT_GFX_SMG | + AMDGPU_PG_SUPPORT_GFX_DMG | + AMDGPU_PG_SUPPORT_CP | + AMDGPU_PG_SUPPORT_RLC_SMU_HS | + AMDGPU_PG_SUPPORT_GFX_PIPELINE; + adev->external_rev_id = adev->rev_id + 0x1; break; case CHIP_STONEY: -- 2.7.4