Lines Matching +full:de +full:- +full:active

1 // SPDX-License-Identifier: GPL-2.0
25 return *a - *b; in cmp_u64()
76 struct intel_engine_cs *engine = ce->engine; in __measure_timestamps()
77 u32 *sema = memset32(engine->status_page.addr + 1000, 0, 5); in __measure_timestamps()
78 u32 offset = i915_ggtt_offset(engine->status_page.vma); in __measure_timestamps()
96 cs = emit_srm(cs, RING_TIMESTAMP(engine->mmio_base), offset + 4000); in __measure_timestamps()
97 cs = emit_srm(cs, RING_CTX_TIMESTAMP(engine->mmio_base), offset + 4004); in __measure_timestamps()
102 cs = emit_srm(cs, RING_TIMESTAMP(engine->mmio_base), offset + 4016); in __measure_timestamps()
103 cs = emit_srm(cs, RING_CTX_TIMESTAMP(engine->mmio_base), offset + 4012); in __measure_timestamps()
121 *dt = local_clock() - *dt; in __measure_timestamps()
127 return -ETIME; in __measure_timestamps()
132 engine->name, sema[1], sema[3], sema[0], sema[4]); in __measure_timestamps()
134 *d_ctx = sema[3] - sema[1]; in __measure_timestamps()
135 *d_ring = sema[4] - sema[0]; in __measure_timestamps()
163 engine->name, dt, in __live_engine_timestamps()
164 intel_gt_clock_interval_to_ns(engine->gt, d_ctx), in __live_engine_timestamps()
165 intel_gt_clock_interval_to_ns(engine->gt, d_ring)); in __live_engine_timestamps()
167 d_ring = intel_gt_clock_interval_to_ns(engine->gt, d_ring); in __live_engine_timestamps()
170 engine->name); in __live_engine_timestamps()
171 return -EINVAL; in __live_engine_timestamps()
177 d_ctx *= engine->gt->clock_frequency; in __live_engine_timestamps()
178 if (GRAPHICS_VER(engine->i915) == 11) in __live_engine_timestamps()
181 d_ring *= engine->gt->clock_frequency; in __live_engine_timestamps()
185 engine->name); in __live_engine_timestamps()
186 return -EINVAL; in __live_engine_timestamps()
203 if (GRAPHICS_VER(gt->i915) < 8) in live_engine_timestamps()
233 dt = ktime_get() - start; in __spin_until_busier()
235 pr_err("active wait timed out %lld\n", dt); in __spin_until_busier()
236 ENGINE_TRACE(engine, "active wait time out %lld\n", dt); in __spin_until_busier()
237 return -ETIME; in __spin_until_busier()
253 * Check that if an engine supports busy-stats, they tell the truth. in live_engine_busy_stats()
257 return -ENOMEM; in live_engine_busy_stats()
263 ktime_t de, dt; in live_engine_busy_stats() local
273 err = -EBUSY; in live_engine_busy_stats()
281 de = intel_engine_get_busy_time(engine, &t[0]); in live_engine_busy_stats()
283 de = ktime_sub(intel_engine_get_busy_time(engine, &t[1]), de); in live_engine_busy_stats()
286 if (de < 0 || de > 10) { in live_engine_busy_stats()
288 engine->name, in live_engine_busy_stats()
289 de, (int)div64_u64(100 * de, dt), dt); in live_engine_busy_stats()
291 err = -EINVAL; in live_engine_busy_stats()
297 engine->kernel_context, in live_engine_busy_stats()
307 intel_gt_set_wedged(engine->gt); in live_engine_busy_stats()
308 err = -ETIME; in live_engine_busy_stats()
320 de = intel_engine_get_busy_time(engine, &t[0]); in live_engine_busy_stats()
322 de = ktime_sub(intel_engine_get_busy_time(engine, &t[1]), de); in live_engine_busy_stats()
325 if (100 * de < 95 * dt || 95 * de > 100 * dt) { in live_engine_busy_stats()
327 engine->name, in live_engine_busy_stats()
328 de, (int)div64_u64(100 * de, dt), dt); in live_engine_busy_stats()
330 err = -EINVAL; in live_engine_busy_stats()
337 if (igt_flush_test(gt->i915)) in live_engine_busy_stats()
338 err = -EIO; in live_engine_busy_stats()
344 if (igt_flush_test(gt->i915)) in live_engine_busy_stats()
345 err = -EIO; in live_engine_busy_stats()
362 return -EBUSY; in live_engine_pm()
369 for (p = igt_atomic_phases; p->name; p++) { in live_engine_pm()
387 p->critical_section_begin(); in live_engine_pm()
390 engine->name, p->name); in live_engine_pm()
394 p->critical_section_end(); in live_engine_pm()
400 engine->name); in live_engine_pm()
401 return -EINVAL; in live_engine_pm()
407 return -EINVAL; in live_engine_pm()