diff options
author | Christian König <christian.koenig@amd.com> | 2016-03-11 11:57:56 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-03-16 17:58:43 -0400 |
commit | ca08e04d5642c429ec891fa17bf379be988dea6b (patch) | |
tree | c2e3dbbe90685ce5e3c630a83f233b33ef1d5d38 /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |
parent | d9713ef6b99e43b93bf8e73fc210d2925322eacc (diff) |
drm/amdgpu: merge amdgpu_fence_process and _activity
No need to keep the two separate any more.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 35fbc8874514..d8bbe85c22a2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
@@ -155,15 +155,15 @@ static void amdgpu_fence_schedule_fallback(struct amdgpu_ring *ring) | |||
155 | } | 155 | } |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * amdgpu_fence_activity - check for fence activity | 158 | * amdgpu_fence_process - check for fence activity |
159 | * | 159 | * |
160 | * @ring: pointer to struct amdgpu_ring | 160 | * @ring: pointer to struct amdgpu_ring |
161 | * | 161 | * |
162 | * Checks the current fence value and calculates the last | 162 | * Checks the current fence value and calculates the last |
163 | * signalled fence value. Returns true if activity occured | 163 | * signalled fence value. Wakes the fence queue if the |
164 | * on the ring, and the fence_queue should be waken up. | 164 | * sequence number has increased. |
165 | */ | 165 | */ |
166 | static bool amdgpu_fence_activity(struct amdgpu_ring *ring) | 166 | void amdgpu_fence_process(struct amdgpu_ring *ring) |
167 | { | 167 | { |
168 | uint64_t seq, last_seq, last_emitted; | 168 | uint64_t seq, last_seq, last_emitted; |
169 | bool wake = false; | 169 | bool wake = false; |
@@ -193,21 +193,7 @@ static bool amdgpu_fence_activity(struct amdgpu_ring *ring) | |||
193 | if (seq < last_emitted) | 193 | if (seq < last_emitted) |
194 | amdgpu_fence_schedule_fallback(ring); | 194 | amdgpu_fence_schedule_fallback(ring); |
195 | 195 | ||
196 | return wake; | 196 | if (wake) |
197 | } | ||
198 | |||
199 | /** | ||
200 | * amdgpu_fence_process - process a fence | ||
201 | * | ||
202 | * @adev: amdgpu_device pointer | ||
203 | * @ring: ring index the fence is associated with | ||
204 | * | ||
205 | * Checks the current fence value and wakes the fence queue | ||
206 | * if the sequence number has increased (all asics). | ||
207 | */ | ||
208 | void amdgpu_fence_process(struct amdgpu_ring *ring) | ||
209 | { | ||
210 | if (amdgpu_fence_activity(ring)) | ||
211 | wake_up_all(&ring->fence_drv.fence_queue); | 197 | wake_up_all(&ring->fence_drv.fence_queue); |
212 | } | 198 | } |
213 | 199 | ||