drm/amd/display: Fix psr static frames calculation
authorRoman Li <roman.li@amd.com>
Tue, 14 Jan 2020 18:56:08 +0000 (13:56 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Feb 2020 17:10:41 +0000 (12:10 -0500)
commit7aa62404dfdefd759e6a5f8923a0b0704729295f
tree4e335a71dff37a09321e85d7a396ec2a8d2fe18b
parentbb6d3fb354c5ee8d6bde2d576eb7220ea09862b9
drm/amd/display: Fix psr static frames calculation

[Why]
Driver crash with psr feature enabled due to divide-by-zero error.
This is a regression after rework to calculate static screen frame
number entry time.

[How]
Correct order of operations to avoid divide-by-zero.

Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Zhan Liu <Zhan.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c