Skip to content

Commit 199888a

Browse files
Roman Lialexdeucher
authored andcommitted
drm/amd/display: Update IPS default mode for DCN35/DCN351
[WHY] RCG state of IPX in idle is more stable for DCN351 and some variants of DCN35 than IPS2. [HOW] Rework dm_get_default_ips_mode() to specify default per ASIC and update DCN35/DCN351 defaults accordingly. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Sun peng Li <sunpeng.li@amd.com> Signed-off-by: Roman Li <Roman.Li@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 327e62f commit 199888a

1 file changed

Lines changed: 33 additions & 17 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,25 +1771,41 @@ static struct dml2_soc_bb *dm_dmub_get_vbios_bounding_box(struct amdgpu_device *
17711771
static enum dmub_ips_disable_type dm_get_default_ips_mode(
17721772
struct amdgpu_device *adev)
17731773
{
1774-
/*
1775-
* On DCN35 systems with Z8 enabled, it's possible for IPS2 + Z8 to
1776-
* cause a hard hang. A fix exists for newer PMFW.
1777-
*
1778-
* As a workaround, for non-fixed PMFW, force IPS1+RCG as the deepest
1779-
* IPS state in all cases, except for s0ix and all displays off (DPMS),
1780-
* where IPS2 is allowed.
1781-
*
1782-
* When checking pmfw version, use the major and minor only.
1783-
*/
1784-
if (amdgpu_ip_version(adev, DCE_HWIP, 0) == IP_VERSION(3, 5, 0) &&
1785-
(adev->pm.fw_version & 0x00FFFF00) < 0x005D6300)
1786-
return DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF;
1774+
enum dmub_ips_disable_type ret = DMUB_IPS_ENABLE;
17871775

1788-
if (amdgpu_ip_version(adev, DCE_HWIP, 0) >= IP_VERSION(3, 5, 0))
1789-
return DMUB_IPS_ENABLE;
1776+
switch (amdgpu_ip_version(adev, DCE_HWIP, 0)) {
1777+
case IP_VERSION(3, 5, 0):
1778+
/*
1779+
* On DCN35 systems with Z8 enabled, it's possible for IPS2 + Z8 to
1780+
* cause a hard hang. A fix exists for newer PMFW.
1781+
*
1782+
* As a workaround, for non-fixed PMFW, force IPS1+RCG as the deepest
1783+
* IPS state in all cases, except for s0ix and all displays off (DPMS),
1784+
* where IPS2 is allowed.
1785+
*
1786+
* When checking pmfw version, use the major and minor only.
1787+
*/
1788+
if ((adev->pm.fw_version & 0x00FFFF00) < 0x005D6300)
1789+
ret = DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF;
1790+
else if (amdgpu_ip_version(adev, GC_HWIP, 0) > IP_VERSION(11, 5, 0))
1791+
/*
1792+
* Other ASICs with DCN35 that have residency issues with
1793+
* IPS2 in idle.
1794+
* We want them to use IPS2 only in display off cases.
1795+
*/
1796+
ret = DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF;
1797+
break;
1798+
case IP_VERSION(3, 5, 1):
1799+
ret = DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF;
1800+
break;
1801+
default:
1802+
/* ASICs older than DCN35 do not have IPSs */
1803+
if (amdgpu_ip_version(adev, DCE_HWIP, 0) < IP_VERSION(3, 5, 0))
1804+
ret = DMUB_IPS_DISABLE_ALL;
1805+
break;
1806+
}
17901807

1791-
/* ASICs older than DCN35 do not have IPSs */
1792-
return DMUB_IPS_DISABLE_ALL;
1808+
return ret;
17931809
}
17941810

17951811
static int amdgpu_dm_init(struct amdgpu_device *adev)

0 commit comments

Comments
 (0)