Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/scheduler drm: Omit bogus spi...



details:   https://anonhg.NetBSD.org/src/rev/fdb495b4b1d9
branches:  trunk
changeset: 1029004:fdb495b4b1d9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:41:44 2021 +0000

description:
drm: Omit bogus spin locking around kthread_stop, which blocks.

Blocking is not allowed while holding a spin lock, and there's
nothing here that needs a lock either.

diffstat:

 sys/external/bsd/drm2/dist/drm/scheduler/sched_main.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r ffe44cc7d1de -r fdb495b4b1d9 sys/external/bsd/drm2/dist/drm/scheduler/sched_main.c
--- a/sys/external/bsd/drm2/dist/drm/scheduler/sched_main.c     Sun Dec 19 12:41:33 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/scheduler/sched_main.c     Sun Dec 19 12:41:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sched_main.c,v 1.6 2021/12/19 12:34:24 riastradh Exp $ */
+/*     $NetBSD: sched_main.c,v 1.7 2021/12/19 12:41:44 riastradh Exp $ */
 
 /*
  * Copyright 2015 Advanced Micro Devices, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sched_main.c,v 1.6 2021/12/19 12:34:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sched_main.c,v 1.7 2021/12/19 12:41:44 riastradh Exp $");
 
 #include <linux/kthread.h>
 #include <linux/wait.h>
@@ -880,9 +880,7 @@
 void drm_sched_fini(struct drm_gpu_scheduler *sched)
 {
        if (sched->thread) {
-               spin_lock(&sched->job_list_lock);
                kthread_stop(sched->thread);
-               spin_unlock(&sched->job_list_lock);
        }
 
        sched->ready = false;



Home | Main Index | Thread Index | Old Index