drm/amdgpu: modify cp_flags to pg_flags in gfx_v10_cntl_power_gating
authorChangfeng <Changfeng.Zhu@amd.com>
Fri, 9 Oct 2020 04:42:06 +0000 (12:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Oct 2020 18:48:48 +0000 (14:48 -0400)
It needs to use adev->pg_flags other than adev->cg_glags in
gfx_v10_cntl_power_gating

Signed-off-by: Changfeng <Changfeng.Zhu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

index 9a8d3f7..3236002 100644 (file)
@@ -7588,7 +7588,7 @@ static void gfx_v10_cntl_power_gating(struct amdgpu_device *adev, bool enable)
 {
        u32 data = RREG32_SOC15(GC, 0, mmRLC_PG_CNTL);
 
-       if (enable && (adev->cg_flags & AMD_PG_SUPPORT_GFX_PG))
+       if (enable && (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG))
                data |= RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK;
        else
                data &= ~RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK;