@@ -2869,6 +2869,7 @@ intel_ppat_get(struct drm_i915_private *i915, u8 value)
unsigned int scanned, best_score;
int i;
+ lockdep_assert_held(&i915->drm.struct_mutex);
GEM_BUG_ON(!ppat->max_entries);
scanned = best_score = 0;
@@ -2924,6 +2925,7 @@ void intel_ppat_put(const struct intel_ppat_entry *entry)
struct intel_ppat *ppat = entry->ppat;
unsigned int index = entry - ppat->entries;
+ lockdep_assert_held(&ppat->i915->drm.struct_mutex);
GEM_BUG_ON(!ppat->max_entries);
kref_put(&ppat->entries[index].ref, release_ppat);
struct_mutext needs to be held before call these two APIs. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ben Widawsky <benjamin.widawsky@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+)