Index: sys/external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_gpuobj.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_gpuobj.c,v retrieving revision 1.1.1.1 diff -p -u -r1.1.1.1 nouveau_core_gpuobj.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_gpuobj.c 6 Aug 2014 12:36:23 -0000 1.1.1.1 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_gpuobj.c 5 Nov 2015 23:45:14 -0000 @@ -205,6 +205,7 @@ _nouveau_gpuobj_wr32(struct nouveau_obje if (gpuobj->node) addr += gpuobj->node->offset; pfuncs->wr32(gpuobj->parent, addr, data); + __insn_barrier(); printf(""); } static struct nouveau_oclass Index: sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_falcon.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_falcon.c,v retrieving revision 1.1.1.1 diff -p -u -r1.1.1.1 nouveau_engine_falcon.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_falcon.c 6 Aug 2014 12:36:24 -0000 1.1.1.1 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_falcon.c 5 Nov 2015 23:45:14 -0000 @@ -59,6 +59,7 @@ _nouveau_falcon_wr32(struct nouveau_obje { struct nouveau_falcon *falcon = (void *)object; nv_wr32(falcon, falcon->addr + addr, data); + __insn_barrier(); printf(""); } static void * Index: sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_xtensa.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_xtensa.c,v retrieving revision 1.2 diff -p -u -r1.2 nouveau_engine_xtensa.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_xtensa.c 23 Aug 2014 08:03:33 -0000 1.2 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_xtensa.c 5 Nov 2015 23:45:14 -0000 @@ -39,6 +39,7 @@ _nouveau_xtensa_wr32(struct nouveau_obje { struct nouveau_xtensa *xtensa = (void *)object; nv_wr32(xtensa, xtensa->addr + addr, data); + __insn_barrier(); printf(""); } int Index: sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c,v retrieving revision 1.8 diff -p -u -r1.8 nouveau_engine_device_base.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c 5 Nov 2015 20:32:39 -0000 1.8 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c 5 Nov 2015 23:45:14 -0000 @@ -303,6 +303,11 @@ nouveau_devobj_ctor(struct nouveau_objec nv_error(device, "unable to map device registers\n"); return ret; } + printf("%s: subdev mmio 0x%"PRIxMAX"/0x%"PRIxMAX + ", handle=%"PRIxMAX"\n", + __func__, + (uintmax_t)mmio_base, (uintmax_t)mmio_size, + (uintmax_t)mmioh); nv_subdev(device)->mmiot = mmiot; nv_subdev(device)->mmioh = mmioh; nv_subdev(device)->mmiosz = mmio_size; @@ -411,6 +416,7 @@ static void nouveau_devobj_wr32(struct nouveau_object *object, u64 addr, u32 data) { nv_wr32(object->engine, addr, data); + __insn_barrier(); printf(""); } static struct nouveau_ofuncs Index: sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nv50.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nv50.c,v retrieving revision 1.2 diff -p -u -r1.2 nouveau_engine_disp_nv50.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nv50.c 23 Aug 2014 08:03:33 -0000 1.2 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nv50.c 5 Nov 2015 23:45:14 -0000 @@ -99,6 +99,7 @@ nv50_disp_chan_wr32(struct nouveau_objec struct nv50_disp_priv *priv = (void *)object->engine; struct nv50_disp_chan *chan = (void *)object; nv_wr32(priv, 0x640000 + (chan->chid * 0x1000) + addr, data); + __insn_barrier(); printf(""); } /******************************************************************************* Index: sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c,v retrieving revision 1.3 diff -p -u -r1.3 nouveau_engine_fifo_base.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c 23 Aug 2014 08:03:33 -0000 1.3 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c 5 Nov 2015 23:45:14 -0000 @@ -98,6 +98,13 @@ nouveau_fifo_channel_create_(struct nouv addr + (chan->chid * size), size, 0, &chan->bsh); if (ret) return ret; + printf("%s: fifo chan 0x%"PRIxMAX"/0x%"PRIxMAX + ", handle=%"PRIxMAX"\n", + __func__, + (uintmax_t)(nv_device_resource_start(device, bar) + addr + + (chan->chid * size)), + (uintmax_t)size, + (uintmax_t)chan->bsh); #else chan->user = ioremap(nv_device_resource_start(device, bar) + addr + (chan->chid * size), size); @@ -156,6 +163,7 @@ _nouveau_fifo_channel_wr32(struct nouvea struct nouveau_fifo_chan *chan = (void *)object; #ifdef __NetBSD__ bus_space_write_4(chan->bst, chan->bsh, addr, data); + __insn_barrier(); printf(""); #else iowrite32_native(data, chan->user + addr); #endif Index: sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/subdev.h =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/subdev.h,v retrieving revision 1.2 diff -p -u -r1.2 subdev.h --- sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/subdev.h 6 Aug 2014 13:35:13 -0000 1.2 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/subdev.h 5 Nov 2015 23:45:14 -0000 @@ -132,6 +132,7 @@ nv_wr32(void *obj, u32 addr, u32 data) nv_spam(subdev, "nv_wr32 0x%06x 0x%08x\n", addr, data); #ifdef __NetBSD__ bus_space_write_stream_4(subdev->mmiot, subdev->mmioh, addr, data); + __insn_barrier(); printf(""); #else iowrite32_native(data, subdev->mmio + addr); #endif Index: sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bar/nouveau_subdev_bar_base.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bar/nouveau_subdev_bar_base.c,v retrieving revision 1.3 diff -p -u -r1.3 nouveau_subdev_bar_base.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bar/nouveau_subdev_bar_base.c 18 Oct 2015 15:42:00 -0000 1.3 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bar/nouveau_subdev_bar_base.c 5 Nov 2015 23:45:14 -0000 @@ -103,6 +103,7 @@ nouveau_barobj_wr32(struct nouveau_objec struct nouveau_barobj *barobj = (void *)object; #ifdef __NetBSD__ bus_space_write_4(barobj->iomemt, barobj->iomemh, addr, data); + __insn_barrier(); printf(""); #else iowrite32_native(data, barobj->iomem + addr); #endif @@ -151,6 +152,12 @@ nouveau_bar_create_(struct nouveau_objec if (bus_space_map(bar->iomemt, nv_device_resource_start(device, 3), bar->iomemsz, 0, &bar->iomemh)) bar->iomemsz = 0; /* XXX Fail? */ + printf("%s: bar iomem 0x%"PRIxMAX"/0x%"PRIxMAX + ", handle=%"PRIxMAX"\n", + __func__, + (uintmax_t)nv_device_resource_start(device, 3), + (uintmax_t)bar->iomemsz, + (uintmax_t)bar->iomemh); } #else if (nv_device_resource_len(device, 3) != 0) Index: sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c,v retrieving revision 1.3 diff -p -u -r1.3 nouveau_subdev_bios_base.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c 27 Oct 2015 13:13:47 -0000 1.3 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bios/nouveau_subdev_bios_base.c 5 Nov 2015 23:45:14 -0000 @@ -467,6 +467,7 @@ nouveau_bios_wr32(struct nouveau_object { struct nouveau_bios *bios = (void *)object; put_unaligned_le32(data, &bios->data[addr]); + __insn_barrier(); printf(""); } static int Index: sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv04.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv04.c,v retrieving revision 1.2 diff -p -u -r1.2 nouveau_subdev_instmem_nv04.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv04.c 23 Aug 2014 08:03:34 -0000 1.2 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv04.c 5 Nov 2015 23:45:14 -0000 @@ -45,6 +45,7 @@ nv04_instobj_wr32(struct nouveau_object { struct nv04_instobj_priv *node = (void *)object; nv_wo32(object->engine, node->mem->offset + addr, data); + __insn_barrier(); printf(""); } static void @@ -109,7 +110,8 @@ nv04_instmem_rd32(struct nouveau_object static void nv04_instmem_wr32(struct nouveau_object *object, u64 addr, u32 data) { - return nv_wr32(object, 0x700000 + addr, data); + nv_wr32(object, 0x700000 + addr, data); + __insn_barrier(); printf(""); } void Index: sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv40.c =================================================================== RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv40.c,v retrieving revision 1.2 diff -p -u -r1.2 nouveau_subdev_instmem_nv40.c --- sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv40.c 23 Aug 2014 08:03:34 -0000 1.2 +++ sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv40.c 5 Nov 2015 23:45:14 -0000 @@ -52,6 +52,7 @@ nv40_instmem_wr32(struct nouveau_object struct nv04_instmem_priv *priv = (void *)object; #ifdef __NetBSD__ bus_space_write_4(priv->iomemt, priv->iomemh, addr, data); + __insn_barrier(); printf(""); #else iowrite32_native(data, priv->iomem + addr); #endif @@ -86,6 +87,12 @@ nv40_instmem_ctor(struct nouveau_object nv_error(priv, "unable to map PRAMIN BAR\n"); return -EFAULT; } + printf("%s: nv40 iomem 0x%"PRIxMAX"/0x%"PRIxMAX + ", handle=%"PRIxMAX"\n", + __func__, + (uintmax_t)nv_device_resource_start(device, bar), + (uintmax_t)priv->iomemsz, + (uintmax_t)priv->iomemh); #else priv->iomem = ioremap(nv_device_resource_start(device, bar), nv_device_resource_len(device, bar));