drm/i915: Use b->irq_enable() as predicate for mock engine
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 Jan 2019 11:22:25 +0000 (11:22 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 Jan 2019 12:05:29 +0000 (12:05 +0000)
commit293f8c0f2bb4409705e4cbc7bc1b660c024e9be9
treeaf121c4295a18c079231b9ce933e5aceb363c829
parent8d714185951b04368f6695a8c01f5c9c332ac1d3
drm/i915: Use b->irq_enable() as predicate for mock engine

Since commit  d4ccceb05591 ("drm/i915/icl: Ringbuffer interrupt handling")
we have required a mechanism to avoid touching the interrupt hardware
for breadcrumbs, superseding our mock interface for selftests.

The residual problem (ideas welcome) is in probing the mock ring
registers for ring_is_idle. Hmm, maybe we should just install
mock handlers for i915->uncore.mmio__write and friends? Only problem
being is that we would to truly mock some expected reads. :(

References: d4ccceb05591 ("drm/i915/icl: Ringbuffer interrupt handling")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190118112225.13780-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_breadcrumbs.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/selftests/mock_engine.c