drm/amd/display: Reset DMUB mailbox SW state after HW reset
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Fri, 20 Jan 2023 16:14:30 +0000 (11:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Jan 2023 19:03:36 +0000 (14:03 -0500)
commit4b0b4c17f5f6d4df40f2f79068909236858d61e0
tree4a182c341c9bea8716fe3bb933772b3706bd32fa
parentcf76ce68c214b78bf151e84abaa0a2704fd38574
drm/amd/display: Reset DMUB mailbox SW state after HW reset

[Why]
Otherwise we can be out of sync with what's in the hardware, leading
to us rerunning every command that's presently in the ringbuffer.

[How]
Reset software state for the mailboxes in hw_reset callback.
This is already done as part of the mailbox init in hw_init, but we
do need to remember to reset the last cached wptr value as well here.

Reviewed-by: Hansen Dsouza <hansen.dsouza@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c