drm/ttm: Fix up a theoretical deadlock
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 11 Nov 2010 09:04:53 +0000 (10:04 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 18 Nov 2010 05:00:42 +0000 (15:00 +1000)
commit95ccb0f3bdc4438bf470c25450e6a8a6090ca253
treea4a55496a9483ddf43d8bd72c149341536628874
parent9a03d3487abe89e3650bb2533c5d909143955499
drm/ttm: Fix up a theoretical deadlock

A process suspended waiting for a higher sequence or no sequence to unreserve,
a bo may be beaten to the reservation by a process with a lower sequence.
In that case the first process should give up trying to reserve and
return -EAGAIN. In order for that to happen, we must wake waiting processes
when we change sequence, so that they have a chance to detect the new
sequence.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_bo.c