Message ID | F3B0350DF4CB6849A642218320DE483D7D5ACB53@SHSMSX104.ccr.corp.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Quoting Wang, Zhi A (2017-07-13 10:36:14) > Sorry, my bad for missing it as I only saw it used on CHV before your patch because of some HW issue. > > Kinda of interested in the reason why HWSP CSB gains people's interest now? :P. Anyway, it's good move to reduce the MMIO trap here. We've been chasing the elimination of mmio reads here for the last few years, since the buffer is tantalising laid out inside a cacheline and bspec says it was designed to be read in a single cacheline load. Previously I had an alias for the CSB using ioremap_cache(), which sort-of-worked (bxt was being a little unhappy) but still required a clflush. Imagine then the surprise and delight that the information we wanted was in the HWSP ever since execlists was a twinkle in the architect's eye (back in gm45!). -Chris
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index e3e9d850cf88..a259d584e1fd 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -504,6 +504,13 @@ static void intel_lrc_irq_handler(unsigned long data) &engine->status_page.page_addr[I915_HWS_CSB_BUF0_INDEX]; unsigned int head, tail; + /* However GVT emulation depends upon intercepting CSB mmio */ + if (unlikely(intel_vgpu_active(dev_priv))) { + buf = (u32 * __force)dev_priv->regs + + i915_mmio_reg_offset(RING_CONTEXT_STATUS_PTR(engine)); + engine->csb_head = -1; + } + would do the trick, though I guess it wants to test a version if GVT starts providing CSB emulation via the HWSP. -Chris _______________________________________________