i915/pmu: Move execlist stats initialization to execlist specific setup
authorjsg <jsg@openbsd.org>
Mon, 9 Oct 2023 02:23:51 +0000 (02:23 +0000)
committerjsg <jsg@openbsd.org>
Mon, 9 Oct 2023 02:23:51 +0000 (02:23 +0000)
From Umesh Nerlige Ramappa
987a7f5311ba1fd4ccf3637c09e6424741aacd01 in linux-6.1.y/6.1.56
c524cd40e8a2a1a36f4898eaf2024beefeb815f3 in mainline linux

sys/dev/pci/drm/i915/gt/intel_engine_cs.c
sys/dev/pci/drm/i915/gt/intel_execlists_submission.c

index c8ae868..1b60183 100644 (file)
@@ -541,7 +541,6 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id,
                DRIVER_CAPS(i915)->has_logical_contexts = true;
 
        ewma__engine_latency_init(&engine->latency);
-       seqcount_init(&engine->stats.execlists.lock);
 
        ATOMIC_INIT_NOTIFIER_HEAD(&engine->context_status_notifier);
 
index c93b715..558a5f1 100644 (file)
@@ -3558,6 +3558,8 @@ int intel_execlists_submission_setup(struct intel_engine_cs *engine)
        logical_ring_default_vfuncs(engine);
        logical_ring_default_irqs(engine);
 
+       seqcount_init(&engine->stats.execlists.lock);
+
        if (engine->flags & I915_ENGINE_HAS_RCS_REG_STATE)
                rcs_submission_override(engine);