1.\" $NetBSD: ps.4,v 1.10 2003/08/07 10:31:13 agc Exp $ 2.\" 3.\" Copyright (c) 1983, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" from: @(#)ps.4 8.1 (Berkeley) 6/5/93 31.\" 32.Dd June 5, 1993 33.Dt PS 4 vax 34.Os 35.Sh NAME 36.Nm ps 37.Nd Evans and Sutherland Picture System 2 graphics device interface 38.Sh SYNOPSIS 39.Cd "ps0 at uba? csr 0172460 vector psclockintr pssystemintr" 40.Sh DESCRIPTION 41NOTE: This driver has not been ported from 42.Bx 4.4 43yet. 44.Pp 45The 46.Nm ps 47driver provides access 48to an Evans and 49Sutherland Picture System 2 graphics device. 50Each minor device is a new 51.Tn PS2 . 52When the device is opened, its interface registers are mapped, 53via virtual memory, into a user process's address space. 54This allows the user process very high bandwidth to the device 55with no system call overhead. 56.Pp 57.Tn DMA 58to and from the 59.Tn PS2 60is not supported. All read and write 61system calls will fail. 62All data is moved to and from the 63.Tn PS2 64via programmed 65.Tn I/O 66using 67the device's interface registers. 68.Pp 69Commands are fed to and from the driver using the following 70.Xr ioctl 2 Ns s : 71.Bl -tag -width PSIOSINGLEREFRESH 72.It Dv PSIOGETADDR 73Returns the virtual address through which the user process can access 74the device's interface registers. 75.It Dv PSIOAUTOREFRESH 76Start auto refreshing the screen. 77The argument is an address in user space where the following data resides. 78The first longword is a 79.Em count 80of the number of static refresh buffers. 81The next 82.Em count 83longwords are the addresses in refresh memory where 84the refresh buffers lie. 85The driver will cycle through these refresh buffers displaying them one by one 86on the screen. 87.It Dv PSIOAUTOMAP 88Start automatically passing the display file through the matrix processor and 89into the refresh buffer. 90The argument is an address in user memory where the following data resides. 91The first longword is a 92.Em count 93of the number of display files to operate on. 94The next 95.Em count 96longwords are the address of these display files. 97The final longword is the address in refresh buffer memory where transformed 98coordinates are to be placed if the driver is not in double buffer mode (see 99below). 100.It Dv PSIODOUBLEBUFFER 101Cause the driver to double buffer the output from the map that 102is going to the refresh buffer. 103The argument is again a user space address where the real arguments are stored. 104The first argument is the starting address of refresh memory where the two 105double buffers are located. 106The second argument is the length of each double buffer. 107The refresh mechanism displays the current double buffer, in addition 108to its static refresh lists, when in double buffer mode. 109.It Dv PSIOSINGLEREFRESH 110Single step the refresh process. That is, the driver does not continually 111refresh the screen. 112.It Dv PSIOSINGLEMAP 113Single step the matrix process. 114The driver does not automatically feed display files through the matrix unit. 115.It Dv PSIOSINGLEBUFFER 116Turn off double buffering. 117.It Dv PSIOTIMEREFRESH 118The argument is a count of the number of refresh interrupts to take 119before turning off the screen. This is used to do time exposures. 120.It Dv PSIOWAITREFRESH 121Suspend the user process until a refresh interrupt has occurred. 122If in 123.Dv TIMEREFRESH 124mode, suspend until count refreshes have occurred. 125.It Dv PSIOSTOPREFRESH 126Wait for the next refresh, stop all refreshes, and then return to user process. 127.It Dv PSIOWAITMAP 128Wait until a map done interrupt has occurred. 129.It Dv PSIOSTOPMAP 130Wait for a map done interrupt, do not restart the map, and then 131return to the user. 132.El 133.Sh FILES 134.Bl -tag -width /dev/psxx 135.It Pa /dev/ps 136.El 137.Sh DIAGNOSTICS 138.Bl -diag 139.It ps device intr. 140.It ps DMA intr. 141An interrupt was received from the device. 142This shouldn't happen, 143check your device configuration for overlapping interrupt vectors. 144.El 145.Sh HISTORY 146The 147.Nm 148driver appeared in 149.Bx 4.2 . 150.Sh BUGS 151An invalid access (e.g., longword) to a mapped interface register 152can cause the system to crash with a machine check. 153A user process could possibly cause infinite interrupts hence 154bringing things to a crawl. 155