Merge drm/drm-next into drm-misc-next
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_debugfs.c
index a53f436..c1efa13 100644 (file)
@@ -1665,9 +1665,9 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
        for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
                struct amdgpu_ring *ring = adev->rings[i];
 
-               if (!ring || !ring->sched.thread)
+               if (!ring || !drm_sched_wqueue_ready(&ring->sched))
                        continue;
-               kthread_park(ring->sched.thread);
+               drm_sched_wqueue_stop(&ring->sched);
        }
 
        seq_puts(m, "run ib test:\n");
@@ -1681,9 +1681,9 @@ static int amdgpu_debugfs_test_ib_show(struct seq_file *m, void *unused)
        for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
                struct amdgpu_ring *ring = adev->rings[i];
 
-               if (!ring || !ring->sched.thread)
+               if (!ring || !drm_sched_wqueue_ready(&ring->sched))
                        continue;
-               kthread_unpark(ring->sched.thread);
+               drm_sched_wqueue_start(&ring->sched);
        }
 
        up_write(&adev->reset_domain->sem);
@@ -1903,7 +1903,8 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)
 
        ring = adev->rings[val];
 
-       if (!ring || !ring->funcs->preempt_ib || !ring->sched.thread)
+       if (!ring || !ring->funcs->preempt_ib ||
+           !drm_sched_wqueue_ready(&ring->sched))
                return -EINVAL;
 
        /* the last preemption failed */
@@ -1921,7 +1922,7 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)
                goto pro_end;
 
        /* stop the scheduler */
-       kthread_park(ring->sched.thread);
+       drm_sched_wqueue_stop(&ring->sched);
 
        /* preempt the IB */
        r = amdgpu_ring_preempt_ib(ring);
@@ -1955,7 +1956,7 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)
 
 failure:
        /* restart the scheduler */
-       kthread_unpark(ring->sched.thread);
+       drm_sched_wqueue_start(&ring->sched);
 
        up_read(&adev->reset_domain->sem);