Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/dreamcast/dev Made it possible to mmap the frame bu...



details:   https://anonhg.NetBSD.org/src/rev/a5d3b6a0fa2d
branches:  trunk
changeset: 504475:a5d3b6a0fa2d
user:      marcus <marcus%NetBSD.org@localhost>
date:      Sun Mar 04 01:36:35 2001 +0000

description:
Made it possible to mmap the frame buffer.

diffstat:

 sys/arch/dreamcast/dev/pvr.c |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r a49b71ac3849 -r a5d3b6a0fa2d sys/arch/dreamcast/dev/pvr.c
--- a/sys/arch/dreamcast/dev/pvr.c      Sun Mar 04 00:41:27 2001 +0000
+++ b/sys/arch/dreamcast/dev/pvr.c      Sun Mar 04 01:36:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pvr.c,v 1.6 2001/02/19 21:37:31 marcus Exp $   */
+/*     $NetBSD: pvr.c,v 1.7 2001/03/04 01:36:35 marcus Exp $   */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt.
@@ -65,7 +65,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.6 2001/02/19 21:37:31 marcus Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.7 2001/03/04 01:36:35 marcus Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -325,7 +325,18 @@
         * XXX This should be easy to support -- just need to define
         * XXX offsets for the contol regs, etc.
         */
-       return (-1);
+
+       struct pvr_softc *sc = v;
+       struct fb_devconfig *dc = sc->sc_dc;
+       paddr_t addr;
+
+       if (offset >= 0 &&
+           offset < sh3_round_page(dc->dc_rowbytes * dc->dc_ht))
+               addr = sh3_btop(dc->dc_paddr + offset);
+       else
+               addr = (-1);    /* XXX bogus */
+
+       return addr;
 }
 
 int



Home | Main Index | Thread Index | Old Index