All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [CI 9/9] drm/i915/execlists: Prevent merging requests with conflicting flags
Date: Thu, 10 Oct 2019 20:48:51 +0100	[thread overview]
Message-ID: <20191010194851.26592-9-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20191010194851.26592-1-chris@chris-wilson.co.uk>

We set out-of-bound parameters inside the i915_requests.flags field,
such as disabling preemption or marking the end-of-context. We should
not coalesce consecutive requests if they have differing instructions
as we only inspect the last active request in a context. Thus if we
allow a later request to be merged into the same execution context, it
will mask any of the earlier flags.

References: 2a98f4e65bba ("drm/i915: add infrastructure to hold off preemption on a request")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 9666d51b7e97..7b43c1852776 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1184,6 +1184,9 @@ static bool can_merge_rq(const struct i915_request *prev,
 	if (i915_request_completed(next))
 		return true;
 
+	if (unlikely(prev->flags ^ next->flags) & I915_REQUEST_NOPREEMPT)
+		return false;
+
 	if (!can_merge_ctx(prev->hw_context, next->hw_context))
 		return false;
 
-- 
2.23.0

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

  parent reply	other threads:[~2019-10-10 19:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 19:48 [CI 1/9] drm/i915/perf: Replace global wakeref tracking with engine-pm Chris Wilson
2019-10-10 19:48 ` [CI 2/9] drm/i915/perf: introduce a versioning of the i915-perf uapi Chris Wilson
2019-10-10 19:48 ` [CI 3/9] drm/i915/perf: allow for CS OA configs to be created lazily Chris Wilson
2019-10-10 19:48 ` [CI 4/9] drm/i915: add support for perf configuration queries Chris Wilson
2019-10-10 19:48 ` [CI 5/9] drm/i915/perf: implement active wait for noa configurations Chris Wilson
2019-10-10 20:24   ` [PATCH] " Chris Wilson
2019-10-10 19:48 ` [CI 6/9] drm/i915/perf: execute OA configuration from command stream Chris Wilson
2019-10-10 19:48 ` [CI 7/9] drm/i915/perf: Allow dynamic reconfiguration of the OA stream Chris Wilson
2019-10-10 20:22   ` [PATCH] " Chris Wilson
2019-10-10 21:23   ` Chris Wilson
2019-10-11 13:25     ` Lionel Landwerlin
2019-10-10 19:48 ` [CI 8/9] drm/i915/perf: allow holding preemption on filtered ctx Chris Wilson
2019-10-10 19:48 ` Chris Wilson [this message]
2019-10-10 20:22 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/9] drm/i915/perf: Replace global wakeref tracking with engine-pm Patchwork
2019-10-10 20:53 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/9] drm/i915/perf: Replace global wakeref tracking with engine-pm (rev3) Patchwork
2019-10-10 21:03 ` ✓ Fi.CI.BAT: success for series starting with [CI,1/9] drm/i915/perf: Replace global wakeref tracking with engine-pm Patchwork
2019-10-10 21:14 ` ✓ Fi.CI.BAT: success for series starting with [CI,1/9] drm/i915/perf: Replace global wakeref tracking with engine-pm (rev3) Patchwork
2019-10-10 22:14 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/9] drm/i915/perf: Replace global wakeref tracking with engine-pm (rev4) Patchwork
2019-10-10 22:47 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-11 10:54 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-10-11 19:03 [CI 1/9] drm/i915/perf: Replace global wakeref tracking with engine-pm Chris Wilson
2019-10-11 19:03 ` [CI 9/9] drm/i915/execlists: Prevent merging requests with conflicting flags Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010194851.26592-9-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.