drm/amdgpu: clean up non-scheduler code path (v2)
[deliverable/linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_fence.c
index 3671f9f220bd47617d0cd3761543cedcae581d5e..cac03e743b585fb80d99f0b10da18ec3cfda6325 100644 (file)
@@ -472,6 +472,7 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
 int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring)
 {
        int i, r;
+       long timeout;
 
        ring->fence_drv.cpu_addr = NULL;
        ring->fence_drv.gpu_addr = 0;
@@ -486,26 +487,24 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring)
 
        init_waitqueue_head(&ring->fence_drv.fence_queue);
 
-       if (amdgpu_enable_scheduler) {
-               long timeout = msecs_to_jiffies(amdgpu_lockup_timeout);
-               if (timeout == 0) {
-                       /*
-                        * FIXME:
-                        * Delayed workqueue cannot use it directly,
-                        * so the scheduler will not use delayed workqueue if
-                        * MAX_SCHEDULE_TIMEOUT is set.
-                        * Currently keep it simple and silly.
-                        */
-                       timeout = MAX_SCHEDULE_TIMEOUT;
-               }
-               r = amd_sched_init(&ring->sched, &amdgpu_sched_ops,
-                                  amdgpu_sched_hw_submission,
-                                  timeout, ring->name);
-               if (r) {
-                       DRM_ERROR("Failed to create scheduler on ring %s.\n",
-                                 ring->name);
-                       return r;
-               }
+       timeout = msecs_to_jiffies(amdgpu_lockup_timeout);
+       if (timeout == 0) {
+               /*
+                * FIXME:
+                * Delayed workqueue cannot use it directly,
+                * so the scheduler will not use delayed workqueue if
+                * MAX_SCHEDULE_TIMEOUT is set.
+                * Currently keep it simple and silly.
+                */
+               timeout = MAX_SCHEDULE_TIMEOUT;
+       }
+       r = amd_sched_init(&ring->sched, &amdgpu_sched_ops,
+                          amdgpu_sched_hw_submission,
+                          timeout, ring->name);
+       if (r) {
+               DRM_ERROR("Failed to create scheduler on ring %s.\n",
+                         ring->name);
+               return r;
        }
 
        return 0;
This page took 0.025014 seconds and 5 git commands to generate.