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/vmwgfx vmwgfx(4): Use bus_dma...



details:   https://anonhg.NetBSD.org/src/rev/d434e12e20ac
branches:  trunk
changeset: 372023:d434e12e20ac
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Oct 25 23:35:29 2022 +0000

description:
vmwgfx(4): Use bus_dma tag, not struct device, for dma_pool shims.

diffstat:

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

diffs (42 lines):

diff -r e089e35999fe -r d434e12e20ac sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_cmdbuf.c
--- a/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_cmdbuf.c     Tue Oct 25 23:34:05 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_cmdbuf.c     Tue Oct 25 23:35:29 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmwgfx_cmdbuf.c,v 1.6 2022/10/25 23:33:44 riastradh Exp $      */
+/*     $NetBSD: vmwgfx_cmdbuf.c,v 1.7 2022/10/25 23:35:29 riastradh Exp $      */
 
 // SPDX-License-Identifier: GPL-2.0 OR MIT
 /**************************************************************************
@@ -28,7 +28,7 @@
  **************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vmwgfx_cmdbuf.c,v 1.6 2022/10/25 23:33:44 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vmwgfx_cmdbuf.c,v 1.7 2022/10/25 23:35:29 riastradh Exp $");
 
 #include <linux/dmapool.h>
 #include <linux/pci.h>
@@ -1373,7 +1373,11 @@
        man->num_contexts = (dev_priv->capabilities & SVGA_CAP_HP_CMD_QUEUE) ?
                2 : 1;
        man->headers = dma_pool_create("vmwgfx cmdbuf",
+#ifdef __NetBSD__
+                                      dev_priv->dev->dmat,
+#else
                                       &dev_priv->dev->pdev->dev,
+#endif
                                       sizeof(SVGACBHeader),
                                       64, PAGE_SIZE);
        if (!man->headers) {
@@ -1382,7 +1386,11 @@
        }
 
        man->dheaders = dma_pool_create("vmwgfx inline cmdbuf",
+#ifdef __NetBSD__
+                                       dev_priv->dev->dmat,
+#else
                                        &dev_priv->dev->pdev->dev,
+#endif
                                        sizeof(struct vmw_cmdbuf_dheader),
                                        64, PAGE_SIZE);
        if (!man->dheaders) {



Home | Main Index | Thread Index | Old Index