From: Prike Liang Date: Tue, 15 Oct 2019 09:24:25 +0000 (+0800) Subject: drm/amdgpu: add GFX_PIPELINE capacity check for updating gfx cgpg X-Git-Tag: v5.10.7~3692^2~36^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8486eef2c095f2f986e4968b27b7a2043afc0e3;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: add GFX_PIPELINE capacity check for updating gfx cgpg Before disable gfx pipeline power gating need check the flag AMD_PG_SUPPORT_GFX_PIPELINE. Signed-off-by: Prike Liang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 035e45a..f545ecb 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -4296,7 +4296,8 @@ static void gfx_v9_0_update_gfx_cg_power_gating(struct amdgpu_device *adev, gfx_v9_0_enable_gfx_pipeline_powergating(adev, true); } else { gfx_v9_0_enable_gfx_cg_power_gating(adev, false); - gfx_v9_0_enable_gfx_pipeline_powergating(adev, false); + if (adev->pg_flags & AMD_PG_SUPPORT_GFX_PIPELINE) + gfx_v9_0_enable_gfx_pipeline_powergating(adev, false); } amdgpu_gfx_rlc_exit_safe_mode(adev);