Quoting Chris Wilson (2019-05-23 15:33:54) > +static void __userfault_timeout(struct timer_list *t) > +{ > + struct drm_i915_private *i915 = > + from_timer(i915, t, mm.userfault_timer); > + > + intel_runtime_pm_put(i915, xchg(&i915->mm.userfault_wakeref, 0)); > +} > + > +static void userfault_autosuspend(struct drm_i915_private *i915) > +{ > + intel_wakeref_t wakeref; > + > + if (!CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND) > + return; > + > + wakeref = intel_runtime_pm_get(i915); > + if (cmpxchg(&i915->mm.userfault_wakeref, 0, wakeref)) > + intel_runtime_pm_put(i915, wakeref); > + > + mod_timer(&i915->mm.userfault_timer, > + jiffies + msecs_to_jiffies_timeout(CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND)); This is racy (timer may fire in between the rpm_get and mod_timer), but will do for now to test whether this is the gem_mmap_gtt issue on icl. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx