From: Michał Winiarski Date: Tue, 23 May 2017 10:23:59 +0000 (+0200) Subject: drm/i915/guc: Skip port assign on first iteration of GuC dequeue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f63078abff0d2927c2f58f22b1082520def70865;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915/guc: Skip port assign on first iteration of GuC dequeue 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 Cc: Michał Wajdeczko Cc: Mika Kuoppala Cc: Tvrtko Ursulin Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/20170523102400.9614-2-michal.winiarski@intel.com Signed-off-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c index 777f48e9bb33..e6e0c6ef1084 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++; }