Skip to content

Commit 6544458

Browse files
leo-sunli1alexdeucher
authored andcommitted
drm/amd/display: Determine IPS mode by ASIC and PMFW versions
[Why] DCN IPS interoperates with other system idle power features, such as Zstates. On DCN35, there is a known issue where system Z8 + DCN IPS2 causes a hard hang. We observe this on systems where the SBIOS allows Z8. Though there is a SBIOS fix, there's no guarantee that users will get it any time soon, or even install it. A workaround is needed to prevent this from rearing its head in the wild. [How] For DCN35, check the pmfw version to determine whether the SBIOS has the fix. If not, set IPS1+RCG as the deepest possible state in all cases except for s0ix and display off (DPMS). Otherwise, enable all IPS Signed-off-by: Leo Li <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 28d43d0) Cc: [email protected]
1 parent 431c164 commit 6544458

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,6 +1752,30 @@ static struct dml2_soc_bb *dm_dmub_get_vbios_bounding_box(struct amdgpu_device *
17521752
return bb;
17531753
}
17541754

1755+
static enum dmub_ips_disable_type dm_get_default_ips_mode(
1756+
struct amdgpu_device *adev)
1757+
{
1758+
/*
1759+
* On DCN35 systems with Z8 enabled, it's possible for IPS2 + Z8 to
1760+
* cause a hard hang. A fix exists for newer PMFW.
1761+
*
1762+
* As a workaround, for non-fixed PMFW, force IPS1+RCG as the deepest
1763+
* IPS state in all cases, except for s0ix and all displays off (DPMS),
1764+
* where IPS2 is allowed.
1765+
*
1766+
* When checking pmfw version, use the major and minor only.
1767+
*/
1768+
if (amdgpu_ip_version(adev, DCE_HWIP, 0) == IP_VERSION(3, 5, 0) &&
1769+
(adev->pm.fw_version & 0x00FFFF00) < 0x005D6300)
1770+
return DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF;
1771+
1772+
if (amdgpu_ip_version(adev, DCE_HWIP, 0) >= IP_VERSION(3, 5, 0))
1773+
return DMUB_IPS_ENABLE;
1774+
1775+
/* ASICs older than DCN35 do not have IPSs */
1776+
return DMUB_IPS_DISABLE_ALL;
1777+
}
1778+
17551779
static int amdgpu_dm_init(struct amdgpu_device *adev)
17561780
{
17571781
struct dc_init_data init_data;
@@ -1863,7 +1887,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
18631887
if (amdgpu_dc_debug_mask & DC_DISABLE_IPS)
18641888
init_data.flags.disable_ips = DMUB_IPS_DISABLE_ALL;
18651889
else
1866-
init_data.flags.disable_ips = DMUB_IPS_ENABLE;
1890+
init_data.flags.disable_ips = dm_get_default_ips_mode(adev);
18671891

18681892
init_data.flags.disable_ips_in_vpb = 0;
18691893

0 commit comments

Comments
 (0)