Lines Matching full:ips
21 * Lock protecting IPS related data structures
280 rps->ips.m = cparams[i].m; in gen5_rps_init()
281 rps->ips.c = cparams[i].c; in gen5_rps_init()
302 __ips_chipset_val(struct intel_ips *ips) in __ips_chipset_val() argument
305 rps_to_uncore(container_of(ips, struct intel_rps, ips)); in __ips_chipset_val()
318 dt = now - ips->last_time1; in __ips_chipset_val()
320 return ips->chipset_power; in __ips_chipset_val()
327 delta = total - ips->last_count1; in __ips_chipset_val()
329 result = div_u64(div_u64(ips->m * delta, dt) + ips->c, 10); in __ips_chipset_val()
331 ips->last_count1 = total; in __ips_chipset_val()
332 ips->last_time1 = now; in __ips_chipset_val()
334 ips->chipset_power = result; in __ips_chipset_val()
374 static void __gen5_ips_update(struct intel_ips *ips) in __gen5_ips_update() argument
377 rps_to_uncore(container_of(ips, struct intel_rps, ips)); in __gen5_ips_update()
384 dt = now - ips->last_time2; in __gen5_ips_update()
392 delta = count - ips->last_count2; in __gen5_ips_update()
394 ips->last_count2 = count; in __gen5_ips_update()
395 ips->last_time2 = now; in __gen5_ips_update()
398 ips->gfx_power = div_u64(delta * 1181, dt * 10); in __gen5_ips_update()
404 __gen5_ips_update(&rps->ips); in gen5_rps_update()
411 /* Invert the frequency bin into an ips delay */ in gen5_invert_freq()
431 /* Invert the frequency bin into an ips delay */ in __gen5_rps_set()
588 rps->ips.last_count1 = intel_uncore_read(uncore, DMIEC); in gen5_rps_enable()
589 rps->ips.last_count1 += intel_uncore_read(uncore, DDREC); in gen5_rps_enable()
590 rps->ips.last_count1 += intel_uncore_read(uncore, CSIEC); in gen5_rps_enable()
591 rps->ips.last_time1 = jiffies_to_msecs(jiffies); in gen5_rps_enable()
593 rps->ips.last_count2 = intel_uncore_read(uncore, GFXEC); in gen5_rps_enable()
594 rps->ips.last_time2 = ktime_get_raw_ns(); in gen5_rps_enable()
602 rps->ips.corr = init_emon(uncore); in gen5_rps_enable()
1318 static unsigned long __ips_gfx_val(struct intel_ips *ips) in __ips_gfx_val() argument
1320 struct intel_rps *rps = container_of(ips, typeof(*rps), ips); in __ips_gfx_val()
1346 corr2 = div_u64(corr, 100000) * ips->corr; in __ips_gfx_val()
1351 __gen5_ips_update(ips); in __ips_gfx_val()
1353 return ips->gfx_power + state2; in __ips_gfx_val()
2153 * IPS got loaded first.
2156 * other in order for IPS to do the appropriate communication of
2176 * We only register the i915 ips part with intel-ips once everything is in intel_rps_driver_register()
2177 * set up, to avoid intel-ips sneaking in and reading bogus values. in intel_rps_driver_register()
2206 * i915_read_mch_val - return value for IPS use
2208 * Calculate and return a value for the IPS driver to use when deciding whether
2223 struct intel_ips *ips = &i915->gt.rps.ips; in i915_read_mch_val() local
2226 chipset_val = __ips_chipset_val(ips); in i915_read_mch_val()
2227 graphics_val = __ips_gfx_val(ips); in i915_read_mch_val()
2239 * Raise the limit; IPS indicates we have thermal headroom.
2265 * IPS indicates we're close to a thermal limit, so throttle back the GPU
2290 * i915_gpu_busy - indicate GPU business to IPS
2292 * Tell the IPS driver whether or not the GPU is busy.