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/i915/gem i915: Use BUS_DMA_CO...



details:   https://anonhg.NetBSD.org/src/rev/fb7d77453d8e
branches:  trunk
changeset: 1029032:fb7d77453d8e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:45:43 2021 +0000

description:
i915: Use BUS_DMA_COHERENT where Linux uses dma_alloc_coherent.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_phys.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 3d8f09ef16d4 -r fb7d77453d8e sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_phys.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_phys.c   Sun Dec 19 12:45:35 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_phys.c   Sun Dec 19 12:45:43 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_phys.c,v 1.7 2021/12/19 12:10:42 riastradh Exp $      */
+/*     $NetBSD: i915_gem_phys.c,v 1.8 2021/12/19 12:45:43 riastradh Exp $      */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_phys.c,v 1.7 2021/12/19 12:10:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_phys.c,v 1.8 2021/12/19 12:45:43 riastradh Exp $");
 
 #include <linux/highmem.h>
 #include <linux/shmem_fs.h>
@@ -66,7 +66,8 @@
                return -ENOMEM;
        KASSERT(rsegs == 1);
        ret = -bus_dmamem_map(dmat, &obj->mm.u.phys.seg, 1,
-           roundup_pow_of_two(obj->base.size), &vaddr, BUS_DMA_WAITOK);
+           roundup_pow_of_two(obj->base.size), &vaddr,
+           BUS_DMA_WAITOK|BUS_DMA_COHERENT);
        if (ret)
                goto err_pci;
        obj->mm.u.phys.kva = vaddr;



Home | Main Index | Thread Index | Old Index