Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Stanislav Lisovskiy and committed by
Vinod Govindapillai
1e9e4be8 9299cde9

+2
+2
drivers/gpu/drm/i915/display/intel_bw.c
··· 874 874 if (max_data_rate > max_bw) { 875 875 max_bw_point_mask = BIT(i); 876 876 max_bw = max_data_rate; 877 + } else if (max_data_rate == max_bw) { 878 + max_bw_point_mask |= BIT(i); 877 879 } 878 880 } 879 881