aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c2
-rw-r--r--drivers/gpu/drm/drm_syncobj.c14
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c2
-rw-r--r--drivers/gpu/drm/v3d/v3d_gem.c3
-rw-r--r--drivers/gpu/drm/vc4/vc4_gem.c2
-rw-r--r--include/drm/drm_syncobj.h2
6 files changed, 11 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 024dfbd87f11..dc54e9efd910 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1193,7 +1193,7 @@ static void amdgpu_cs_post_dependencies(struct amdgpu_cs_parser *p)
1193 int i; 1193 int i;
1194 1194
1195 for (i = 0; i < p->num_post_dep_syncobjs; ++i) 1195 for (i = 0; i < p->num_post_dep_syncobjs; ++i)
1196 drm_syncobj_replace_fence(p->post_dep_syncobjs[i], 0, p->fence); 1196 drm_syncobj_replace_fence(p->post_dep_syncobjs[i], p->fence);
1197} 1197}
1198 1198
1199static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, 1199static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 5c5ba1f14307..db30a0e89db8 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -140,13 +140,11 @@ void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,
140/** 140/**
141 * drm_syncobj_replace_fence - replace fence in a sync object. 141 * drm_syncobj_replace_fence - replace fence in a sync object.
142 * @syncobj: Sync object to replace fence in 142 * @syncobj: Sync object to replace fence in
143 * @point: timeline point
144 * @fence: fence to install in sync file. 143 * @fence: fence to install in sync file.
145 * 144 *
146 * This replaces the fence on a sync object, or a timeline point fence. 145 * This replaces the fence on a sync object.
147 */ 146 */
148void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, 147void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
149 u64 point,
150 struct dma_fence *fence) 148 struct dma_fence *fence)
151{ 149{
152 struct dma_fence *old_fence; 150 struct dma_fence *old_fence;
@@ -184,7 +182,7 @@ static void drm_syncobj_assign_null_handle(struct drm_syncobj *syncobj)
184{ 182{
185 struct dma_fence *fence = dma_fence_get_stub(); 183 struct dma_fence *fence = dma_fence_get_stub();
186 184
187 drm_syncobj_replace_fence(syncobj, 0, fence); 185 drm_syncobj_replace_fence(syncobj, fence);
188 dma_fence_put(fence); 186 dma_fence_put(fence);
189} 187}
190 188
@@ -233,7 +231,7 @@ void drm_syncobj_free(struct kref *kref)
233 struct drm_syncobj *syncobj = container_of(kref, 231 struct drm_syncobj *syncobj = container_of(kref,
234 struct drm_syncobj, 232 struct drm_syncobj,
235 refcount); 233 refcount);
236 drm_syncobj_replace_fence(syncobj, 0, NULL); 234 drm_syncobj_replace_fence(syncobj, NULL);
237 kfree(syncobj); 235 kfree(syncobj);
238} 236}
239EXPORT_SYMBOL(drm_syncobj_free); 237EXPORT_SYMBOL(drm_syncobj_free);
@@ -267,7 +265,7 @@ int drm_syncobj_create(struct drm_syncobj **out_syncobj, uint32_t flags,
267 drm_syncobj_assign_null_handle(syncobj); 265 drm_syncobj_assign_null_handle(syncobj);
268 266
269 if (fence) 267 if (fence)
270 drm_syncobj_replace_fence(syncobj, 0, fence); 268 drm_syncobj_replace_fence(syncobj, fence);
271 269
272 *out_syncobj = syncobj; 270 *out_syncobj = syncobj;
273 return 0; 271 return 0;
@@ -452,7 +450,7 @@ static int drm_syncobj_import_sync_file_fence(struct drm_file *file_private,
452 return -ENOENT; 450 return -ENOENT;
453 } 451 }
454 452
455 drm_syncobj_replace_fence(syncobj, 0, fence); 453 drm_syncobj_replace_fence(syncobj, fence);
456 dma_fence_put(fence); 454 dma_fence_put(fence);
457 drm_syncobj_put(syncobj); 455 drm_syncobj_put(syncobj);
458 return 0; 456 return 0;
@@ -923,7 +921,7 @@ drm_syncobj_reset_ioctl(struct drm_device *dev, void *data,
923 return ret; 921 return ret;
924 922
925 for (i = 0; i < args->count_handles; i++) 923 for (i = 0; i < args->count_handles; i++)
926 drm_syncobj_replace_fence(syncobjs[i], 0, NULL); 924 drm_syncobj_replace_fence(syncobjs[i], NULL);
927 925
928 drm_syncobj_array_free(syncobjs, args->count_handles); 926 drm_syncobj_array_free(syncobjs, args->count_handles);
929 927
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index d4fac09095f8..10a4afb4f235 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -2191,7 +2191,7 @@ signal_fence_array(struct i915_execbuffer *eb,
2191 if (!(flags & I915_EXEC_FENCE_SIGNAL)) 2191 if (!(flags & I915_EXEC_FENCE_SIGNAL))
2192 continue; 2192 continue;
2193 2193
2194 drm_syncobj_replace_fence(syncobj, 0, fence); 2194 drm_syncobj_replace_fence(syncobj, fence);
2195 } 2195 }
2196} 2196}
2197 2197
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index f565b197cba9..cb99e53f7607 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -609,8 +609,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
609 /* Update the return sync object for the */ 609 /* Update the return sync object for the */
610 sync_out = drm_syncobj_find(file_priv, args->out_sync); 610 sync_out = drm_syncobj_find(file_priv, args->out_sync);
611 if (sync_out) { 611 if (sync_out) {
612 drm_syncobj_replace_fence(sync_out, 0, 612 drm_syncobj_replace_fence(sync_out, exec->render_done_fence);
613 exec->render_done_fence);
614 drm_syncobj_put(sync_out); 613 drm_syncobj_put(sync_out);
615 } 614 }
616 615
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 41881ce4132d..aea2b8dfec17 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -681,7 +681,7 @@ vc4_queue_submit(struct drm_device *dev, struct vc4_exec_info *exec,
681 exec->fence = &fence->base; 681 exec->fence = &fence->base;
682 682
683 if (out_sync) 683 if (out_sync)
684 drm_syncobj_replace_fence(out_sync, 0, exec->fence); 684 drm_syncobj_replace_fence(out_sync, exec->fence);
685 685
686 vc4_update_bo_seqnos(exec, seqno); 686 vc4_update_bo_seqnos(exec, seqno);
687 687
diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h
index 2eda44def639..b1fe921f8e8f 100644
--- a/include/drm/drm_syncobj.h
+++ b/include/drm/drm_syncobj.h
@@ -131,7 +131,7 @@ drm_syncobj_fence_get(struct drm_syncobj *syncobj)
131 131
132struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, 132struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private,
133 u32 handle); 133 u32 handle);
134void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, u64 point, 134void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
135 struct dma_fence *fence); 135 struct dma_fence *fence);
136int drm_syncobj_find_fence(struct drm_file *file_private, 136int drm_syncobj_find_fence(struct drm_file *file_private,
137 u32 handle, u64 point, u64 flags, 137 u32 handle, u64 point, u64 flags,