From: Ville Syrjälä <[email protected]>

For some reason we're tracking the best max_data_rate
as the difference between the required data_rate and
max_data_rate. That's pointlessly complicated as we're
just looking for the minimum max_data_rate that is
greater or equal to data_rate.

Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_bw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bw.c 
b/drivers/gpu/drm/i915/display/intel_bw.c
index 423cae2ff208..41539fdfeac5 100644
--- a/drivers/gpu/drm/i915/display/intel_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_bw.c
@@ -1112,8 +1112,8 @@ static int mtl_find_qgv_points(struct intel_display 
*display,
                if (max_data_rate < data_rate)
                        continue;
 
-               if (max_data_rate - data_rate < best_rate) {
-                       best_rate = max_data_rate - data_rate;
+               if (max_data_rate < best_rate) {
+                       best_rate = max_data_rate;
                        qgv_peak_bw = display->bw.peakbw[i];
                }
 
-- 
2.53.0

Reply via email to