Skip to content

Commit

Permalink
drm/i915/guc: Skip port assign on first iteration of GuC dequeue
Browse files Browse the repository at this point in the history
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: 77f0d0e ("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>
Link: http://patchwork.freedesktop.org/patch/msgid/20170523102400.9614-2-michal.winiarski@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Michał Winiarski authored and Chris Wilson committed May 23, 2017
1 parent 1d5fd00 commit f63078a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/i915_guc_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand Down

0 comments on commit f63078a

Please sign in to comment.