mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 02:21:39 -04:00
drm/i915/bw: Simplify the best max_data_rate search
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ä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260528103458.18069-12-ville.syrjala@linux.intel.com Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user