[CI 4/4] drm/i915/gt: Convert gen9+ frequency range to 50MHz increments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The RPS bins are in units of 33MHz, so if we want 50MHz increments, we
need 2/3, not 1/3!

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/gt/intel_llc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_llc.c b/drivers/gpu/drm/i915/gt/intel_llc.c
index e3f637b3650e..474d82a52859 100644
--- a/drivers/gpu/drm/i915/gt/intel_llc.c
+++ b/drivers/gpu/drm/i915/gt/intel_llc.c
@@ -67,8 +67,10 @@ static bool get_ia_constants(struct intel_llc *llc,
 	consts->max_gpu_freq = rps->max_freq;
 	if (INTEL_GEN(i915) >= 9) {
 		/* Convert GT frequency to 50 HZ units */
-		consts->min_gpu_freq /= GEN9_FREQ_SCALER;
-		consts->max_gpu_freq /= GEN9_FREQ_SCALER;
+		consts->min_gpu_freq =
+			mult_frac(consts->min_gpu_freq, 2, GEN9_FREQ_SCALER);
+		consts->max_gpu_freq =
+			mult_frac(consts->max_gpu_freq, 2, GEN9_FREQ_SCALER);
 	}
 
 	return true;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux