diff mbox

[2/8] drm/i915/guc: Skip port assign on first iteration of GuC dequeue

Message ID 20170522220755.12400-2-michal.winiarski@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michał Winiarski May 22, 2017, 10:07 p.m. UTC
If port[0] is occupied and we're trying to dequeue request from
different context, we will inevitably hit BUG_ON in port_assign.
Let's skip it - similar to what we're doing in execlists counterpart.

Fixes: 77f0d0e925e8a0 ("drm/i915/execlists: Pack the count into the low bits of the port.request")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Chris Wilson May 23, 2017, 8:22 a.m. UTC | #1
On Tue, May 23, 2017 at 12:07:49AM +0200, Michał Winiarski wrote:
> If port[0] is occupied and we're trying to dequeue request from
> different context, we will inevitably hit BUG_ON in port_assign.
> Let's skip it - similar to what we're doing in execlists counterpart.
> 
> Fixes: 77f0d0e925e8a0 ("drm/i915/execlists: Pack the count into the low bits of the port.request")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Can you split out the first two and resend with a CI prefix + a guc
enabling patch? Let's get this fixed first.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 777f48e..e6e0c6e 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -681,7 +681,8 @@  static bool i915_guc_dequeue(struct intel_engine_cs *engine)
 					goto done;
 				}
 
-				port_assign(port, last);
+				if (submit)
+					port_assign(port, last);
 				port++;
 			}