summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGeorge Shen <george.shen@amd.com>2022-10-07 19:43:26 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-11-03 00:16:25 +0300
commitbad610c97c08eef3ed1fa769a8b08b94f95b451e (patch)
tree8830f790bee8eab1f31f703a6a42869ba6b97edb /drivers
parent8fe8ce896c1cc29d6bfebb3c7b3cc948f72cd32c (diff)
downloadlinux-bad610c97c08eef3ed1fa769a8b08b94f95b451e.tar.xz
drm/amd/display: Fix DCN32 DSC delay calculation
[Why] DCN32 DSC delay calculation had an unintentional integer division, resulting in a mismatch against the DML spreadsheet. [How] Cast numerator to double before performing the division. Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com> Acked-by: Alex Hung <alex.hung@amd.com> Signed-off-by: George Shen <george.shen@amd.com> Tested-by: Mark Broadworth <mark.broadworth@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
index ad66e241f9ae..4a3e7a5d2758 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
@@ -1746,7 +1746,7 @@ unsigned int dml32_DSCDelayRequirement(bool DSCEnabled,
}
DSCDelayRequirement_val = DSCDelayRequirement_val + (HTotal - HActive) *
- dml_ceil(DSCDelayRequirement_val / HActive, 1);
+ dml_ceil((double)DSCDelayRequirement_val / HActive, 1);
DSCDelayRequirement_val = DSCDelayRequirement_val * PixelClock / PixelClockBackEnd;