|
@@ -276,6 +276,13 @@ static int spec_sync_bind_array(struct fence_bind_data *sync_bind_info)
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (fence_array->fences) {
|
|
|
|
+ pr_err("fence array already populated, spec fd:%d status:%d flags:0x%x\n",
|
|
|
|
+ sync_bind_info->out_bind_fd, dma_fence_get_status(fence), fence->flags);
|
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+
|
|
num_fences = fence_array->num_fences;
|
|
num_fences = fence_array->num_fences;
|
|
counter = num_fences;
|
|
counter = num_fences;
|
|
|
|
|
|
@@ -298,11 +305,12 @@ static int spec_sync_bind_array(struct fence_bind_data *sync_bind_info)
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ spin_lock(fence->lock);
|
|
fence_array->fences = fence_list;
|
|
fence_array->fences = fence_list;
|
|
for (i = 0; i < num_fences; i++) {
|
|
for (i = 0; i < num_fences; i++) {
|
|
user_fence = sync_file_get_fence(user_fds[i]);
|
|
user_fence = sync_file_get_fence(user_fds[i]);
|
|
if (!user_fence) {
|
|
if (!user_fence) {
|
|
- pr_err("bind fences are invalid !! user_fd:%d out_bind_fd:%d\n",
|
|
|
|
|
|
+ pr_warn("bind fences are invalid !! user_fd:%d out_bind_fd:%d\n",
|
|
user_fds[i], sync_bind_info->out_bind_fd);
|
|
user_fds[i], sync_bind_info->out_bind_fd);
|
|
counter = i;
|
|
counter = i;
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
@@ -314,6 +322,7 @@ static int spec_sync_bind_array(struct fence_bind_data *sync_bind_info)
|
|
}
|
|
}
|
|
|
|
|
|
clear_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &fence->flags);
|
|
clear_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &fence->flags);
|
|
|
|
+ spin_unlock(fence->lock);
|
|
dma_fence_enable_sw_signaling(&fence_array->base);
|
|
dma_fence_enable_sw_signaling(&fence_array->base);
|
|
|
|
|
|
clear_fence_array_tracker(false);
|
|
clear_fence_array_tracker(false);
|
|
@@ -327,6 +336,7 @@ bind_invalid:
|
|
fence_array->fences = NULL;
|
|
fence_array->fences = NULL;
|
|
fence_array->num_fences = 0;
|
|
fence_array->num_fences = 0;
|
|
dma_fence_set_error(fence, -EINVAL);
|
|
dma_fence_set_error(fence, -EINVAL);
|
|
|
|
+ spin_unlock(fence->lock);
|
|
dma_fence_signal(fence);
|
|
dma_fence_signal(fence);
|
|
clear_fence_array_tracker(false);
|
|
clear_fence_array_tracker(false);
|
|
}
|
|
}
|