[Intel-gfx] [PATCH 5/5] drm/i915: Solve the GPU reset vs. modeset deadlocks with an rw_semaphore

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 29 13:56:29 UTC 2017


Quoting ville.syrjala at linux.intel.com (2017-06-29 14:49:48)
> @@ -2640,15 +2600,13 @@ static void i915_reset_device(struct drm_i915_private *dev_priv)
>         char *error_event[] = { I915_ERROR_UEVENT "=1", NULL };
>         char *reset_event[] = { I915_RESET_UEVENT "=1", NULL };
>         char *reset_done_event[] = { I915_ERROR_UEVENT "=0", NULL };
> -       struct wedge_me w;
>  
>         kobject_uevent_env(kobj, KOBJ_CHANGE, error_event);
>  
>         DRM_DEBUG_DRIVER("resetting chip\n");
>         kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
>  
> -       /* Use a watchdog to ensure that our reset completes */
> -       i915_wedge_on_timeout(&w, dev_priv, 5*HZ) {

Keep the wedge-if-reset times out mechanism. It is a nice safe guard
against driver misbehaviour and not limited to breaking the previous
deadlock. If it fires, we get an error in dmesg to go along with the
lost data. I quickly grew fond of having this safe guard!
-Chris


More information about the Intel-gfx mailing list