Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72408a41 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher
Browse files

drm/amdgpu: enter rlc safe mode before set cgpg

parent 621a6318
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -3394,8 +3394,7 @@ static void gfx_v9_0_exit_rlc_safe_mode(struct amdgpu_device *adev)
static void gfx_v9_0_update_gfx_cg_power_gating(struct amdgpu_device *adev,
						bool enable)
{
	/* TODO: double check if we need to perform under safe mdoe */
	/* gfx_v9_0_enter_rlc_safe_mode(adev); */
	gfx_v9_0_enter_rlc_safe_mode(adev);

	if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_PG) && enable) {
		gfx_v9_0_enable_gfx_cg_power_gating(adev, true);
@@ -3406,7 +3405,7 @@ static void gfx_v9_0_update_gfx_cg_power_gating(struct amdgpu_device *adev,
		gfx_v9_0_enable_gfx_pipeline_powergating(adev, false);
	}

	/* gfx_v9_0_exit_rlc_safe_mode(adev); */
	gfx_v9_0_exit_rlc_safe_mode(adev);
}

static void gfx_v9_0_update_gfx_mg_power_gating(struct amdgpu_device *adev,