]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Ensure DMCUB idle before reset on DCN31/DCN35
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 19 Feb 2025 14:56:53 +0000 (09:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:56 +0000 (11:12 +0200)
commit81c558f4ce9524f8c7dab300183e68bec91b41e2
tree23fe777025c0c901e9a85ad4447ea1891998dba2
parent1e4b2cf520f1dca993121ad2ffd0aecbcc9dd2db
drm/amd/display: Ensure DMCUB idle before reset on DCN31/DCN35

[ Upstream commit c707ea82c79dbd1d295ec94cc6529a5248c77757 ]

[Why]
If we soft reset before halt finishes and there are outstanding
memory transactions then the memory interface may produce unexpected
results, such as out of order transactions when the firmware next runs.

These can manifest as random or unexpected load/store violations.

[How]
Increase the timeout before soft reset to ensure the DMCUB has quiesced.
This is effectively 1s maximum based on experimentation.

Use the enable bit check on DCN31 like we're doing on DCN35 and reorder
the reset writes to follow the HW programming guide.

Ensure we're reading SCRATCH7 instead of SCRATCH8 for the HALT code.
No current versions of DMCUB firmware use the SCRATCH8 boot bit to
dynamically switch where the HALT code goes to maintain backwards
compatibility with PSP.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c