aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c32
2 files changed, 0 insertions, 34 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 0220d98ba8bf..4e8124749f9f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -429,8 +429,6 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
429 unsigned irq_type); 429 unsigned irq_type);
430int amdgpu_fence_emit(struct amdgpu_ring *ring, void *owner, 430int amdgpu_fence_emit(struct amdgpu_ring *ring, void *owner,
431 struct amdgpu_fence **fence); 431 struct amdgpu_fence **fence);
432int amdgpu_fence_recreate(struct amdgpu_ring *ring, void *owner,
433 uint64_t seq, struct amdgpu_fence **fence);
434void amdgpu_fence_process(struct amdgpu_ring *ring); 432void amdgpu_fence_process(struct amdgpu_ring *ring);
435int amdgpu_fence_wait_next(struct amdgpu_ring *ring); 433int amdgpu_fence_wait_next(struct amdgpu_ring *ring);
436int amdgpu_fence_wait_empty(struct amdgpu_ring *ring); 434int amdgpu_fence_wait_empty(struct amdgpu_ring *ring);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index a7189a1fa6a1..e3629c923862 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -136,38 +136,6 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, void *owner,
136} 136}
137 137
138/** 138/**
139 * amdgpu_fence_recreate - recreate a fence from an user fence
140 *
141 * @ring: ring the fence is associated with
142 * @owner: creator of the fence
143 * @seq: user fence sequence number
144 * @fence: resulting amdgpu fence object
145 *
146 * Recreates a fence command from the user fence sequence number (all asics).
147 * Returns 0 on success, -ENOMEM on failure.
148 */
149int amdgpu_fence_recreate(struct amdgpu_ring *ring, void *owner,
150 uint64_t seq, struct amdgpu_fence **fence)
151{
152 struct amdgpu_device *adev = ring->adev;
153
154 if (seq > ring->fence_drv.sync_seq[ring->idx])
155 return -EINVAL;
156
157 *fence = kmalloc(sizeof(struct amdgpu_fence), GFP_KERNEL);
158 if ((*fence) == NULL)
159 return -ENOMEM;
160
161 (*fence)->seq = seq;
162 (*fence)->ring = ring;
163 (*fence)->owner = owner;
164 fence_init(&(*fence)->base, &amdgpu_fence_ops,
165 &adev->fence_queue.lock, adev->fence_context + ring->idx,
166 (*fence)->seq);
167 return 0;
168}
169
170/**
171 * amdgpu_fence_check_signaled - callback from fence_queue 139 * amdgpu_fence_check_signaled - callback from fence_queue
172 * 140 *
173 * this function is called with fence_queue lock held, which is also used 141 * this function is called with fence_queue lock held, which is also used