[Mesa-dev] [PATCH 1/4] intel: Mark i965g/i965gm as having buggy snoop access
Chris Wilson
chris at chris-wilson.co.uk
Thu Aug 16 21:02:09 UTC 2018
Recent kernels do exclude snoop access for i965g/i965gm as it does not
work as advertised. However to avoid depending on a recent kernel for
old hardware, mark the presence of the bug in gen_device_info.
See kernel commit df0700e53047662c167836bd6fdeea55d5d8dcfa
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Sep 6 20:24:24 2017 +0100
drm/i915: Disable snooping (userptr, set-cache-level) on gen4
---
src/intel/dev/gen_device_info.c | 1 +
src/intel/dev/gen_device_info.h | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index b0ae4d18034..d0449a49389 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -93,6 +93,7 @@ gen_get_pci_device_id_override(void)
static const struct gen_device_info gen_device_info_i965 = {
.gen = 4,
+ .has_snoop_bug = true,
.has_negative_rhw_bug = true,
.num_slices = 1,
.num_subslices = { 1, },
diff --git a/src/intel/dev/gen_device_info.h b/src/intel/dev/gen_device_info.h
index 291a3cce8f8..80da9f713fa 100644
--- a/src/intel/dev/gen_device_info.h
+++ b/src/intel/dev/gen_device_info.h
@@ -80,6 +80,14 @@ struct gen_device_info
*/
bool has_negative_rhw_bug;
+ /**
+ * Some specific Intel chipset do not invalidate the CPU cache from the
+ * GPU for a snooped address, leading to stale data being read by the CPU
+ * and incorrect results. Enabling this flag will prevent the driver from
+ * using snooped access, e.g. userptr.
+ */
+ bool has_snoop_bug;
+
/**
* Some versions of Gen hardware don't do centroid interpolation correctly
* on unlit pixels, causing incorrect values for derivatives near triangle
--
2.18.0
More information about the mesa-dev
mailing list