X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=include%2Fdrm%2Fdrm_syncobj.h;h=ce94d14c50878bce13a1f3b58cc524e0351e397f;hb=309a5482fa9eb7bc754bf95a2cd89091b01c33d2;hp=89976da542b1b723b073bb1dc6facc818ca54286;hpb=52f6c588c77b76d548201470c2a28263a41b462b;p=linux-2.6-microblaze.git diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h index 89976da542b1..ce94d14c5087 100644 --- a/include/drm/drm_syncobj.h +++ b/include/drm/drm_syncobj.h @@ -77,13 +77,25 @@ drm_syncobj_put(struct drm_syncobj *obj) kref_put(&obj->refcount, drm_syncobj_free); } +static inline struct dma_fence * +drm_syncobj_fence_get(struct drm_syncobj *syncobj) +{ + struct dma_fence *fence; + + rcu_read_lock(); + fence = dma_fence_get_rcu_safe(&syncobj->fence); + rcu_read_unlock(); + + return fence; +} + struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, u32 handle); void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, struct dma_fence *fence); -int drm_syncobj_fence_get(struct drm_file *file_private, - u32 handle, - struct dma_fence **fence); +int drm_syncobj_find_fence(struct drm_file *file_private, + u32 handle, + struct dma_fence **fence); void drm_syncobj_free(struct kref *kref); #endif