Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/fdt if the framebuffer address isn't page aligned, s...



details:   https://anonhg.NetBSD.org/src/rev/8bb055c78d49
branches:  trunk
changeset: 320830:8bb055c78d49
user:      macallan <macallan%NetBSD.org@localhost>
date:      Mon Jul 23 00:51:40 2018 +0000

description:
if the framebuffer address isn't page aligned, set fbi_fboffset appropriately

diffstat:

 sys/dev/fdt/simplefb.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r b776c81d9900 -r 8bb055c78d49 sys/dev/fdt/simplefb.c
--- a/sys/dev/fdt/simplefb.c    Sun Jul 22 23:07:48 2018 +0000
+++ b/sys/dev/fdt/simplefb.c    Mon Jul 23 00:51:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: simplefb.c,v 1.5 2018/05/06 10:31:10 jmcneill Exp $ */
+/* $NetBSD: simplefb.c,v 1.6 2018/07/23 00:51:40 macallan Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_wsdisplay_compat.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.5 2018/05/06 10:31:10 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.6 2018/07/23 00:51:40 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -85,8 +85,15 @@
                fbi = data;
                ri = &sc->sc_gen.vd.active->scr_ri;
                error = wsdisplayio_get_fbinfo(ri, fbi);
-               if (error == 0)
+               if (error == 0) {
+                       /*
+                        * XXX
+                        * if the fb isn't page aligned, tell wsfb to skip the
+                        * unaligned part
+                        */
+                       fbi->fbi_fboffset = sc->sc_paddr & PAGE_MASK;
                        fbi->fbi_flags |= WSFB_VRAM_IS_RAM;
+               }
                return error;
        case WSDISPLAYIO_SVIDEO:
                video = *(u_int *)data;



Home | Main Index | Thread Index | Old Index