提交 02f6a1e7 编写于 作者: N Naresh Kumar Kachhi 提交者: Daniel Vetter

drm/i915: warn if ring is active before sync flush

Based on Bspec the command parser must be stopped prior to
issuing sync flush. This should be done by the caller of
intel_ring_setup_status_page. Patch adds a warning if it is
not done.

v2: rebased based on new patch (wait for ring to become idle)
Signed-off-by: NNaresh Kumar Kachhi <naresh.kumar.kachhi@intel.com>
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 e9fea574
...@@ -984,6 +984,10 @@ void intel_ring_setup_status_page(struct intel_ring_buffer *ring) ...@@ -984,6 +984,10 @@ void intel_ring_setup_status_page(struct intel_ring_buffer *ring)
/* Flush the TLB for this page */ /* Flush the TLB for this page */
if (INTEL_INFO(dev)->gen >= 6) { if (INTEL_INFO(dev)->gen >= 6) {
u32 reg = RING_INSTPM(ring->mmio_base); u32 reg = RING_INSTPM(ring->mmio_base);
/* ring should be idle before issuing a sync flush*/
WARN_ON((I915_READ_MODE(ring) & MODE_IDLE) == 0);
I915_WRITE(reg, I915_WRITE(reg,
_MASKED_BIT_ENABLE(INSTPM_TLB_INVALIDATE | _MASKED_BIT_ENABLE(INSTPM_TLB_INVALIDATE |
INSTPM_SYNC_FLUSH)); INSTPM_SYNC_FLUSH));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册