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: [PATCH 5/6] drm/i915: Clear the error PTE just once on finish
Date: Fri,  7 Sep 2018 12:28:55 +0100	[thread overview]
Message-ID: <20180907112856.28242-5-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20180907112856.28242-1-chris@chris-wilson.co.uk>

We do not need to continually clear our dedicated PTE for error capture
as it will be updated and invalidated to the next object. Only at the
end do we wish to be sure that the PTE doesn't point back to any buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 9789f4ff8c32..08fdf4dc200f 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -995,7 +995,6 @@ i915_error_object_create(struct drm_i915_private *i915,
 	}
 
 	compress_fini(&compress, dst);
-	ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
 	return dst;
 }
 
@@ -1781,6 +1780,14 @@ static unsigned long capture_find_epoch(const struct i915_gpu_state *error)
 	return epoch;
 }
 
+static void capture_finish(struct i915_gpu_state *error)
+{
+	struct i915_ggtt *ggtt = &error->i915->ggtt;
+	const u64 slot = ggtt->error_capture.start;
+
+	ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE);
+}
+
 static int capture(void *data)
 {
 	struct i915_gpu_state *error = data;
@@ -1805,6 +1812,7 @@ static int capture(void *data)
 
 	error->epoch = capture_find_epoch(error);
 
+	capture_finish(error);
 	return 0;
 }
 
-- 
2.19.0.rc2

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

  parent reply	other threads:[~2018-09-07 11:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 11:28 [PATCH 1/6] drm/i915: Missed interrupt simulation is no more, tell the world Chris Wilson
2018-09-07 11:28 ` [PATCH 2/6] drm/i915: Reorder execobject[] to insert non-48b objects into the low 4G Chris Wilson
2018-09-07 11:28 ` [PATCH 3/6] drm/i915: Limit number of capture objects Chris Wilson
2018-09-10 13:14   ` Mika Kuoppala
2018-09-10 13:25     ` Chris Wilson
2018-09-07 11:28 ` [PATCH 4/6] drm/i915: Handle incomplete Z_FINISH for compressed error states Chris Wilson
2018-09-07 11:28 ` Chris Wilson [this message]
2018-09-07 11:28 ` [PATCH 6/6] drm/i915: Cache the error string Chris Wilson
2018-09-07 11:38 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/6] drm/i915: Missed interrupt simulation is no more, tell the world Patchwork
2018-09-07 11:54 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-07 12:30 ` [PATCH 1/6] " Mika Kuoppala
2018-09-07 14:26 ` ✓ Fi.CI.IGT: success for series starting with [1/6] " Patchwork

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=20180907112856.28242-5-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.