diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-01-14 22:25:00 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-10 14:16:50 -0500 |
commit | cadf97b196a1e5b2db2606d53f77714e3e9cf4bb (patch) | |
tree | 1954976bc68547599f4ea9c29381a962c5c5d681 /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |
parent | be86c606b50a53b60f3591ba94dd687524f2ee21 (diff) |
drm/amdgpu: clean up non-scheduler code path (v2)
Non-scheduler code is longer supported.
v2: agd: rebased on upstream
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 3671f9f220bd..cac03e743b58 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
@@ -472,6 +472,7 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring, | |||
472 | int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring) | 472 | int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring) |
473 | { | 473 | { |
474 | int i, r; | 474 | int i, r; |
475 | long timeout; | ||
475 | 476 | ||
476 | ring->fence_drv.cpu_addr = NULL; | 477 | ring->fence_drv.cpu_addr = NULL; |
477 | ring->fence_drv.gpu_addr = 0; | 478 | ring->fence_drv.gpu_addr = 0; |
@@ -486,26 +487,24 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring) | |||
486 | 487 | ||
487 | init_waitqueue_head(&ring->fence_drv.fence_queue); | 488 | init_waitqueue_head(&ring->fence_drv.fence_queue); |
488 | 489 | ||
489 | if (amdgpu_enable_scheduler) { | 490 | timeout = msecs_to_jiffies(amdgpu_lockup_timeout); |
490 | long timeout = msecs_to_jiffies(amdgpu_lockup_timeout); | 491 | if (timeout == 0) { |
491 | if (timeout == 0) { | 492 | /* |
492 | /* | 493 | * FIXME: |
493 | * FIXME: | 494 | * Delayed workqueue cannot use it directly, |
494 | * Delayed workqueue cannot use it directly, | 495 | * so the scheduler will not use delayed workqueue if |
495 | * so the scheduler will not use delayed workqueue if | 496 | * MAX_SCHEDULE_TIMEOUT is set. |
496 | * MAX_SCHEDULE_TIMEOUT is set. | 497 | * Currently keep it simple and silly. |
497 | * Currently keep it simple and silly. | 498 | */ |
498 | */ | 499 | timeout = MAX_SCHEDULE_TIMEOUT; |
499 | timeout = MAX_SCHEDULE_TIMEOUT; | 500 | } |
500 | } | 501 | r = amd_sched_init(&ring->sched, &amdgpu_sched_ops, |
501 | r = amd_sched_init(&ring->sched, &amdgpu_sched_ops, | 502 | amdgpu_sched_hw_submission, |
502 | amdgpu_sched_hw_submission, | 503 | timeout, ring->name); |
503 | timeout, ring->name); | 504 | if (r) { |
504 | if (r) { | 505 | DRM_ERROR("Failed to create scheduler on ring %s.\n", |
505 | DRM_ERROR("Failed to create scheduler on ring %s.\n", | 506 | ring->name); |
506 | ring->name); | 507 | return r; |
507 | return r; | ||
508 | } | ||
509 | } | 508 | } |
510 | 509 | ||
511 | return 0; | 510 | return 0; |