drm/i915/display: handle systems with duplicate psf gv points
authorStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Fri, 5 Apr 2024 11:35:32 +0000 (14:35 +0300)
committerVinod Govindapillai <vinod.govindapillai@intel.com>
Fri, 19 Apr 2024 13:11:31 +0000 (16:11 +0300)
commit1e9e4be8d683e192aa1f524c5cc554e9e50d1262
tree9fa5e9b8cbff85ae8a16d4b84cd4f8fa1f5973c6
parent9299cde973d708063e4f0728d2f493fd36eddf96
drm/i915/display: handle systems with duplicate psf gv points

There could be multiple qgv and psf gv points with similar values.
Apparently pcode's handling of psf and qgv points are different. For
qgv case, pcode sets whatever is asked by the driver. But in case
of psf gv points, it compares the bw from points before setting the
mask. This can cause problems in scenarios where we have to disable
sagv by setting the highest bw point and there could be multiple
points with highest bw. So to set the maximum psf gv point, find
out all the points with the highest bw and set all together.

v1: - use the same treatment to qgv points as well (Vinod)

v2: - pcode confirms that for qgv points, it sets whatever the
      driver sets (Vinod)

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405113533.338553-6-vinod.govindapillai@intel.com
drivers/gpu/drm/i915/display/intel_bw.c