Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax/dev - Re-arrange the control map that is expor...



details:   https://anonhg.NetBSD.org/src/rev/1137b1951586
branches:  trunk
changeset: 477608:1137b1951586
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Oct 24 15:33:45 1999 +0000

description:
- Re-arrange the control map that is exported to user space. This map now
  includes the STIC poll registers.
- Don't bother enabling ISR driven packet queueing on device open. It doesn't
  work for the PXG due to severe dainbramage on the part of DEC and doesn't
  work properly on the 3min due to the spl stuff being a mess.

diffstat:

 sys/arch/pmax/dev/px.c    |  30 +++++++++++++++++++-----------
 sys/arch/pmax/dev/pxvar.h |  10 +++++-----
 2 files changed, 24 insertions(+), 16 deletions(-)

diffs (89 lines):

diff -r 480ac9bd9315 -r 1137b1951586 sys/arch/pmax/dev/px.c
--- a/sys/arch/pmax/dev/px.c    Sun Oct 24 15:14:57 1999 +0000
+++ b/sys/arch/pmax/dev/px.c    Sun Oct 24 15:33:45 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: px.c,v 1.18 1999/09/25 14:45:21 ad Exp $ */
+/*     $NetBSD: px.c,v 1.19 1999/10/24 15:33:45 ad Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.18 1999/09/25 14:45:21 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.19 1999/10/24 15:33:45 ad Exp $");
 
 /*
  * px.c: driver for the DEC TURBOchannel 2D and 3D accelerated framebuffers
@@ -1695,11 +1695,6 @@
        pmEventQueueInit(&pxi->pxi_fbuaccess.scrInfo.qe);
        genConfigMouse();
 
-       /* Enable interrupt driven operation */
-       pxi->pxi_lpw = 0;
-       pxi->pxi_lpr = 0;
-       pxi->pxi_flg = (pxi->pxi_flg & ~PX_ISR_MASK) | PX_ISR_ENABLE;
-
        /* Turn packet-done interrupts on */
        stic = pxi->pxi_stic;
        s = stic->ipdvint | STIC_INT_P_WE | STIC_INT_P_EN;
@@ -1907,15 +1902,28 @@
 
        if ((pxi->pxi_flg & PX_OPEN) == 0)
                return (EBADF);
+       
+       /* 
+        * STIC control registers
+        */     
+       if (off < NBPG)
+               return mips_btop(MIPS_KSEG1_TO_PHYS(pxi->pxi_stic) + off);
+       off -= NBPG;
+       
+       /*
+        * STIC poll registers
+        */
+       if (off < sizeof(int32_t) * 4096)
+               return mips_btop(MIPS_KSEG1_TO_PHYS(pxi->pxi_poll) + off);
+       off -= sizeof(int32_t) * 4096;
 
+       /*
+        * 'struct px_info' and ringbuffer
+        */ 
        if (off < PXMAP_INFO_SIZE + PXMAP_RBUF_SIZE)
                return mips_btop(MIPS_KSEG1_TO_PHYS(pxi) + off);
-
        off -= (PXMAP_INFO_SIZE + PXMAP_RBUF_SIZE);
 
-       if (off < NBPG)
-               return mips_btop(MIPS_KSEG1_TO_PHYS(pxi->pxi_stic) + off);
-
        return (-1);
 }
 
diff -r 480ac9bd9315 -r 1137b1951586 sys/arch/pmax/dev/pxvar.h
--- a/sys/arch/pmax/dev/pxvar.h Sun Oct 24 15:14:57 1999 +0000
+++ b/sys/arch/pmax/dev/pxvar.h Sun Oct 24 15:33:45 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxvar.h,v 1.6 1999/05/18 21:51:58 ad Exp $ */
+/*     $NetBSD: pxvar.h,v 1.7 1999/10/24 15:33:45 ad Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -100,12 +100,12 @@
 
 /* Map returned by ioctl QIOCGMAP for Xserver */
 typedef struct px_map {
+       struct stic_regs stic;
+       u_char          __pad1[NBPG - sizeof(struct stic_regs)];
+       int32_t         poll[4096];
        struct px_info  info;
        u_char          __pad0[NBPG - sizeof(struct px_info)];
-       u_char          rbuf[65536];
-       u_char          ibuf[16384];
-       struct stic_regs stic;
-       u_char          __pad1[NBPG - sizeof(struct stic_regs)];
+       u_char          rbuf[81920];
 } px_map;
 
 /*



Home | Main Index | Thread Index | Old Index