drm/nouveau: Split nouveau_fence_sync

Split nouveau_fence_sync to two functions:

 * nouveau_fence_sync, which only adds a fence wait to the channel
   command stream, and
 * nouveau_bo_sync, which gets the fences from the reservation object
   and passes them to nouveau_fence_sync.

Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
drm/nouveau: Support android sync fences

Add support for creating android sync_fence objects from drm fences.
sync_fence objects can be wrapped in file descriptors and passed
between user space.

Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
drm/nouveau: Support explicit synchronization

Add a new NOUVEAU_GEM_PUSHBUF_2 ioctl that accepts and emits a sync
fence fd from/to user space if the user space requests it by passing
corresponding flags.

Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
drm/nouveau: Support marking buffers for explicit sync

Fences will not be attached automatically to buffers that are marked
for explicit synchronization.

Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>