Commit 1de8c33b authored by Logatharshan Thothiralingam's avatar Logatharshan Thothiralingam Committed by Alex Deucher

drm/amd/display: Fixed bandwidth calculation error when converting fractions

[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
Signed-off-by: default avatarLogatharshan Thothiralingam <logatharshan.thothiralingam@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a783e7b5
......@@ -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))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment