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

Commit ad1830d5 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher
Browse files

drm/amdgpu: fix pg can't be disabled by PG mask.

parent c4d17b81
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -5336,13 +5336,10 @@ static int gfx_v8_0_set_powergating_state(void *handle,
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
	bool enable = (state == AMD_PG_STATE_GATE) ? true : false;

	if (!(adev->pg_flags & AMD_PG_SUPPORT_GFX_PG))
		return 0;

	switch (adev->asic_type) {
	case CHIP_CARRIZO:
	case CHIP_STONEY:
		if (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)

		cz_update_gfx_cg_power_gating(adev, enable);

		if ((adev->pg_flags & AMD_PG_SUPPORT_GFX_SMG) && enable)