mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
drm/ttm: Simplify ttm_bo_wait_unreserved
Function ttm_bo_wait_unreserved can be slightly simplified. Signed-off-by: Jean Delvare <[email protected]> Cc: Thomas Hellstrom <[email protected]> Cc: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
This commit is contained in:
parent
5480f727dc
commit
965d38074e
1 changed files with 2 additions and 7 deletions
|
|
@ -166,18 +166,13 @@ static void ttm_bo_release_list(struct kref *list_kref)
|
|||
|
||||
int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible)
|
||||
{
|
||||
|
||||
if (interruptible) {
|
||||
int ret = 0;
|
||||
|
||||
ret = wait_event_interruptible(bo->event_queue,
|
||||
return wait_event_interruptible(bo->event_queue,
|
||||
atomic_read(&bo->reserved) == 0);
|
||||
if (unlikely(ret != 0))
|
||||
return ret;
|
||||
} else {
|
||||
wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ttm_bo_wait_unreserved);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue