]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915/execlists: Reset RING registers upon resume
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 21 Sep 2016 13:51:08 +0000 (14:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 07:08:31 +0000 (08:08 +0100)
commitf2a0409a08502d64fbe3990354dff5902b08d2fb
tree2658dff5334b26957424e8068bfb060bd0f1f473
parent72cd604cfd864b06c5a10d2bb139b19825e0fcbc
drm/i915/execlists: Reset RING registers upon resume

commit bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae upstream.

There is a disparity in the context image saved to disk and our own
bookkeeping - that is we presume the RING_HEAD and RING_TAIL match our
stored ce->ring->tail value. However, as we emit WA_TAIL_DWORDS into the
ring but may not tell the GPU about them, the GPU may be lagging behind
our bookkeeping. Upon hibernation we do not save stolen pages, presuming
that their contents are volatile. This means that although we start
writing into the ring at tail, the GPU starts executing from its HEAD
and there may be some garbage in between and so the GPU promptly hangs
upon resume.

Testcase: igt/gem_exec_suspend/basic-S4
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96526
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/20160921135108.29574-3-chris@chris-wilson.co.uk
Cc: Eric Blau <eblau1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/intel_lrc.c