search for: sync_fence_put

Displaying 3 results from an estimated 3 matches for "sync_fence_put".

2014 Sep 26
0
[RFC PATCH 7/7] drm/prime: Support explicit fence on export
...t drm_device *dev, struct drm_gem_object *obj; int ret = 0; struct dma_buf *dmabuf; + struct fence *fence = NULL; + + if (flags & DRM_SYNC_FD) { +#ifdef CONFIG_SYNC + struct sync_fence *sf = sync_fence_fdget(*prime_fd); + if (!sf) + return -ENOENT; + if (sf->num_fences != 1) { + sync_fence_put(sf); + return -EINVAL; + } + fence = fence_get(sf->cbs[0].sync_pt); + sync_fence_put(sf); + flags &= ~DRM_SYNC_FD; +#else + return -ENODEV; +#endif + } mutex_lock(&file_priv->prime.lock); obj = drm_gem_object_lookup(dev, file_priv, handle); @@ -453,6 +473,14 @@ out_have_o...
2014 Sep 29
1
[RFC PATCH 7/7] drm/prime: Support explicit fence on export
...int ret = 0; > struct dma_buf *dmabuf; > + struct fence *fence = NULL; > + > + if (flags & DRM_SYNC_FD) { > +#ifdef CONFIG_SYNC > + struct sync_fence *sf = sync_fence_fdget(*prime_fd); > + if (!sf) > + return -ENOENT; > + if (sf->num_fences != 1) { > + sync_fence_put(sf); > + return -EINVAL; > + } > + fence = fence_get(sf->cbs[0].sync_pt); > + sync_fence_put(sf); > + flags &= ~DRM_SYNC_FD; > +#else > + return -ENODEV; > +#endif > + } > > mutex_lock(&file_priv->prime.lock); > obj = drm_gem_object_loo...
2014 Sep 26
14
[RFC] Explicit synchronization for Nouveau
Hi guys, I'd like to start a new thread about explicit fence synchronization. This time with a Nouveau twist. :-) First, let me define what I understand by implicit/explicit sync: Implicit synchronization * Fences are attached to buffers * Kernel manages fences automatically based on buffer read/write access Explicit synchronization * Fences are passed around independently * Kernel takes