drm/amd/display: Prevent using DMUB rptr that is out-of-bounds
authorWyatt Wood <wyatt.wood@amd.com>
Tue, 21 Sep 2021 13:17:27 +0000 (09:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Oct 2021 19:23:02 +0000 (15:23 -0400)
commit64df665ffed8dc54a25ac1eedd4955eb56b08081
treec05a4a7de9f182b2ef04e3cf96d272c51b6d402b
parent519607a2f7798decb9c891a4f706aaf780f5a677
drm/amd/display: Prevent using DMUB rptr that is out-of-bounds

[Why]
Running into bugchecks during stress test where rptr is 0xFFFFFFFF.
Typically this is caused by a hard hang, and can come from HW outside
of DCN.

[How]
To prevent bugchecks when writing the DMUB rptr, fist check that the
rptr is valid.

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Solomon Chiu <solomon.chiu@amd.com>
Signed-off-by: Wyatt Wood <wyatt.wood@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/dmub_srv.h
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c