[Mesa-dev] [PATCH 2/6] intel: Mark i965g/i965gm as having buggy snoop access

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 13 09:34:52 UTC 2017


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/common/gen_device_info.c | 1 +
 src/intel/common/gen_device_info.h | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/src/intel/common/gen_device_info.c b/src/intel/common/gen_device_info.c
index c0eb7c3c35..ec1b216535 100644
--- a/src/intel/common/gen_device_info.c
+++ b/src/intel/common/gen_device_info.c
@@ -30,6 +30,7 @@
 
 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/common/gen_device_info.h b/src/intel/common/gen_device_info.h
index 59b345e949..90928310c3 100644
--- a/src/intel/common/gen_device_info.h
+++ b/src/intel/common/gen_device_info.h
@@ -66,6 +66,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.15.0.rc0



More information about the mesa-dev mailing list