This was removed in commit 478ffad6d690 ("drm/i915: drop engine_pin/unpin_breadcrumbs_irq") as the last user had been removed, but now there is a promise of a new user in the next patch. Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_breadcrumbs.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c index ac1e5f6c3c2c..97bcfb957f3d 100644 --- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c @@ -334,6 +334,24 @@ void intel_breadcrumbs_reset(struct intel_breadcrumbs *b) spin_unlock_irqrestore(&b->irq_lock, flags); } +void intel_breadcrumbs_pin_irq(struct intel_breadcrumbs *b) +{ + spin_lock_irq(&b->irq_lock); + if (!b->irq_enabled++) + irq_enable(b->irq_engine); + GEM_BUG_ON(!b->irq_enabled); /* no overflow! */ + spin_unlock_irq(&b->irq_lock); +} + +void intel_breadcrumbs_unpin_irq(struct intel_breadcrumbs *b) +{ + spin_lock_irq(&b->irq_lock); + GEM_BUG_ON(!b->irq_enabled); /* no underflow! */ + if (!--b->irq_enabled) + irq_disable(b->irq_engine); + spin_unlock_irq(&b->irq_lock); +} + void intel_breadcrumbs_park(struct intel_breadcrumbs *b) { /* Kick the work once more to drain the signalers */ diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.h b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.h index ed3d1deabfbd..94400903e1d0 100644 --- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.h +++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.h @@ -18,6 +18,9 @@ struct intel_breadcrumbs * intel_breadcrumbs_create(struct intel_engine_cs *irq_engine); void intel_breadcrumbs_free(struct intel_breadcrumbs *b); +void intel_breadcrumbs_pin_irq(struct intel_breadcrumbs *b); +void intel_breadcrumbs_unpin_irq(struct intel_breadcrumbs *b); + void intel_breadcrumbs_reset(struct intel_breadcrumbs *b); void intel_breadcrumbs_park(struct intel_breadcrumbs *b); -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx