if (fence) {
drm_device_t *dev = bo->dev;
- if (drm_fence_object_signaled(fence, bo->fence_type)) {
+ if (drm_fence_object_signaled(dev, fence, bo->fence_type, 0)) {
drm_fence_usage_deref_unlocked(dev, fence);
bo->fence = NULL;
return 0;
DRM_FLAG_MASKED(bo->priv_flags, 0, _DRM_BO_FLAG_UNFENCED);
- if (bo->fence && drm_fence_object_signaled(bo->fence, bo->fence_type)) {
+ if (bo->fence && drm_fence_object_signaled(dev, bo->fence,
+ bo->fence_type, 0)) {
drm_fence_usage_deref_unlocked(dev, bo->fence);
bo->fence = NULL;
}
BUG_ON(bo->priv_flags & _DRM_BO_FLAG_UNFENCED);
if (fence) {
drm_device_t *dev = bo->dev;
- if (drm_fence_object_signaled(fence, bo->fence_type)) {
+ if (drm_fence_object_signaled(dev, fence, bo->fence_type, 0)) {
drm_fence_usage_deref_unlocked(dev, fence);
bo->fence = NULL;
return 0;
BUG_ON(bo->priv_flags & _DRM_BO_FLAG_UNFENCED);
if (fence) {
drm_device_t *dev = bo->dev;
- if (drm_fence_object_signaled(fence, bo->fence_type)) {
+ if (drm_fence_object_signaled(dev, fence, bo->fence_type, 0)) {
drm_fence_usage_deref_unlocked(dev, fence);
bo->fence = NULL;
return 0;
}
drm_fence_object_flush(dev, fence, DRM_FENCE_TYPE_EXE);
- if (drm_fence_object_signaled(fence, bo->fence_type)) {
+ if (drm_fence_object_signaled(dev, fence, bo->fence_type, 0)) {
drm_fence_usage_deref_unlocked(dev, fence);
bo->fence = NULL;
return 0;
drm_fence_usage_deref_locked(dev, fence);
}
-static int fence_signaled(drm_device_t * dev,
+int drm_fence_object_signaled(drm_device_t * dev,
drm_fence_object_t * fence,
uint32_t mask, int poke_flush)
{
}
}
-int drm_fence_object_signaled(drm_fence_object_t * fence,
- uint32_t type)
-{
- return ((fence->signaled & type) == type);
-}
-
int drm_fence_object_flush(drm_device_t * dev,
drm_fence_object_t * fence,
uint32_t type)
do {
DRM_WAIT_ON(ret, fc->fence_queue, 3 * DRM_HZ,
- (signaled = fence_signaled(dev, fence, mask, 1)));
+ (signaled = drm_fence_object_signaled(dev, fence, mask, 1)));
if (signaled)
return 0;
if (time_after_eq(jiffies, _end))
break;
} while (ret == -EINTR && ignore_signals);
- if (fence_signaled(dev, fence, mask, 0))
+ if (drm_fence_object_signaled(dev, fence, mask, 0))
return 0;
if (time_after_eq(jiffies, _end))
ret = -EBUSY;
return -EINVAL;
}
- if (fence_signaled(dev, fence, mask, 0))
+ if (drm_fence_object_signaled(dev, fence, mask, 0))
return 0;
_end = jiffies + 3 * DRM_HZ;
return ret;
}
}
- if (drm_fence_object_signaled(fence, mask))
+ if (drm_fence_object_signaled(dev, fence, mask, 0))
return 0;
/*
#endif
do {
schedule();
- signaled = fence_signaled(dev, fence, mask, 1);
+ signaled = drm_fence_object_signaled(dev, fence, mask, 1);
} while (!signaled && !time_after_eq(jiffies, _end));
if (!signaled)
uint32_t sequence);
extern int drm_fence_object_flush(struct drm_device *dev,
drm_fence_object_t * fence, uint32_t type);
-extern int drm_fence_object_signaled(drm_fence_object_t * fence, uint32_t type);
+extern int drm_fence_object_signaled(struct drm_device *dev,
+ drm_fence_object_t * fence,
+ uint32_t type, int flush);
extern void drm_fence_usage_deref_locked(struct drm_device *dev,
drm_fence_object_t * fence);
extern void drm_fence_usage_deref_unlocked(struct drm_device *dev,