• Thomas Hellstrom's avatar
    drm/vmwgfx: Fix execbuf locking issues · 3e04e2fe
    Thomas Hellstrom authored
    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: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    3e04e2fe
vmwgfx_execbuf.c 79.4 KB