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/gt i915: Fix up #ifdef a...



details:   https://anonhg.NetBSD.org/src/rev/8e9124e20b8b
branches:  trunk
changeset: 1028531:8e9124e20b8b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:15:41 2021 +0000

description:
i915: Fix up #ifdef around sg dma iteration.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gt/gen8_ppgtt.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 5e0200f6dcc8 -r 8e9124e20b8b sys/external/bsd/drm2/dist/drm/i915/gt/gen8_ppgtt.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/gen8_ppgtt.c       Sun Dec 19 11:15:33 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/gen8_ppgtt.c       Sun Dec 19 11:15:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gen8_ppgtt.c,v 1.5 2021/12/19 11:15:18 riastradh Exp $ */
+/*     $NetBSD: gen8_ppgtt.c,v 1.6 2021/12/19 11:15:41 riastradh Exp $ */
 
 // SPDX-License-Identifier: MIT
 /*
@@ -6,7 +6,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gen8_ppgtt.c,v 1.5 2021/12/19 11:15:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gen8_ppgtt.c,v 1.6 2021/12/19 11:15:41 riastradh Exp $");
 
 #include <linux/log2.h>
 
@@ -506,10 +506,13 @@
 #ifdef __NetBSD__
                        GEM_BUG_ON((iter->map->dm_segs[iter->seg].ds_len -
                                iter->off) < page_size);
+                       vaddr[index++] = encode |
+                           (iter->map->dm_segs[iter->seg].ds_addr
+                               + iter->off);
 #else
                        GEM_BUG_ON(iter->sg->length < page_size);
+                       vaddr[index++] = encode | iter->dma;
 #endif
-                       vaddr[index++] = encode | iter->dma;
 
                        start += page_size;
 #ifdef __NetBSD__



Home | Main Index | Thread Index | Old Index