OSDN Git Service

vmwgfx: Fix potential execbuf deadlocks
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 31 Aug 2011 07:42:54 +0000 (07:42 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 1 Sep 2011 08:37:55 +0000 (09:37 +0100)
commitbe38ab6ea7b0de0542a0ff78690d63bb22f66a4d
tree10fa0d9106caca66d67229e47e0037d453274461
parent0bef23f9180b43e805ce4dabb90b24a0b558721c
vmwgfx: Fix potential execbuf deadlocks

Perform all command stream validation in a bounce buffer separate from the
fifo. This makes the fifo available to all validation-generated commands,
which would otherwise attempt to grab the fifo recursively, causing a
deadlock. This is in preparation for GMR2 and swappable surfaces.

Also maintain references to all surfaces in the command stream until the
command stream has been fired in order to avoid racing with surface
destruction taking place after validation but before submission.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c