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/nouveau Get nouveau compiling.



details:   https://anonhg.NetBSD.org/src/rev/d44948d862c1
branches:  trunk
changeset: 1028385:d44948d862c1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 10:51:56 2021 +0000

description:
Get nouveau compiling.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/if000a.h                                   |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/ioctl.h                                    |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/object.h                                   |    5 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h                              |    8 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/memory.h                              |   15 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/object.h                              |   14 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/pci.h                                 |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h                              |    5 +-
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/subdev/mmu.h                               |    9 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c                                            |    7 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.h                                            |    3 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c                                           |   15 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c                                         |   20 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_mem.c                                           |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c                                           |    5 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c                              |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_object.c                              |   32 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_client.c                    |   40 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c                     |   20 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_object.c                    |   30 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_oproxy.c                    |   13 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_pci.c     |   30 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_user.c    |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/disp/nouveau_nvkm_engine_disp_dp.c          |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/disp/nouveau_nvkm_engine_disp_wimmgv100.c   |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/disp/nouveau_nvkm_engine_disp_wndwgv100.c   |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/gk104.h                                |    7 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_gk104.c       |   26 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_gpfifogv100.c |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_gpfifotu102.c |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_usergv100.c   |   13 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_usertu102.c   |   13 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_gf100.c           |   12 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_gf117.c           |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_gk20a.c           |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_tu102.c           |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_base.c                  |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_cmdq.c                  |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_msgq.c                  |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_qmgr.c                  |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/nvfw/nouveau_nvkm_nvfw_acr.c                       |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/nvfw/nouveau_nvkm_nvfw_flcn.c                      |   16 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/acr/nouveau_nvkm_subdev_acr_base.c          |    8 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/acr/nouveau_nvkm_subdev_acr_gm200.c         |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/acr/nouveau_nvkm_subdev_acr_gp102.c         |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/acr/nouveau_nvkm_subdev_acr_lsfw.c          |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fault/nouveau_nvkm_subdev_fault_user.c      |   13 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_gp102.c           |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_nv50.c            |   94 ++--
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_ram.c             |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_ramgf100.c        |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fb/nouveau_nvkm_subdev_fb_ramnv1a.c         |    8 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_base.c  |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_gk20a.c |  220 +++------
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv40.c  |   14 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv50.c  |   45 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/ltc/nouveau_nvkm_subdev_ltc_gp10b.c         |    8 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mc/nouveau_nvkm_subdev_mc_gp10b.c           |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/mem.h                                   |   22 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_base.c          |   11 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.c           |   92 ++++-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_memgf100.c      |   13 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_memnv04.c       |   12 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_memnv50.c       |   12 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_tu102.c         |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_umem.c          |   27 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_uvmm.c          |   26 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmm.c           |  161 ++++++-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmmgf100.c      |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmmgm200.c      |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmmgp100.c      |   18 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmmnv04.c       |    8 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmmnv41.c       |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmmnv44.c       |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmmnv50.c       |    8 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/priv.h                                  |    7 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/umem.h                                  |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/vmm.h                                   |   10 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_base.c          |   30 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c          |   14 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pmu/nouveau_nvkm_subdev_pmu_gt215.c         |   13 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/therm/nouveau_nvkm_subdev_therm_gt215.c     |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/therm/nouveau_nvkm_subdev_therm_temp.c      |    6 +-
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/timer/nouveau_nvkm_subdev_timer_base.c      |    6 +-
 sys/external/bsd/drm2/nouveau/files.nouveau                                                    |    4 +-
 sys/external/bsd/drm2/nouveau/nouveau_pci.c                                                    |   12 +-
 sys/external/bsd/drm2/nouveau/nouveaufb.c                                                      |   14 +-
 87 files changed, 1050 insertions(+), 488 deletions(-)

diffs (truncated from 4416 to 300 lines):

diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/if000a.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/if000a.h      Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/if000a.h      Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if000a.h,v 1.2 2021/12/18 23:45:33 riastradh Exp $     */
+/*     $NetBSD: if000a.h,v 1.3 2021/12/19 10:51:56 riastradh Exp $     */
 
 #ifndef __NVIF_IF000A_H__
 #define __NVIF_IF000A_H__
@@ -18,7 +18,11 @@
 struct nvif_mem_ram_v0 {
        __u8  version;
        __u8  pad01[7];
+#ifdef __NetBSD__
+       bus_dmamap_t dma;
+#else
        dma_addr_t *dma;
        struct scatterlist *sgl;
+#endif
 };
 #endif
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/ioctl.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/ioctl.h       Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/ioctl.h       Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioctl.h,v 1.5 2021/12/18 23:45:33 riastradh Exp $      */
+/*     $NetBSD: ioctl.h,v 1.6 2021/12/19 10:51:56 riastradh Exp $      */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVIF_IOCTL_H__
@@ -105,10 +105,14 @@
 struct nvif_ioctl_map_netbsd_v0 {
        /* nvif_ioctl ... */
        __u8  version;
-       __u8  pad01[3];
+#define NVIF_IOCTL_MAP_V0_IO                                               0x00
+#define NVIF_IOCTL_MAP_V0_VA                                               0x01
+       __u8  type;
+       __u8  pad02[6];
        bus_space_tag_t tag;
-       __u32 length;
        __u64 handle;
+       __u64 length;
+       __u8  data[];
 };
 #endif
 
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/object.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/object.h      Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/object.h      Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: object.h,v 1.9 2021/12/18 23:45:33 riastradh Exp $     */
+/*     $NetBSD: object.h,v 1.10 2021/12/19 10:51:56 riastradh Exp $    */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVIF_OBJECT_H__
@@ -47,6 +47,9 @@
 void nvif_object_wr(struct nvif_object *, int, u64, u32);
 int  nvif_object_mthd(struct nvif_object *, u32, void *, u32);
 int  nvif_object_map_handle(struct nvif_object *, void *, u32,
+#ifdef __NetBSD__
+                           bus_space_tag_t *,
+#endif
                            u64 *handle, u64 *length);
 void nvif_object_unmap_handle(struct nvif_object *);
 int  nvif_object_map(struct nvif_object *, void *, u32);
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: client.h,v 1.6 2021/12/18 23:45:33 riastradh Exp $     */
+/*     $NetBSD: client.h,v 1.7 2021/12/19 10:51:56 riastradh Exp $     */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVKM_CLIENT_H__
@@ -13,7 +13,11 @@
        u32 debug;
 
        struct nvkm_client_notify *notify[32];
+#ifdef __NetBSD__
+       rb_tree_t objtree;
+#else
        struct rb_root objroot;
+#endif
 
        bool super;
        void *data;
@@ -45,7 +49,7 @@
 #define nvif_printk(o,l,p,f,a...) do {                                         \
        const struct nvkm_object *_object = (o);                               \
        const struct nvkm_client *_client = _object->client;                   \
-       if (_client->debug >= NV_DBG_##l)                                      \
+       if (_client->debug == NV_DBG_##l || _client->debug > NV_DBG_##l)       \
                printk(KERN_##p "nouveau: %s:%08x:%08x: "f, _client->name,     \
                       _object->handle, _object->oclass, ##a);                 \
 } while(0)
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/memory.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/memory.h Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/memory.h Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memory.h,v 1.4 2021/12/18 23:45:33 riastradh Exp $     */
+/*     $NetBSD: memory.h,v 1.5 2021/12/19 10:51:56 riastradh Exp $     */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVKM_MEMORY_H__
@@ -104,13 +104,23 @@
 } while(0)
 
 #define nvkm_wobj(o,a,p,s) do {                                                \
-       u32 _addr = (a), _size = (s) >> 2, *_data = (void *)(p);               \
+       u32 _addr = (a), _size = (s) >> 2;                                     \
+       const u32 *_data = (const void *)(p);                                  \
        while (_size--) {                                                      \
                nvkm_wo32((o), _addr, *(_data++));                             \
                _addr += 4;                                                    \
        }                                                                      \
 } while(0)
 
+#ifdef __NetBSD__              /* XXX */
+#define nvkm_fill(t,s,o,a,d,c) do {                                            \
+       u64 _a = (a), _c = (c), _d = (d);                                      \
+       (void)nvkm_kmap(o);                                                    \
+       for (; _c; _c--, _a += BIT(s))                                         \
+               nvkm_wo##t((o), _a, _d);                                       \
+       nvkm_done(o);                                                          \
+} while(0)
+#else
 #define nvkm_fill(t,s,o,a,d,c) do {                                            \
        u64 _a = (a), _c = (c), _d = (d), _o = _a >> s, _s = _c << s;          \
        u##t __iomem *_m = nvkm_kmap(o);                                       \
@@ -127,6 +137,7 @@
        }                                                                      \
        nvkm_done(o);                                                          \
 } while(0)
+#endif
 #define nvkm_fo32(o,a,d,c) nvkm_fill(32, 2, (o), (a), (d), (c))
 #define nvkm_fo64(o,a,d,c) nvkm_fill(64, 3, (o), (a), (d), (c))
 #endif
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/object.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/object.h Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/object.h Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: object.h,v 1.6 2021/12/18 23:45:33 riastradh Exp $     */
+/*     $NetBSD: object.h,v 1.7 2021/12/19 10:51:56 riastradh Exp $     */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVKM_OBJECT_H__
@@ -37,9 +37,9 @@
        int (*mthd)(struct nvkm_object *, u32 mthd, void *data, u32 size);
        int (*ntfy)(struct nvkm_object *, u32 mthd, struct nvkm_event **);
 #ifdef __NetBSD__
-       int (*map)(struct nvkm_object *, bus_space_tag_t *tagp,
-                  void *argv, u32 argc,
-                  enum nvkm_object_map *, u64 *addr, u64 *size);
+       int (*map)(struct nvkm_object *, void *argv, u32 argc,
+                  enum nvkm_object_map *,
+                  bus_space_tag_t *tagp, u64 *addr, u64 *size);
 #else
        int (*map)(struct nvkm_object *, void *argv, u32 argc,
                   enum nvkm_object_map *, u64 *addr, u64 *size);
@@ -70,9 +70,9 @@
 int nvkm_object_mthd(struct nvkm_object *, u32 mthd, void *data, u32 size);
 int nvkm_object_ntfy(struct nvkm_object *, u32 mthd, struct nvkm_event **);
 #ifdef __NetBSD__
-int nvkm_object_map(struct nvkm_object *, bus_space_tag_t *,
-                   void *argv, u32 argc,
-                   enum nvkm_object_map *, u64 *addr, u64 *size);
+int nvkm_object_map(struct nvkm_object *, void *argv, u32 argc,
+                   enum nvkm_object_map *,
+                   bus_space_tag_t *, u64 *addr, u64 *size);
 #else
 int nvkm_object_map(struct nvkm_object *, void *argv, u32 argc,
                    enum nvkm_object_map *, u64 *addr, u64 *size);
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/pci.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/pci.h    Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/pci.h    Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.h,v 1.3 2021/12/18 23:45:33 riastradh Exp $        */
+/*     $NetBSD: pci.h,v 1.4 2021/12/19 10:51:56 riastradh Exp $        */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVKM_DEVICE_PCI_H__
@@ -8,6 +8,10 @@
 struct nvkm_device_pci {
        struct nvkm_device device;
        struct pci_dev *pdev;
+#ifdef __NetBSD__
+       bus_dma_tag_t bus_dmat;
+       bus_dma_tag_t dmat;
+#endif
        bool suspend;
 };
 
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subdev.h,v 1.4 2021/12/18 23:45:33 riastradh Exp $     */
+/*     $NetBSD: subdev.h,v 1.5 2021/12/19 10:51:56 riastradh Exp $     */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVKM_SUBDEV_H__
@@ -38,7 +38,8 @@
 /* subdev logging */
 #define nvkm_printk_(s,l,p,f,a...) do {                                        \
        const struct nvkm_subdev *_subdev = (s);                               \
-       if (CONFIG_NOUVEAU_DEBUG >= (l) && _subdev->debug >= (l)) {            \
+       if ((CONFIG_NOUVEAU_DEBUG == (l) || CONFIG_NOUVEAU_DEBUG > (l)) &&     \
+           (_subdev->debug == (l) || _subdev->debug > (l))) {                 \
                dev_##p(_subdev->device->dev, "%s: "f,                         \
                        nvkm_subdev_name[_subdev->index], ##a);                \
        }                                                                      \
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/subdev/mmu.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/subdev/mmu.h  Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/subdev/mmu.h  Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mmu.h,v 1.3 2021/12/18 23:45:33 riastradh Exp $        */
+/*     $NetBSD: mmu.h,v 1.4 2021/12/19 10:51:56 riastradh Exp $        */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NVKM_MMU_H__
@@ -39,8 +39,13 @@
        struct list_head join;
 
        struct list_head list;
+#ifdef __NetBSD__
+       struct rb_tree free;
+       struct rb_tree root;
+#else
        struct rb_root free;
        struct rb_root root;
+#endif
 
        bool bootstrapped;
        atomic_t engref[NVKM_SUBDEV_NR];
@@ -70,7 +75,9 @@
        u64 offset;
 
        struct nvkm_mm_node *mem;
+#ifndef __NetBSD__
        struct scatterlist *sgl;
+#endif
        dma_addr_t *dma;
        u64 *pfn;
        u64 off;
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c       Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c       Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_bo.c,v 1.18 2021/12/19 10:47:46 riastradh Exp $        */
+/*     $NetBSD: nouveau_bo.c,v 1.19 2021/12/19 10:51:56 riastradh Exp $        */
 
 /*
  * Copyright 2007 Dave Airlied
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_bo.c,v 1.18 2021/12/19 10:47:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_bo.c,v 1.19 2021/12/19 10:51:56 riastradh Exp $");
 
 #include <linux/dma-mapping.h>
 #include <linux/swiotlb.h>
@@ -1591,6 +1591,9 @@
 
                        ret = nvif_object_map_handle(&mem->mem.object,
                                                     &args, argc,
+#ifdef __NetBSD__
+                                                    NULL,
+#endif
                                                     &handle, &length);
                        if (ret != 1)
                                return ret ? ret : -EINVAL;
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.h       Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.h       Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_bo.h,v 1.5 2021/12/18 23:45:32 riastradh Exp $ */
+/*     $NetBSD: nouveau_bo.h,v 1.6 2021/12/19 10:51:56 riastradh Exp $ */
 
 /* SPDX-License-Identifier: MIT */
 #ifndef __NOUVEAU_BO_H__
@@ -9,6 +9,7 @@
 #include <ttm/ttm_bo_api.h>
 
 struct nouveau_channel;
+struct nouveau_cli;
 struct nouveau_drm;
 struct nouveau_fence;
 struct nvkm_vm;
diff -r 2951b6036fc4 -r d44948d862c1 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c      Sun Dec 19 10:51:39 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c      Sun Dec 19 10:51:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_drm.c,v 1.21 2021/12/19 10:50:13 riastradh Exp $       */
+/*     $NetBSD: nouveau_drm.c,v 1.22 2021/12/19 10:51:56 riastradh Exp $       */
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@



Home | Main Index | Thread Index | Old Index