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/i915drm Use the offset in mmap calcula...



details:   https://anonhg.NetBSD.org/src/rev/d270f88f76d4
branches:  trunk
changeset: 375954:d270f88f76d4
user:      nat <nat%NetBSD.org@localhost>
date:      Mon May 22 22:36:53 2023 +0000

description:
Use the offset in mmap calculations.

It fixes wsfb(4) when used with intelfb(4).

Ok riastradh@

XXX pullup-10

diffstat:

 sys/external/bsd/drm2/i915drm/intelfb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r efb7203b5de2 -r d270f88f76d4 sys/external/bsd/drm2/i915drm/intelfb.c
--- a/sys/external/bsd/drm2/i915drm/intelfb.c   Mon May 22 22:09:45 2023 +0000
+++ b/sys/external/bsd/drm2/i915drm/intelfb.c   Mon May 22 22:36:53 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intelfb.c,v 1.24 2022/07/18 23:34:02 riastradh Exp $   */
+/*     $NetBSD: intelfb.c,v 1.25 2023/05/22 22:36:53 nat Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.24 2022/07/18 23:34:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.25 2023/05/22 22:36:53 nat Exp $");
 
 #include <sys/types.h>
 #include <sys/bus.h>
@@ -181,8 +181,8 @@ intelfb_drmfb_mmapfb(struct drmfb_softc 
        KASSERT(0 <= offset);
        KASSERT(offset < vma->node.size);
 
-       return bus_space_mmap(dev->bst, ggtt->gmadr.start, vma->node.start,
-           prot, BUS_SPACE_MAP_PREFETCHABLE);
+       return bus_space_mmap(dev->bst, ggtt->gmadr.start,
+           vma->node.start + offset, prot, BUS_SPACE_MAP_PREFETCHABLE);
 }
 
 static void



Home | Main Index | Thread Index | Old Index