]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/i915_drv.h
drm/i915: Reset the gpu on takeover
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Jan 2017 11:01:35 +0000 (11:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 24 Jan 2017 12:29:48 +0000 (12:29 +0000)
commit241455172b8683f65a325490baf2d8dd683b3832
treea8c197f88b4028e44e3de0058027d64955dc4153
parentbb8f0f5abdd7845175962a3fb99a5681290f9566
drm/i915: Reset the gpu on takeover

The GPU may be in an unknown state following resume and module load. The
previous occupant may have left contexts loaded, or other dangerous
state, which can cause an immediate GPU hang for us. The only save
course of action is to reset the GPU prior to using it - similarly to
how we reset the GPU prior to unload (before a second user may be
affected by our leftover state).

We need to reset the GPU very early in our load/resume sequence so that
any stale HW pointers are revoked prior to any resource allocations we
make (that may conflict).

A reset should only be a couple of milliseconds on a slow device, a cost
we should easily be able to absorb into our initialisation times.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110135.6418-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c