All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/cmdparser: Limit clflush to active cachelines
@ 2017-03-10  9:42 Chris Wilson
  2017-03-10  9:58 ` Mika Kuoppala
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Chris Wilson @ 2017-03-10  9:42 UTC (permalink / raw)
  To: intel-gfx

We only need to clflush those cachelines that we have validated to be
read by the GPU. Userspace typically fills the batch length in
correctly, the exceptions tend to be explicit tests within igt.

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

diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index 21b1cd917d81..b9ce9a6881ea 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -1331,7 +1331,8 @@ int intel_engine_cmd_parser(struct intel_engine_cs *engine,
 	}
 
 	if (ret == 0 && needs_clflush_after)
-		drm_clflush_virt_range(shadow_batch_obj->mm.mapping, batch_len);
+		drm_clflush_virt_range(shadow_batch_obj->mm.mapping,
+				       (void *)cmd - shadow_batch_obj->mm.mapping);
 	i915_gem_object_unpin_map(shadow_batch_obj);
 
 	return ret;
-- 
2.11.0

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-03-10 13:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10  9:42 [PATCH] drm/i915/cmdparser: Limit clflush to active cachelines Chris Wilson
2017-03-10  9:58 ` Mika Kuoppala
2017-03-10 10:04   ` Chris Wilson
2017-03-10 10:19     ` Chris Wilson
2017-03-10 10:26       ` Mika Kuoppala
2017-03-10 10:39         ` Chris Wilson
2017-03-10 10:42           ` Mika Kuoppala
2017-03-10 10:50             ` Chris Wilson
2017-03-10 10:46 ` [PATCH v2] " Chris Wilson
2017-03-10 11:19   ` Mika Kuoppala
2017-03-10 11:39     ` Chris Wilson
2017-03-10 11:55 ` [PATCH v3] " Chris Wilson
2017-03-10 12:41   ` Mika Kuoppala
2017-03-10 13:19     ` Chris Wilson

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.