[Intel-gfx] [PATCH] drm/i915: Keep user GGTT alive for a minimum of 250ms

Chris Wilson chris at chris-wilson.co.uk
Thu May 23 14:38:49 UTC 2019


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


More information about the Intel-gfx mailing list