drm/vmwgfx: Restart command buffers after errors
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 24 Aug 2017 06:06:29 +0000 (08:06 +0200)
committerSinclair Yeh <syeh@vmware.com>
Mon, 28 Aug 2017 15:40:46 +0000 (17:40 +0200)
commit65b97a2bec2fc75e9137e8a17954cb66809215bf
tree44d3b6e344866347de986da999e0d4003bfc8b17
parentef369904aaf717e0390b483efd47daba9ba8ddf2
drm/vmwgfx: Restart command buffers after errors

Previously we skipped the command buffer and added an extra fence to
avoid hangs due to skipped fence commands.
Now we instead restart the command buffer after the failing command,
if there are any commands left.
In addition we print out some information about the failing command
and its location in the command buffer.

Testing Done: ran glxgears using mesa modified to send the NOP_ERROR
command before each 10th clear and verified that we detected the device
error properly and that there were no other device errors caused by
incorrectly ordered command buffers. Also ran the piglit "quick" test
suite which generates a couple of device errors and verified that
they were handled as intended.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c