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 Disable radeon userptr...



details:   https://anonhg.NetBSD.org/src/rev/afa41d82dc4f
branches:  trunk
changeset: 992787:afa41d82dc4f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:47:55 2018 +0000

description:
Disable radeon userptr for now.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c |  14 ++++++++++++--
 sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c |  14 ++++++++++++--
 2 files changed, 24 insertions(+), 4 deletions(-)

diffs (84 lines):

diff -r 102cbd168f5c -r afa41d82dc4f sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c        Mon Aug 27 07:47:43 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_gem.c        Mon Aug 27 07:47:55 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_gem.c,v 1.4 2018/08/27 04:58:36 riastradh Exp $ */
+/*     $NetBSD: radeon_gem.c,v 1.5 2018/08/27 07:47:55 riastradh Exp $ */
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *          Jerome Glisse
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_gem.c,v 1.4 2018/08/27 04:58:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_gem.c,v 1.5 2018/08/27 07:47:55 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <drm/radeon_drm.h>
@@ -290,6 +290,15 @@
 int radeon_gem_userptr_ioctl(struct drm_device *dev, void *data,
                             struct drm_file *filp)
 {
+#ifdef __NetBSD__
+       /*
+        * XXX Too painful to contemplate for now.  If you add this,
+        * make sure to update radeon_cs.c radeon_cs_parser_relocs
+        * (need_mmap_lock), and anything else using
+        * radeon_ttm_tt_has_userptr.
+        */
+       return -ENODEV;
+#else
        struct radeon_device *rdev = dev->dev_private;
        struct drm_radeon_gem_userptr *args = data;
        struct drm_gem_object *gobj;
@@ -373,6 +382,7 @@
        r = radeon_gem_handle_lockup(rdev, r);
 
        return r;
+#endif
 }
 
 int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,
diff -r 102cbd168f5c -r afa41d82dc4f sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c        Mon Aug 27 07:47:43 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c        Mon Aug 27 07:47:55 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_ttm.c,v 1.10 2018/08/27 04:58:36 riastradh Exp $        */
+/*     $NetBSD: radeon_ttm.c,v 1.11 2018/08/27 07:47:55 riastradh Exp $        */
 
 /*
  * Copyright 2009 Jerome Glisse.
@@ -32,7 +32,7 @@
  *    Dave Airlie
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_ttm.c,v 1.10 2018/08/27 04:58:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_ttm.c,v 1.11 2018/08/27 07:47:55 riastradh Exp $");
 
 #include <ttm/ttm_bo_api.h>
 #include <ttm/ttm_bo_driver.h>
@@ -880,6 +880,15 @@
 int radeon_ttm_tt_set_userptr(struct ttm_tt *ttm, uint64_t addr,
                              uint32_t flags)
 {
+#ifdef __NetBSD__
+       /*
+        * XXX Too painful to contemplate for now.  If you add this,
+        * make sure to update radeon_cs.c radeon_cs_parser_relocs
+        * (need_mmap_lock), and anything else using
+        * radeon_ttm_tt_has_userptr.
+        */
+       return -ENODEV;
+#else
        struct radeon_ttm_tt *gtt = radeon_ttm_tt_to_gtt(ttm);
 
        if (gtt == NULL)
@@ -889,6 +898,7 @@
        gtt->usermm = current->mm;
        gtt->userflags = flags;
        return 0;
+#endif
 }
 
 bool radeon_ttm_tt_has_userptr(struct ttm_tt *ttm)



Home | Main Index | Thread Index | Old Index