drm/i915: update the QGV point frequency calculations
authorVinod Govindapillai <vinod.govindapillai@intel.com>
Tue, 6 Jun 2023 09:35:04 +0000 (12:35 +0300)
committerRadhakrishna Sripada <radhakrishna.sripada@intel.com>
Wed, 7 Jun 2023 18:24:37 +0000 (11:24 -0700)
commit39bea0ff0f7470a5a812f50b2485d2380759e19b
tree57634fb8f470c65f8a6191fddbbc4583300600c5
parent626765bb4b2e732e9a1595fc801f696dbde12db9
drm/i915: update the QGV point frequency calculations

From MTL onwwards, pcode locks the QGV point based on peak BW of
the intended QGV point passed by the driver. So the peak BW
calculation must match the value expected by the pcode. Update
the calculations as per the Bspec.

v2: use DIV_ROUND_* macro for the calculations (Ville)

v3: Use only DIV_ROUN_CLOSEST and remove divisor / 2 again

Bspec: 64636

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-3-vinod.govindapillai@intel.com
drivers/gpu/drm/i915/display/intel_bw.c