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/radeon Ifdef out unreachable ...



details:   https://anonhg.NetBSD.org/src/rev/5d14bc037721
branches:  trunk
changeset: 364559:5d14bc037721
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:48:30 2018 +0000

description:
Ifdef out unreachable linuxisms while we have no radeon userptr.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_cs.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r d64c9b337012 -r 5d14bc037721 sys/external/bsd/drm2/dist/drm/radeon/radeon_cs.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_cs.c Mon Aug 27 07:48:20 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_cs.c Mon Aug 27 07:48:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_cs.c,v 1.2 2018/08/27 04:58:36 riastradh Exp $  */
+/*     $NetBSD: radeon_cs.c,v 1.3 2018/08/27 07:48:30 riastradh Exp $  */
 
 /*
  * Copyright 2008 Jerome Glisse.
@@ -27,7 +27,7 @@
  *    Jerome Glisse <glisse%freedesktop.org@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_cs.c,v 1.2 2018/08/27 04:58:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_cs.c,v 1.3 2018/08/27 07:48:30 riastradh Exp $");
 
 #include <linux/list_sort.h>
 #include <drm/drmP.h>
@@ -181,13 +181,21 @@
        if (p->cs_flags & RADEON_CS_USE_VM)
                p->vm_bos = radeon_vm_get_bos(p->rdev, p->ib.vm,
                                              &p->validated);
+#ifdef __NetBSD__
+       KASSERTMSG(!need_mmap_lock,
+           "someone didn't finish adding support for userptr"
+           " and it wasn't me");
+#else
        if (need_mmap_lock)
                down_read(&current->mm->mmap_sem);
+#endif
 
        r = radeon_bo_list_validate(p->rdev, &p->ticket, &p->validated, p->ring);
 
+#ifndef __NetBSD__
        if (need_mmap_lock)
                up_read(&current->mm->mmap_sem);
+#endif
 
        return r;
 }



Home | Main Index | Thread Index | Old Index