All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>,
	dri-devel@lists.freedesktop.org,
	Akash Goel <akash.goel@intel.com>,
	Imre Deak <imre.deak@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jason Ekstrand <jason.ekstrand@intel.com>,
	stable@vger.kernel.org
Subject: [PATCH 01/19] drm: Restore double clflush on the last partial cacheline
Date: Thu,  5 May 2016 10:15:50 +0100	[thread overview]
Message-ID: <1462439768-8615-1-git-send-email-chris@chris-wilson.co.uk> (raw)

This effectively reverts

commit afcd950cafea6e27b739fe7772cbbeed37d05b8b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 10 15:58:01 2015 +0100

    drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range()

as we have observed issues with serialisation of the clflush operations
on Baytrail+ Atoms with partial updates. Applying the double flush on the
last cacheline forces that clflush to be ordered with respect to the
previous clflush, and the mfence then protects against prefetches crossing
the clflush boundary.

The same issue can be demonstrated in userspace with igt/gem_exec_flush.

Fixes: afcd950cafea6 (drm: Avoid the double clflush on the last cache...)
Testcase: igt/gem_concurrent_blit
Testcase: igt/gem_partial_pread_pwrite
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92845
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org
Cc: Akash Goel <akash.goel@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/drm_cache.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 6743ff7dccfa..7f4a6c550319 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -136,6 +136,7 @@ drm_clflush_virt_range(void *addr, unsigned long length)
 		mb();
 		for (; addr < end; addr += size)
 			clflushopt(addr);
+		clflushopt(end - 1); /* force serialisation */
 		mb();
 		return;
 	}
-- 
2.8.1


             reply	other threads:[~2016-05-05  9:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  9:15 Chris Wilson [this message]
2016-05-05  9:15 ` [PATCH 02/19] drm/i915/execlists: Refactor common engine setup Chris Wilson
2016-05-05 10:18   ` Tvrtko Ursulin
2016-05-05 10:33     ` Chris Wilson
2016-05-05 11:17       ` Tvrtko Ursulin
2016-05-05 11:55         ` Tvrtko Ursulin
2016-05-05  9:15 ` [PATCH 03/19] drm/i915: Store a i915 backpointer from engine, and use it Chris Wilson
2016-05-05 11:15   ` Tvrtko Ursulin
2016-05-05 11:26     ` Chris Wilson
2016-05-05 11:37     ` [PATCH v2] " Chris Wilson
2016-05-05 12:54       ` Tvrtko Ursulin
2016-05-05  9:15 ` [PATCH 04/19] drm/i915/shrinker: Flush active on objects before counting Chris Wilson
2016-05-05  9:15 ` [PATCH 05/19] drm/i915: Delay queuing hangcheck to wait-request Chris Wilson
2016-05-05  9:15 ` [PATCH 06/19] drm/i915: Remove the dedicated hangcheck workqueue Chris Wilson
2016-05-05  9:15 ` [PATCH 07/19] drm/i915: Make queueing the hangcheck work inline Chris Wilson
2016-05-05  9:15 ` [PATCH 08/19] drm/i915: Slaughter the thundering i915_wait_request herd Chris Wilson
2016-05-05  9:15 ` [PATCH 09/19] drm/i915: Remove the lazy_coherency parameter from request-completed? Chris Wilson
2016-05-05  9:15 ` [PATCH 10/19] drm/i915: Use HWS for seqno tracking everywhere Chris Wilson
2016-05-05  9:16 ` [PATCH 11/19] drm/i915: Add a delay between interrupt and inspecting the final seqno (ilk) Chris Wilson
2016-05-05  9:16 ` [PATCH 12/19] drm/i915: Check the CPU cached value of seqno after waking the waiter Chris Wilson
2016-05-05  9:16 ` [PATCH 13/19] drm/i915: Only apply one barrier after a breadcrumb interrupt is posted Chris Wilson
2016-05-05  9:16 ` [PATCH 14/19] drm/i915: Stop setting wraparound seqno on initialisation Chris Wilson
2016-05-05  9:16 ` [PATCH 15/19] drm/i915: Only query timestamp when measuring elapsed time Chris Wilson
2016-05-05  9:16 ` [PATCH 16/19] drm/i915: Convert trace-irq to the breadcrumb waiter Chris Wilson
2016-05-05  9:16 ` [PATCH 17/19] drm/i915: Move the get/put irq locking into the caller Chris Wilson
2016-05-05  9:16 ` [PATCH 18/19] drm/i915: Simplify enabling user-interrupts with L3-remapping Chris Wilson
2016-05-05  9:16 ` [PATCH 19/19] drm/i915: Remove debug noise on detecting fault-injection of missed interrupts 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=1462439768-8615-1-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=akash.goel@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jason.ekstrand@intel.com \
    --cc=stable@vger.kernel.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.