Lines Matching full:ips
22 * Lock protecting IPS related data structures
265 rps->ips.m = cparams[i].m; in gen5_rps_init()
266 rps->ips.c = cparams[i].c; in gen5_rps_init()
287 __ips_chipset_val(struct intel_ips *ips) in __ips_chipset_val() argument
290 rps_to_uncore(container_of(ips, struct intel_rps, ips)); in __ips_chipset_val()
303 dt = now - ips->last_time1; in __ips_chipset_val()
305 return ips->chipset_power; in __ips_chipset_val()
312 delta = total - ips->last_count1; in __ips_chipset_val()
314 result = div_u64(div_u64(ips->m * delta, dt) + ips->c, 10); in __ips_chipset_val()
316 ips->last_count1 = total; in __ips_chipset_val()
317 ips->last_time1 = now; in __ips_chipset_val()
319 ips->chipset_power = result; in __ips_chipset_val()
359 static void __gen5_ips_update(struct intel_ips *ips) in __gen5_ips_update() argument
362 rps_to_uncore(container_of(ips, struct intel_rps, ips)); in __gen5_ips_update()
369 dt = now - ips->last_time2; in __gen5_ips_update()
377 delta = count - ips->last_count2; in __gen5_ips_update()
379 ips->last_count2 = count; in __gen5_ips_update()
380 ips->last_time2 = now; in __gen5_ips_update()
383 ips->gfx_power = div_u64(delta * 1181, dt * 10); in __gen5_ips_update()
389 __gen5_ips_update(&rps->ips); in gen5_rps_update()
406 /* Invert the frequency bin into an ips delay */ in gen5_rps_set()
552 rps->ips.last_count1 = intel_uncore_read(uncore, DMIEC); in gen5_rps_enable()
553 rps->ips.last_count1 += intel_uncore_read(uncore, DDREC); in gen5_rps_enable()
554 rps->ips.last_count1 += intel_uncore_read(uncore, CSIEC); in gen5_rps_enable()
555 rps->ips.last_time1 = jiffies_to_msecs(jiffies); in gen5_rps_enable()
557 rps->ips.last_count2 = intel_uncore_read(uncore, GFXEC); in gen5_rps_enable()
558 rps->ips.last_time2 = ktime_get_raw_ns(); in gen5_rps_enable()
562 rps->ips.corr = init_emon(uncore); in gen5_rps_enable()
1275 static unsigned long __ips_gfx_val(struct intel_ips *ips) in __ips_gfx_val() argument
1277 struct intel_rps *rps = container_of(ips, typeof(*rps), ips); in __ips_gfx_val()
1303 corr2 = corr * ips->corr; in __ips_gfx_val()
1308 __gen5_ips_update(ips); in __ips_gfx_val()
1310 return ips->gfx_power + state2; in __ips_gfx_val()
1911 * IPS got loaded first.
1914 * other in order for IPS to do the appropriate communication of
1934 * We only register the i915 ips part with intel-ips once everything is in intel_rps_driver_register()
1935 * set up, to avoid intel-ips sneaking in and reading bogus values. in intel_rps_driver_register()
1964 * i915_read_mch_val - return value for IPS use
1966 * Calculate and return a value for the IPS driver to use when deciding whether
1981 struct intel_ips *ips = &i915->gt.rps.ips; in i915_read_mch_val() local
1984 chipset_val = __ips_chipset_val(ips); in i915_read_mch_val()
1985 graphics_val = __ips_gfx_val(ips); in i915_read_mch_val()
1997 * Raise the limit; IPS indicates we have thermal headroom.
2023 * IPS indicates we're close to a thermal limit, so throttle back the GPU
2048 * i915_gpu_busy - indicate GPU business to IPS
2050 * Tell the IPS driver whether or not the GPU is busy.