drm/amd/display: Add FPU wrappers to dcn21_validate_bandwidth()
authorJan Kokemüller <jan.kokemueller@gmail.com>
Thu, 11 Feb 2021 18:28:43 +0000 (19:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:26 +0000 (11:38 +0100)
commit9d0da9afeb2862192e4495e486411d8c7cf89fc0
tree9d0a276ad6584ffc4cb4d1bae3cce44493013b99
parent49b1b5b10009678b1656734658cf82320bdb0294
drm/amd/display: Add FPU wrappers to dcn21_validate_bandwidth()

commit 41401ac67791810dd880345962339aa1bedd3c0d upstream.

dcn21_validate_bandwidth() calls functions that use floating point math.
On my machine this sometimes results in simd exceptions when there are
other FPU users such as KVM virtual machines running. The screen freezes
completely in this case.

Wrapping the function with DC_FP_START()/DC_FP_END() seems to solve the
problem. This mirrors the approach used for dcn20_validate_bandwidth.

Tested on a AMD Ryzen 7 PRO 4750U (Renoir).

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206987
Signed-off-by: Jan Kokemüller <jan.kokemueller@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c