All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: make forwarding of VBlanks conditional
@ 2016-06-17 13:42 Dave Gordon
  2016-06-17 13:51 ` Ville Syrjälä
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dave Gordon @ 2016-06-17 13:42 UTC (permalink / raw)
  To: intel-gfx; +Cc: Harsh Chheda

Apparently we shouldn't forward VBlanks to the GuC unconditionally,
as it may trigger a race condition in the GuC's internal dispatcher.

From an internal message from Harsh Chheda <harsh.j.chheda@intel.com>
>
> If the context has switched out the [GuC] scheduler should know so
> that it can  put the context in wait state and schedule something
> else.  If the context which is waiting on Vblank is still on the CS
> then [the GuC] scheduler does not need to know. If in this case wait
> on Vblank is sent to Guc while the context is still on CS there is
> an edge condition when the Vblank may get satisfied right after
> sending interrupt to guc and context may complete. Scheduler will
> then incorrectly mark the context to be in wait state.

So we need to change this register setting to GFX_FORWARD_VBLANK_COND.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Cc: Harsh Chheda <harsh.j.chheda@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 8fe96a2..af9f51e 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -106,7 +106,7 @@ static void direct_interrupts_to_guc(struct drm_i915_private *dev_priv)
 	u32 tmp;
 
 	/* tell all command streamers to forward interrupts and vblank to GuC */
-	irqs = _MASKED_FIELD(GFX_FORWARD_VBLANK_MASK, GFX_FORWARD_VBLANK_ALWAYS);
+	irqs = _MASKED_FIELD(GFX_FORWARD_VBLANK_MASK, GFX_FORWARD_VBLANK_COND);
 	irqs |= _MASKED_BIT_ENABLE(GFX_INTERRUPT_STEERING);
 	for_each_engine(engine, dev_priv)
 		I915_WRITE(RING_MODE_GEN7(engine), irqs);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-06-20 12:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 13:42 [PATCH] drm/i915/guc: make forwarding of VBlanks conditional Dave Gordon
2016-06-17 13:51 ` Ville Syrjälä
2016-06-17 14:14   ` Daniel Vetter
2016-06-17 15:00     ` Ville Syrjälä
2016-06-20 10:23       ` [PATCH] drm/i915/guc: don't ever forward VBlank to the GuC Dave Gordon
2016-06-20 12:58         ` Daniel Vetter
2016-06-20 12:57       ` [PATCH] drm/i915/guc: make forwarding of VBlanks conditional Daniel Vetter
2016-06-17 14:37 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-06-20 10:41 ` ✓ Ro.CI.BAT: success for drm/i915/guc: make forwarding of VBlanks conditional (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.