[PATCH 02/17] drm/amd/display: Fixed bandwidth calculation error when converting fractions
Harry Wentland
harry.wentland at amd.com
Wed Mar 22 17:04:49 UTC 2017
From: Logatharshan Thothiralingam <logatharshan.thothiralingam at amd.com>
[Problem]
VSR greyed out
[Root cause]
When converting fractions, we were using the integer function, which let to
a large display clock and the view was not supported
[Solution]
Change the integer to fraction functions
Change-Id: I28d7d236462774f43dce2f30b8b6056e17bf802f
Signed-off-by: Logatharshan Thothiralingam <logatharshan.thothiralingam at amd.com>
Acked-by: Harry Wentland <Harry.Wentland at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
---
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
index c855e49eb116..e47794398942 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
@@ -796,11 +796,11 @@ static void calculate_bandwidth(
}
else if (bw_leq(data->vsr[i], bw_int_to_fixed(1))) {
data->lb_lines_in_per_line_out_in_middle_of_frame[i] = bw_int_to_fixed(1);
- }
- else if (bw_leq(data->vsr[i], bw_int_to_fixed(4 / 3))) {
+ } else if (bw_leq(data->vsr[i],
+ bw_frc_to_fixed(4, 3))) {
data->lb_lines_in_per_line_out_in_middle_of_frame[i] = bw_div(bw_int_to_fixed(4), bw_int_to_fixed(3));
- }
- else if (bw_leq(data->vsr[i], bw_int_to_fixed(6 / 4))) {
+ } else if (bw_leq(data->vsr[i],
+ bw_frc_to_fixed(6, 4))) {
data->lb_lines_in_per_line_out_in_middle_of_frame[i] = bw_div(bw_int_to_fixed(6), bw_int_to_fixed(4));
}
else if (bw_leq(data->vsr[i], bw_int_to_fixed(2))) {
--
2.11.0
More information about the amd-gfx
mailing list