diff options
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_engine_cs.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_engine_cs.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c index 2de396e34d83..332756036007 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c @@ -1915,23 +1915,6 @@ void intel_engine_dump(struct intel_engine_cs *engine, intel_engine_print_breadcrumbs(engine, m); } -static ktime_t __intel_engine_get_busy_time(struct intel_engine_cs *engine, - ktime_t *now) -{ - struct intel_engine_execlists_stats *stats = &engine->stats.execlists; - ktime_t total = stats->total; - - /* - * If the engine is executing something at the moment - * add it to the total. - */ - *now = ktime_get(); - if (READ_ONCE(stats->active)) - total = ktime_add(total, ktime_sub(*now, stats->start)); - - return total; -} - /** * intel_engine_get_busy_time() - Return current accumulated engine busyness * @engine: engine to report on @@ -1941,16 +1924,7 @@ static ktime_t __intel_engine_get_busy_time(struct intel_engine_cs *engine, */ ktime_t intel_engine_get_busy_time(struct intel_engine_cs *engine, ktime_t *now) { - struct intel_engine_execlists_stats *stats = &engine->stats.execlists; - unsigned int seq; - ktime_t total; - - do { - seq = read_seqcount_begin(&stats->lock); - total = __intel_engine_get_busy_time(engine, now); - } while (read_seqcount_retry(&stats->lock, seq)); - - return total; + return engine->busyness(engine, now); } struct intel_context * |