OSDN Git Service

reservation: update api and add some helpers
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 1 Jul 2014 10:57:54 +0000 (12:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 20:37:35 +0000 (13:37 -0700)
commit04a5faa8cbe5a8eaf152cb88959ba6360c26e702
treefee24a356ead0c38b98d8c3d3b671cd0dd981714
parent9b495a5887994a6d74d5c261d012083a92b94738
reservation: update api and add some helpers

Move the list of shared fences to a struct, and return it in
reservation_object_get_list().
Add reservation_object_get_excl to get the exclusive fence.

Add reservation_object_reserve_shared(), which reserves space
in the reservation_object for 1 more shared fence.

reservation_object_add_shared_fence() and
reservation_object_add_excl_fence() are used to assign a new
fence to a reservation_object pointer, to complete a reservation.

Changes since v1:
- Add reservation_object_get_excl, reorder code a bit.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/DocBook/device-drivers.tmpl
drivers/dma-buf/dma-buf.c
drivers/dma-buf/reservation.c
include/linux/reservation.h