]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Fix execbuf locking issues
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 12 Aug 2015 05:31:17 +0000 (22:31 -0700)
committerDave Airlie <airlied@redhat.com>
Thu, 13 Aug 2015 23:49:19 +0000 (09:49 +1000)
commit5aee52a4c029882ecb113c785556150770559c99
tree1fe36876290a88c279d1a91ffe46dd7814003bec
parenta0b262c940c3b8d6e2b12941c367d6a8fcbc1510
drm/vmwgfx: Fix execbuf locking issues

This addresses two issues that cause problems with viewperf maya-03 in
situation with memory pressure.

The first issue causes attempts to unreserve buffers if batched
reservation fails due to, for example, a signal pending. While previously
the ttm_eu api was resistant against this type of error, it is no longer
and the lockdep code will complain about attempting to unreserve buffers
that are not reserved. The issue is resolved by avoid calling
ttm_eu_backoff_reservation in the buffer reserve error path.

The second issue is that the binding_mutex may be held when user-space
fence objects are created and hence during memory reclaims. This may cause
recursive attempts to grab the binding mutex. The issue is resolved by not
holding the binding mutex across fence creation and submission.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c