drm/i915: modify max_bw to return index to intel_bw_info
authorVinod Govindapillai <vinod.govindapillai@intel.com>
Tue, 6 Jun 2023 09:35:07 +0000 (12:35 +0300)
committerRadhakrishna Sripada <radhakrishna.sripada@intel.com>
Wed, 7 Jun 2023 18:24:39 +0000 (11:24 -0700)
commit6400c215a1c19e40bab513b20d35780e61b291f5
tree18a9f50f1b1e30fca4634287d1c2c3e74717ce87
parent463cc9402e71deead30bd85335c56a98a1c1c462
drm/i915: modify max_bw to return index to intel_bw_info

MTL uses the peak BW of a QGV point to lock the required QGV
point instead of the QGV index. Instead of passing the deratedbw
of the selected bw_info, return the index to the selected
bw_info so that either deratedbw or peakbw can be used based on
the platform.

v2: use idx to store index returned by max_bw_index functions

v3: return UINT_MAX in icl_max_bw_index in case no match found

v3: check idx >= ARRAY_SIZE

Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230606093509.221709-6-vinod.govindapillai@intel.com
drivers/gpu/drm/i915/display/intel_bw.c