diff options
author | Chunming Zhou <david1.zhou@amd.com> | 2015-07-21 05:43:41 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:50:38 -0400 |
commit | e0d8f3c34e54b7f7563360131e89be0d9405d436 (patch) | |
tree | 321f5cf8d6ba629988bca0f536ed18faa5192fc4 /drivers/gpu/drm/amd | |
parent | d5fc5e82a3127b8839c4a4457f3b950a009737a7 (diff) |
drm/amdgpu: add sched isr to fence process
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index be43ae412ae0..1580d8d7a3bf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
@@ -346,8 +346,24 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) | |||
346 | } | 346 | } |
347 | } while (atomic64_xchg(&ring->fence_drv.last_seq, seq) > seq); | 347 | } while (atomic64_xchg(&ring->fence_drv.last_seq, seq) > seq); |
348 | 348 | ||
349 | if (wake) | 349 | if (wake) { |
350 | if (amdgpu_enable_scheduler) { | ||
351 | uint64_t handled_seq = | ||
352 | amd_sched_get_handled_seq(ring->scheduler); | ||
353 | uint64_t latest_seq = | ||
354 | atomic64_read(&ring->fence_drv.last_seq); | ||
355 | if (handled_seq == latest_seq) { | ||
356 | DRM_ERROR("ring %d, EOP without seq update (lastest_seq=%llu)\n", | ||
357 | ring->idx, latest_seq); | ||
358 | return; | ||
359 | } | ||
360 | do { | ||
361 | amd_sched_isr(ring->scheduler); | ||
362 | } while (amd_sched_get_handled_seq(ring->scheduler) < latest_seq); | ||
363 | } | ||
364 | |||
350 | wake_up_all(&ring->adev->fence_queue); | 365 | wake_up_all(&ring->adev->fence_queue); |
366 | } | ||
351 | } | 367 | } |
352 | 368 | ||
353 | /** | 369 | /** |