From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>,
Mika Kuoppala <mika.kuoppala@intel.com>
Subject: [PATCH v3 2/2] drm/i915/bxt: don't allow cached GEM mappings on A stepping
Date: Fri, 14 Aug 2015 18:43:30 +0300 [thread overview]
Message-ID: <1439567010-29312-1-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1439555937-8016-3-git-send-email-imre.deak@intel.com>
Due to a coherency issue on BXT A steppings we can't guarantee a
coherent view of cached (CPU snooped) GPU mappings, so fail such
requests. User space is supposed to fall back to uncached mappings in
this case.
v2:
- limit the WA to A steppings, on later stepping this HW issue is fixed
v3:
- return error instead of trying to work around the issue in kernel,
since that could confuse user space (Chris)
Testcast: igt/gem_store_dword_batches_loop/cached-mapping
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 407b6b3..95fd4ff 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3742,6 +3742,15 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void *data,
level = I915_CACHE_NONE;
break;
case I915_CACHING_CACHED:
+ /*
+ * Due to a HW issue on BXT A stepping, GPU stores via a
+ * snooped mapping may leave stale data in a corresponding CPU
+ * cacheline, whereas normally such cachelines would get
+ * invalidated.
+ */
+ if (IS_BROXTON(dev) && INTEL_REVID(dev) < BXT_REVID_B0)
+ return -ENODEV;
+
level = I915_CACHE_LLC;
break;
case I915_CACHING_DISPLAY:
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-08-14 15:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 12:38 [PATCH v2 0/2] drm/i915/bxt: work around HW coherency issue Imre Deak
2015-08-14 12:38 ` [PATCH v2 1/2] drm/i915/bxt: work around HW coherency issue when accessing GPU seqno Imre Deak
2015-08-14 13:12 ` Chris Wilson
2015-08-14 13:31 ` Imre Deak
2015-08-14 15:35 ` [PATCH v3 " Imre Deak
2015-08-14 16:21 ` Chris Wilson
2015-08-14 12:38 ` [PATCH v2 2/2] drm/i915/bxt: work around HW coherency issue for cached GEM mappings Imre Deak
2015-08-14 13:11 ` Chris Wilson
2015-08-14 13:29 ` Imre Deak
2015-08-14 15:43 ` Imre Deak [this message]
2015-08-14 16:18 ` [PATCH v3 2/2] drm/i915/bxt: don't allow cached GEM mappings on A stepping Chris Wilson
2015-08-26 7:13 ` Daniel Vetter
2015-08-16 11:45 ` [PATCH v2 2/2] drm/i915/bxt: work around HW coherency issue for cached GEM mappings shuang.he
2015-08-14 12:49 ` [PATCH v2 0/2] drm/i915/bxt: work around HW coherency issue Chris Wilson
2015-08-14 13:26 ` Imre Deak
2015-08-14 13:31 ` 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=1439567010-29312-1-git-send-email-imre.deak@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=mika.kuoppala@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox