141480Smckusick /* 241480Smckusick * Copyright (c) 1988 University of Utah. 363146Sbostic * Copyright (c) 1990, 1993 463146Sbostic * The Regents of the University of California. All rights reserved. 541480Smckusick * 641480Smckusick * This code is derived from software contributed to Berkeley by 741480Smckusick * the Systems Programming Group of the University of Utah Computer 841480Smckusick * Science Department. 941480Smckusick * 1041480Smckusick * %sccs.include.redist.c% 1141480Smckusick * 12*64475Shibler * from: Utah $Hdr: grfioctl.h 1.17 93/08/13$ 1341480Smckusick * 14*64475Shibler * @(#)grfioctl.h 8.2 (Berkeley) 09/09/93 1541480Smckusick */ 1641480Smckusick 1741480Smckusick struct grfinfo { 1841480Smckusick int gd_id; /* HPUX identifier */ 1941480Smckusick caddr_t gd_regaddr; /* control registers physaddr */ 2041480Smckusick int gd_regsize; /* control registers size */ 2141480Smckusick caddr_t gd_fbaddr; /* frame buffer physaddr */ 2241480Smckusick int gd_fbsize; /* frame buffer size */ 2341480Smckusick short gd_colors; /* number of colors */ 2441480Smckusick short gd_planes; /* number of planes */ 2541480Smckusick /* new stuff */ 2641480Smckusick int gd_fbwidth; /* frame buffer width */ 2741480Smckusick int gd_fbheight; /* frame buffer height */ 2841480Smckusick int gd_dwidth; /* displayed part width */ 2941480Smckusick int gd_dheight; /* displayed part height */ 3041480Smckusick int gd_pad[6]; /* for future expansion */ 3141480Smckusick }; 3241480Smckusick 3341480Smckusick /* types */ 3441480Smckusick #define GRFGATOR 8 3541480Smckusick #define GRFBOBCAT 9 3641480Smckusick #define GRFCATSEYE 9 3741480Smckusick #define GRFRBOX 10 3853923Shibler #define GRFFIREEYE 11 3953923Shibler #define GRFHYPERION 12 4041480Smckusick #define GRFDAVINCI 14 4141480Smckusick 4241480Smckusick /* 4341480Smckusick * HPUX ioctls (here for the benefit of the driver) 4441480Smckusick */ 4541480Smckusick struct grf_slot { 4641480Smckusick int slot; 4741480Smckusick u_char *addr; 4841480Smckusick }; 4941480Smckusick 50*64475Shibler struct grf_fbinfo { 51*64475Shibler int id; 52*64475Shibler int mapsize; 53*64475Shibler int dwidth, dlength; 54*64475Shibler int width, length; 55*64475Shibler int xlen; 56*64475Shibler int bpp, bppu; 57*64475Shibler int npl, nplbytes; 58*64475Shibler char name[32]; 59*64475Shibler int attr; 60*64475Shibler caddr_t fbbase, regbase; 61*64475Shibler caddr_t regions[6]; 62*64475Shibler }; 63*64475Shibler 6441480Smckusick #ifndef _IOH 6541480Smckusick #define _IOH(x,y) (IOC_IN|((x)<<8)|y) /* IOC_IN is IOC_VOID */ 6641480Smckusick 6741480Smckusick #define GCID _IOR('G', 0, int) 6841480Smckusick #define GCON _IOH('G', 1) 6941480Smckusick #define GCOFF _IOH('G', 2) 7041480Smckusick #define GCAON _IOH('G', 3) 7141480Smckusick #define GCAOFF _IOH('G', 4) 7241480Smckusick #define GCMAP _IOWR('G', 5, int) 7341480Smckusick #define GCUNMAP _IOWR('G', 6, int) 7441480Smckusick #define GCLOCK _IOH('G', 7) 7541480Smckusick #define GCUNLOCK _IOH('G', 8) 7641480Smckusick #define GCLOCK_MINIMUM _IOH('G', 9) 7741480Smckusick #define GCUNLOCK_MINIMUM _IOH('G', 10) 7841480Smckusick #define GCSTATIC_CMAP _IOH('G', 11) 7941480Smckusick #define GCVARIABLE_CMAP _IOH('G', 12) 8041480Smckusick #define GCSLOT _IOWR('G', 13, struct grf_slot) 81*64475Shibler #define GCDESCRIBE _IOR('G', 21, struct grf_fbinfo) 8241480Smckusick 8341480Smckusick /* XXX: for now */ 8441480Smckusick #define IOMAPID _IOR('M',0,int) /* ??? */ 8541480Smckusick #define IOMAPMAP _IOWR('M',1,int) 8641480Smckusick #define IOMAPUNMAP _IOWR('M',2,int) 8741480Smckusick #endif 8841480Smckusick 8941480Smckusick /* 9041480Smckusick * BSD ioctls 9141480Smckusick */ 9241480Smckusick #define GRFIOCGINFO _IOR('G', 0, struct grfinfo) /* get info on device */ 9341480Smckusick #define GRFIOCON _IO('G', 1) /* turn graphics on */ 9441480Smckusick #define GRFIOCOFF _IO('G', 2) /* turn graphics off */ 9541480Smckusick #define GRFIOCMAP _IOWR('G', 5, int) /* map in regs+framebuffer */ 9641480Smckusick #define GRFIOCUNMAP _IOW('G', 6, int) /* unmap regs+framebuffer */ 97