drm/i915/perf: fix whitelist on Gen10+
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 1 Jun 2019 22:58:45 +0000 (01:58 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 12 Jun 2019 07:42:22 +0000 (10:42 +0300)
Gen10 added an additional NOA_WRITE register (high bits) and we forgot
to whitelist it for userspace.

Fixes: 95690a02fb5d96 ("drm/i915/perf: enable perf support on CNL")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190601225845.12600-1-lionel.g.landwerlin@intel.com
(cherry picked from commit bf210f6c9e6fd8dc0d154ad18f741f20e64a3fce)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/i915_reg.h

index 39a4804091d70d61a5fd63e7dfcb60d3edde4060..dc4ce694c06a8cd2b75e004f10034f969df569bb 100644 (file)
@@ -3005,6 +3005,7 @@ static bool gen8_is_valid_mux_addr(struct drm_i915_private *dev_priv, u32 addr)
 static bool gen10_is_valid_mux_addr(struct drm_i915_private *dev_priv, u32 addr)
 {
        return gen8_is_valid_mux_addr(dev_priv, addr) ||
+               addr == i915_mmio_reg_offset(GEN10_NOA_WRITE_HIGH) ||
                (addr >= i915_mmio_reg_offset(OA_PERFCNT3_LO) &&
                 addr <= i915_mmio_reg_offset(OA_PERFCNT4_HI));
 }
index 2aa69d347ec4070de9fd27aaf1e138d8a305dcd5..13d6bd4e17b208deda30c39114c9daba9223104d 100644 (file)
@@ -1062,6 +1062,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
 
 #define NOA_DATA           _MMIO(0x986C)
 #define NOA_WRITE          _MMIO(0x9888)
+#define GEN10_NOA_WRITE_HIGH _MMIO(0x9884)
 
 #define _GEN7_PIPEA_DE_LOAD_SL 0x70068
 #define _GEN7_PIPEB_DE_LOAD_SL 0x71068