1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright (c) 1986,1997-1998 by Sun Microsystems, Inc. 24*7c478bd9Sstevel@tonic-gate * All rights reserved. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_FBIO_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_FBIO_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" /* SunOS4.1.2 5.49 */ 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 35*7c478bd9Sstevel@tonic-gate extern "C" { 36*7c478bd9Sstevel@tonic-gate #endif 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate #ifndef ASM 39*7c478bd9Sstevel@tonic-gate /* 40*7c478bd9Sstevel@tonic-gate * Frame buffer descriptor. 41*7c478bd9Sstevel@tonic-gate * Returned by FBIOGTYPE ioctl on frame buffer devices. 42*7c478bd9Sstevel@tonic-gate */ 43*7c478bd9Sstevel@tonic-gate struct fbtype { 44*7c478bd9Sstevel@tonic-gate int fb_type; /* as defined below */ 45*7c478bd9Sstevel@tonic-gate int fb_height; /* in pixels */ 46*7c478bd9Sstevel@tonic-gate int fb_width; /* in pixels */ 47*7c478bd9Sstevel@tonic-gate int fb_depth; /* bits per pixel */ 48*7c478bd9Sstevel@tonic-gate int fb_cmsize; /* size of color map (entries) */ 49*7c478bd9Sstevel@tonic-gate int fb_size; /* total size in bytes */ 50*7c478bd9Sstevel@tonic-gate }; 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate #define FIOC ('F'<<8) 53*7c478bd9Sstevel@tonic-gate #define FBIOGTYPE (FIOC|0) 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate #ifdef _KERNEL 56*7c478bd9Sstevel@tonic-gate struct fbpixrect { 57*7c478bd9Sstevel@tonic-gate struct pixrect *fbpr_pixrect; /* Pixrect of dev returned here */ 58*7c478bd9Sstevel@tonic-gate }; 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gate #define FBIOGPIXRECT (FIOC|1) 61*7c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 62*7c478bd9Sstevel@tonic-gate 63*7c478bd9Sstevel@tonic-gate /* 64*7c478bd9Sstevel@tonic-gate * General purpose structure for passing info in and out of frame buffers 65*7c478bd9Sstevel@tonic-gate * (used for gp1) 66*7c478bd9Sstevel@tonic-gate */ 67*7c478bd9Sstevel@tonic-gate struct fbinfo { 68*7c478bd9Sstevel@tonic-gate int fb_physaddr; /* physical frame buffer address */ 69*7c478bd9Sstevel@tonic-gate int fb_hwwidth; /* fb board width */ 70*7c478bd9Sstevel@tonic-gate int fb_hwheight; /* fb board height */ 71*7c478bd9Sstevel@tonic-gate int fb_addrdelta; /* phys addr diff between boards */ 72*7c478bd9Sstevel@tonic-gate unsigned char *fb_ropaddr; /* fb va thru kernelmap */ 73*7c478bd9Sstevel@tonic-gate int fb_unit; /* minor devnum of fb */ 74*7c478bd9Sstevel@tonic-gate }; 75*7c478bd9Sstevel@tonic-gate 76*7c478bd9Sstevel@tonic-gate #define FBIOGINFO (FIOC|2) 77*7c478bd9Sstevel@tonic-gate 78*7c478bd9Sstevel@tonic-gate /* 79*7c478bd9Sstevel@tonic-gate * Color map I/O. See also fbcmap_i below. 80*7c478bd9Sstevel@tonic-gate */ 81*7c478bd9Sstevel@tonic-gate struct fbcmap { 82*7c478bd9Sstevel@tonic-gate int index; /* first element (0 origin) */ 83*7c478bd9Sstevel@tonic-gate int count; /* number of elements */ 84*7c478bd9Sstevel@tonic-gate unsigned char *red; /* red color map elements */ 85*7c478bd9Sstevel@tonic-gate unsigned char *green; /* green color map elements */ 86*7c478bd9Sstevel@tonic-gate unsigned char *blue; /* blue color map elements */ 87*7c478bd9Sstevel@tonic-gate }; 88*7c478bd9Sstevel@tonic-gate 89*7c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32 90*7c478bd9Sstevel@tonic-gate 91*7c478bd9Sstevel@tonic-gate struct fbcmap32 { 92*7c478bd9Sstevel@tonic-gate int32_t index; /* first element (0 origin) */ 93*7c478bd9Sstevel@tonic-gate int32_t count; /* number of elements */ 94*7c478bd9Sstevel@tonic-gate caddr32_t red; /* red color map elements */ 95*7c478bd9Sstevel@tonic-gate caddr32_t green; /* green color map elements */ 96*7c478bd9Sstevel@tonic-gate caddr32_t blue; /* blue color map elements */ 97*7c478bd9Sstevel@tonic-gate }; 98*7c478bd9Sstevel@tonic-gate 99*7c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */ 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate #define FBIOPUTCMAP (FIOC|3) 102*7c478bd9Sstevel@tonic-gate #define FBIOGETCMAP (FIOC|4) 103*7c478bd9Sstevel@tonic-gate 104*7c478bd9Sstevel@tonic-gate /* 105*7c478bd9Sstevel@tonic-gate * Set/Get attributes 106*7c478bd9Sstevel@tonic-gate */ 107*7c478bd9Sstevel@tonic-gate #define FB_ATTR_NDEVSPECIFIC 8 /* no. of device specific values */ 108*7c478bd9Sstevel@tonic-gate #define FB_ATTR_NEMUTYPES 4 /* no. of emulation types */ 109*7c478bd9Sstevel@tonic-gate 110*7c478bd9Sstevel@tonic-gate struct fbsattr { 111*7c478bd9Sstevel@tonic-gate int flags; /* misc flags */ 112*7c478bd9Sstevel@tonic-gate #define FB_ATTR_AUTOINIT 1 /* emulation auto init flag */ 113*7c478bd9Sstevel@tonic-gate #define FB_ATTR_DEVSPECIFIC 2 /* dev. specific stuff valid flag */ 114*7c478bd9Sstevel@tonic-gate int emu_type; /* emulation type (-1 if unused) */ 115*7c478bd9Sstevel@tonic-gate int dev_specific[FB_ATTR_NDEVSPECIFIC]; /* catchall */ 116*7c478bd9Sstevel@tonic-gate }; 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate struct fbgattr { 119*7c478bd9Sstevel@tonic-gate int real_type; /* real device type */ 120*7c478bd9Sstevel@tonic-gate int owner; /* PID of owner, 0 if myself */ 121*7c478bd9Sstevel@tonic-gate struct fbtype fbtype; /* fbtype info for real device */ 122*7c478bd9Sstevel@tonic-gate struct fbsattr sattr; /* see above */ 123*7c478bd9Sstevel@tonic-gate int emu_types[FB_ATTR_NEMUTYPES]; /* possible emulations */ 124*7c478bd9Sstevel@tonic-gate /* (-1 if unused) */ 125*7c478bd9Sstevel@tonic-gate }; 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gate #define FBIOSATTR (FIOC|5) 128*7c478bd9Sstevel@tonic-gate #define FBIOGATTR (FIOC|6) 129*7c478bd9Sstevel@tonic-gate 130*7c478bd9Sstevel@tonic-gate 131*7c478bd9Sstevel@tonic-gate /* 132*7c478bd9Sstevel@tonic-gate * Video control 133*7c478bd9Sstevel@tonic-gate * (the unused bits are reserved for future use) 134*7c478bd9Sstevel@tonic-gate */ 135*7c478bd9Sstevel@tonic-gate #define FBVIDEO_OFF 0 136*7c478bd9Sstevel@tonic-gate #define FBVIDEO_ON 1 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate #define FBIOSVIDEO (FIOC|7) 139*7c478bd9Sstevel@tonic-gate #define FBIOGVIDEO (FIOC|8) 140*7c478bd9Sstevel@tonic-gate 141*7c478bd9Sstevel@tonic-gate /* Vertical retrace support. */ 142*7c478bd9Sstevel@tonic-gate #define FBIOVERTICAL (FIOC|9) 143*7c478bd9Sstevel@tonic-gate #define GRABPAGEALLOC (FIOC|10) 144*7c478bd9Sstevel@tonic-gate #define GRABPAGEFREE (FIOC|11) 145*7c478bd9Sstevel@tonic-gate #define GRABATTACH (FIOC|12) 146*7c478bd9Sstevel@tonic-gate 147*7c478bd9Sstevel@tonic-gate #define FBIOGPLNGRP (FIOC|13) 148*7c478bd9Sstevel@tonic-gate #define FBIOGCMSIZE (FIOC|14) 149*7c478bd9Sstevel@tonic-gate #define FBIOSCMSIZE (FIOC|15) 150*7c478bd9Sstevel@tonic-gate #define FBIOSCMS (FIOC|16) 151*7c478bd9Sstevel@tonic-gate #define FBIOAVAILPLNGRP (FIOC|17) 152*7c478bd9Sstevel@tonic-gate 153*7c478bd9Sstevel@tonic-gate 154*7c478bd9Sstevel@tonic-gate /* 155*7c478bd9Sstevel@tonic-gate * Structure to pass double buffering state back and forth the device. 156*7c478bd9Sstevel@tonic-gate */ 157*7c478bd9Sstevel@tonic-gate 158*7c478bd9Sstevel@tonic-gate /* used in devstate */ 159*7c478bd9Sstevel@tonic-gate #define FBDBL_AVAIL 0x80000000 160*7c478bd9Sstevel@tonic-gate #define FBDBL_DONT_BLOCK 0x40000000 161*7c478bd9Sstevel@tonic-gate #define FBDBL_AVAIL_PG 0x20000000 162*7c478bd9Sstevel@tonic-gate 163*7c478bd9Sstevel@tonic-gate /* used in read/write/display */ 164*7c478bd9Sstevel@tonic-gate #define FBDBL_A 0x1 165*7c478bd9Sstevel@tonic-gate #define FBDBL_B 0x2 166*7c478bd9Sstevel@tonic-gate #define FBDBL_BOTH (FBDBL_A | FBDBL_B) 167*7c478bd9Sstevel@tonic-gate #define FBDBL_NONE 0x4 168*7c478bd9Sstevel@tonic-gate 169*7c478bd9Sstevel@tonic-gate struct fbdblinfo { 170*7c478bd9Sstevel@tonic-gate unsigned int dbl_devstate; 171*7c478bd9Sstevel@tonic-gate unsigned int dbl_read; 172*7c478bd9Sstevel@tonic-gate unsigned int dbl_write; 173*7c478bd9Sstevel@tonic-gate unsigned int dbl_display; 174*7c478bd9Sstevel@tonic-gate int dbl_depth; 175*7c478bd9Sstevel@tonic-gate char dbl_wid; 176*7c478bd9Sstevel@tonic-gate }; 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate #define FBIODBLGINFO (FIOC|18) 179*7c478bd9Sstevel@tonic-gate #define FBIODBLSINFO (FIOC|19) 180*7c478bd9Sstevel@tonic-gate 181*7c478bd9Sstevel@tonic-gate /* 8-bit emulation in 24-bit ioctls */ 182*7c478bd9Sstevel@tonic-gate 183*7c478bd9Sstevel@tonic-gate #define FBIOSWINFD (FIOC|20) 184*7c478bd9Sstevel@tonic-gate #define FBIOSAVWINFD (FIOC|21) 185*7c478bd9Sstevel@tonic-gate #define FBIORESWINFD (FIOC|22) 186*7c478bd9Sstevel@tonic-gate #define FBIOSRWINFD (FIOC|23) 187*7c478bd9Sstevel@tonic-gate 188*7c478bd9Sstevel@tonic-gate /* 189*7c478bd9Sstevel@tonic-gate * hardware cursor control 190*7c478bd9Sstevel@tonic-gate */ 191*7c478bd9Sstevel@tonic-gate 192*7c478bd9Sstevel@tonic-gate struct fbcurpos { 193*7c478bd9Sstevel@tonic-gate short x, y; 194*7c478bd9Sstevel@tonic-gate }; 195*7c478bd9Sstevel@tonic-gate 196*7c478bd9Sstevel@tonic-gate struct fbcursor { 197*7c478bd9Sstevel@tonic-gate short set; /* what to set */ 198*7c478bd9Sstevel@tonic-gate #define FB_CUR_SETCUR 0x01 199*7c478bd9Sstevel@tonic-gate #define FB_CUR_SETPOS 0x02 200*7c478bd9Sstevel@tonic-gate #define FB_CUR_SETHOT 0x04 201*7c478bd9Sstevel@tonic-gate #define FB_CUR_SETCMAP 0x08 202*7c478bd9Sstevel@tonic-gate #define FB_CUR_SETSHAPE 0x10 203*7c478bd9Sstevel@tonic-gate #define FB_CUR_SETALL 0x1F 204*7c478bd9Sstevel@tonic-gate short enable; /* cursor on/off */ 205*7c478bd9Sstevel@tonic-gate struct fbcurpos pos; /* cursor position */ 206*7c478bd9Sstevel@tonic-gate struct fbcurpos hot; /* cursor hot spot */ 207*7c478bd9Sstevel@tonic-gate struct fbcmap cmap; /* color map info */ 208*7c478bd9Sstevel@tonic-gate struct fbcurpos size; /* cursor bit map size */ 209*7c478bd9Sstevel@tonic-gate char *image; /* cursor image bits */ 210*7c478bd9Sstevel@tonic-gate char *mask; /* cursor mask bits */ 211*7c478bd9Sstevel@tonic-gate }; 212*7c478bd9Sstevel@tonic-gate 213*7c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32 214*7c478bd9Sstevel@tonic-gate struct fbcursor32 { 215*7c478bd9Sstevel@tonic-gate short set; /* what to set */ 216*7c478bd9Sstevel@tonic-gate short enable; /* cursor on/off */ 217*7c478bd9Sstevel@tonic-gate struct fbcurpos pos; /* cursor position */ 218*7c478bd9Sstevel@tonic-gate struct fbcurpos hot; /* cursor hot spot */ 219*7c478bd9Sstevel@tonic-gate struct fbcmap32 cmap; /* color map info */ 220*7c478bd9Sstevel@tonic-gate struct fbcurpos size; /* cursor bit map size */ 221*7c478bd9Sstevel@tonic-gate caddr32_t image; /* cursor image bits */ 222*7c478bd9Sstevel@tonic-gate caddr32_t mask; /* cursor mask bits */ 223*7c478bd9Sstevel@tonic-gate }; 224*7c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */ 225*7c478bd9Sstevel@tonic-gate 226*7c478bd9Sstevel@tonic-gate /* set/get cursor attributes/shape */ 227*7c478bd9Sstevel@tonic-gate #define FBIOSCURSOR (FIOC|24) 228*7c478bd9Sstevel@tonic-gate #define FBIOGCURSOR (FIOC|25) 229*7c478bd9Sstevel@tonic-gate 230*7c478bd9Sstevel@tonic-gate /* set/get cursor position */ 231*7c478bd9Sstevel@tonic-gate #define FBIOSCURPOS (FIOC|26) 232*7c478bd9Sstevel@tonic-gate #define FBIOGCURPOS (FIOC|27) 233*7c478bd9Sstevel@tonic-gate 234*7c478bd9Sstevel@tonic-gate /* get max cursor size */ 235*7c478bd9Sstevel@tonic-gate #define FBIOGCURMAX (FIOC|28) 236*7c478bd9Sstevel@tonic-gate 237*7c478bd9Sstevel@tonic-gate /* Window Grabber info ioctl */ 238*7c478bd9Sstevel@tonic-gate #define GRABLOCKINFO (FIOC|29) 239*7c478bd9Sstevel@tonic-gate 240*7c478bd9Sstevel@tonic-gate /* 241*7c478bd9Sstevel@tonic-gate * Window Identification (wid) defines, structures, and ioctls. 242*7c478bd9Sstevel@tonic-gate * 243*7c478bd9Sstevel@tonic-gate * Some wids need to be unique when used for things such as double 244*7c478bd9Sstevel@tonic-gate * buffering or rendering clipping. Some wids can be shared when 245*7c478bd9Sstevel@tonic-gate * used for display attributes only. What can be shared and how 246*7c478bd9Sstevel@tonic-gate * may be device dependent. The fb_wid_alloc.wa_type and fb_wid_item 247*7c478bd9Sstevel@tonic-gate * structure members will be left to device specific interpretation. 248*7c478bd9Sstevel@tonic-gate */ 249*7c478bd9Sstevel@tonic-gate 250*7c478bd9Sstevel@tonic-gate #define FB_WID_SHARED_8 0 251*7c478bd9Sstevel@tonic-gate #define FB_WID_SHARED_24 1 252*7c478bd9Sstevel@tonic-gate #define FB_WID_DBL_8 2 253*7c478bd9Sstevel@tonic-gate #define FB_WID_DBL_24 3 254*7c478bd9Sstevel@tonic-gate 255*7c478bd9Sstevel@tonic-gate struct fb_wid_alloc { 256*7c478bd9Sstevel@tonic-gate unsigned int wa_type; /* special attributes */ 257*7c478bd9Sstevel@tonic-gate int wa_index; /* base wid returned */ 258*7c478bd9Sstevel@tonic-gate unsigned int wa_count; /* how many contiguous wids */ 259*7c478bd9Sstevel@tonic-gate }; 260*7c478bd9Sstevel@tonic-gate 261*7c478bd9Sstevel@tonic-gate struct fb_wid_item { 262*7c478bd9Sstevel@tonic-gate unsigned int wi_type; /* special attributes */ 263*7c478bd9Sstevel@tonic-gate int wi_index; /* which lut */ 264*7c478bd9Sstevel@tonic-gate unsigned int wi_attrs; /* which attributes */ 265*7c478bd9Sstevel@tonic-gate unsigned int wi_values[NBBY*sizeof (int)]; /* the attr values */ 266*7c478bd9Sstevel@tonic-gate }; 267*7c478bd9Sstevel@tonic-gate 268*7c478bd9Sstevel@tonic-gate struct fb_wid_list { 269*7c478bd9Sstevel@tonic-gate unsigned int wl_flags; 270*7c478bd9Sstevel@tonic-gate unsigned int wl_count; 271*7c478bd9Sstevel@tonic-gate struct fb_wid_item *wl_list; 272*7c478bd9Sstevel@tonic-gate }; 273*7c478bd9Sstevel@tonic-gate 274*7c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32 275*7c478bd9Sstevel@tonic-gate 276*7c478bd9Sstevel@tonic-gate struct fb_wid_list32 { 277*7c478bd9Sstevel@tonic-gate uint32_t wl_flags; 278*7c478bd9Sstevel@tonic-gate uint32_t wl_count; 279*7c478bd9Sstevel@tonic-gate caddr32_t wl_list; 280*7c478bd9Sstevel@tonic-gate }; 281*7c478bd9Sstevel@tonic-gate 282*7c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */ 283*7c478bd9Sstevel@tonic-gate 284*7c478bd9Sstevel@tonic-gate struct fb_wid_dbl_info { 285*7c478bd9Sstevel@tonic-gate struct fb_wid_alloc dbl_wid; 286*7c478bd9Sstevel@tonic-gate char dbl_fore; 287*7c478bd9Sstevel@tonic-gate char dbl_back; 288*7c478bd9Sstevel@tonic-gate char dbl_read_state; 289*7c478bd9Sstevel@tonic-gate char dbl_write_state; 290*7c478bd9Sstevel@tonic-gate }; 291*7c478bd9Sstevel@tonic-gate 292*7c478bd9Sstevel@tonic-gate #define FBIO_WID_ALLOC (FIOC|30) 293*7c478bd9Sstevel@tonic-gate #define FBIO_WID_FREE (FIOC|31) 294*7c478bd9Sstevel@tonic-gate #define FBIO_WID_PUT (FIOC|32) 295*7c478bd9Sstevel@tonic-gate #define FBIO_WID_GET (FIOC|33) 296*7c478bd9Sstevel@tonic-gate 297*7c478bd9Sstevel@tonic-gate #define FBIO_DEVID (FIOC|34) 298*7c478bd9Sstevel@tonic-gate #define FBIO_U_RST (FIOC|35) 299*7c478bd9Sstevel@tonic-gate #define FBIO_FULLSCREEN_ELIMINATION_GROUPS (FIOC|36) 300*7c478bd9Sstevel@tonic-gate #define FBIO_WID_DBL_SET (FIOC|37) 301*7c478bd9Sstevel@tonic-gate #define FBIOVRTOFFSET (FIOC|38) 302*7c478bd9Sstevel@tonic-gate 303*7c478bd9Sstevel@tonic-gate struct cg6_info { 304*7c478bd9Sstevel@tonic-gate ushort_t accessible_width; /* accessible bytes in scanline */ 305*7c478bd9Sstevel@tonic-gate ushort_t accessible_height; /* number of accessible scanlines */ 306*7c478bd9Sstevel@tonic-gate ushort_t line_bytes; /* number of bytes/scanline */ 307*7c478bd9Sstevel@tonic-gate ushort_t hdb_capable; /* can this thing hardware db? */ 308*7c478bd9Sstevel@tonic-gate ushort_t vmsize; /* this is Mb of video memory */ 309*7c478bd9Sstevel@tonic-gate uchar_t boardrev; /* board revision # */ 310*7c478bd9Sstevel@tonic-gate uchar_t slot; /* sbus slot # */ 311*7c478bd9Sstevel@tonic-gate uint_t pad1; /* expansion */ 312*7c478bd9Sstevel@tonic-gate }; 313*7c478bd9Sstevel@tonic-gate 314*7c478bd9Sstevel@tonic-gate struct s3_info { 315*7c478bd9Sstevel@tonic-gate ushort_t accessible_width; /* accessible bytes in scanline */ 316*7c478bd9Sstevel@tonic-gate ushort_t accessible_height; /* number of accessible scanlines */ 317*7c478bd9Sstevel@tonic-gate ushort_t line_bytes; /* number of bytes/scanline */ 318*7c478bd9Sstevel@tonic-gate ushort_t hdb_capable; /* can this thing hardware db? */ 319*7c478bd9Sstevel@tonic-gate ushort_t vmsize; /* this is Mb of video memory */ 320*7c478bd9Sstevel@tonic-gate uchar_t boardrev; /* board revision # */ 321*7c478bd9Sstevel@tonic-gate uchar_t slot; /* sbus slot # */ 322*7c478bd9Sstevel@tonic-gate uint_t pad1; /* expansion */ 323*7c478bd9Sstevel@tonic-gate }; 324*7c478bd9Sstevel@tonic-gate 325*7c478bd9Sstevel@tonic-gate struct p9000_info { 326*7c478bd9Sstevel@tonic-gate ushort_t accessible_width; /* accessible bytes in scanline */ 327*7c478bd9Sstevel@tonic-gate ushort_t accessible_height; /* number of accessible scanlines */ 328*7c478bd9Sstevel@tonic-gate ushort_t line_bytes; /* number of bytes/scanline */ 329*7c478bd9Sstevel@tonic-gate ushort_t hdb_capable; /* can this thing hardware db? */ 330*7c478bd9Sstevel@tonic-gate ushort_t vmsize; /* this is Mb of video memory */ 331*7c478bd9Sstevel@tonic-gate uchar_t boardrev; /* board revision # */ 332*7c478bd9Sstevel@tonic-gate uchar_t slot; /* sbus slot # */ 333*7c478bd9Sstevel@tonic-gate uint_t pad1; /* expansion */ 334*7c478bd9Sstevel@tonic-gate }; 335*7c478bd9Sstevel@tonic-gate 336*7c478bd9Sstevel@tonic-gate struct p9100_info { 337*7c478bd9Sstevel@tonic-gate ushort_t accessible_width; /* accessible bytes in scanline */ 338*7c478bd9Sstevel@tonic-gate ushort_t accessible_height; /* number of accessible scanlines */ 339*7c478bd9Sstevel@tonic-gate ushort_t line_bytes; /* number of bytes/scanline */ 340*7c478bd9Sstevel@tonic-gate ushort_t hdb_capable; /* can this thing hardware db? */ 341*7c478bd9Sstevel@tonic-gate ushort_t vmsize; /* this is Mb of video memory */ 342*7c478bd9Sstevel@tonic-gate uchar_t boardrev; /* board revision # */ 343*7c478bd9Sstevel@tonic-gate uchar_t slot; /* sbus slot # */ 344*7c478bd9Sstevel@tonic-gate uint_t pad1; /* expansion */ 345*7c478bd9Sstevel@tonic-gate }; 346*7c478bd9Sstevel@tonic-gate 347*7c478bd9Sstevel@tonic-gate struct wd90c24a2_info { 348*7c478bd9Sstevel@tonic-gate ushort_t accessible_width; /* accessible bytes in scanline */ 349*7c478bd9Sstevel@tonic-gate ushort_t accessible_height; /* number of accessible scanlines */ 350*7c478bd9Sstevel@tonic-gate ushort_t line_bytes; /* number of bytes/scanline */ 351*7c478bd9Sstevel@tonic-gate ushort_t hdb_capable; /* can this thing hardware db? */ 352*7c478bd9Sstevel@tonic-gate ushort_t vmsize; /* this is Mb of video memory */ 353*7c478bd9Sstevel@tonic-gate uchar_t boardrev; /* board revision # */ 354*7c478bd9Sstevel@tonic-gate uchar_t slot; /* sbus slot # */ 355*7c478bd9Sstevel@tonic-gate uint_t pad1; /* expansion */ 356*7c478bd9Sstevel@tonic-gate }; 357*7c478bd9Sstevel@tonic-gate 358*7c478bd9Sstevel@tonic-gate #define MON_TYPE_STEREO 0x8 /* stereo display */ 359*7c478bd9Sstevel@tonic-gate #define MON_TYPE_0_OFFSET 0x4 /* black level 0 ire instead of 7.5 */ 360*7c478bd9Sstevel@tonic-gate #define MON_TYPE_OVERSCAN 0x2 /* overscan */ 361*7c478bd9Sstevel@tonic-gate #define MON_TYPE_GRAY 0x1 /* greyscale monitor */ 362*7c478bd9Sstevel@tonic-gate 363*7c478bd9Sstevel@tonic-gate struct mon_info { 364*7c478bd9Sstevel@tonic-gate uint_t mon_type; /* bit array: defined above */ 365*7c478bd9Sstevel@tonic-gate uint_t pixfreq; /* pixel frequency in Hz */ 366*7c478bd9Sstevel@tonic-gate uint_t hfreq; /* horizontal freq in Hz */ 367*7c478bd9Sstevel@tonic-gate uint_t vfreq; /* vertical freq in Hz */ 368*7c478bd9Sstevel@tonic-gate uint_t vsync; /* vertical sync in scanlines */ 369*7c478bd9Sstevel@tonic-gate uint_t hsync; /* horizontal sync in pixels */ 370*7c478bd9Sstevel@tonic-gate /* these are in pixel units */ 371*7c478bd9Sstevel@tonic-gate ushort_t hfporch; /* horizontal front porch */ 372*7c478bd9Sstevel@tonic-gate ushort_t hbporch; /* horizontal back porch */ 373*7c478bd9Sstevel@tonic-gate ushort_t vfporch; /* vertical front porch */ 374*7c478bd9Sstevel@tonic-gate ushort_t vbporch; /* vertical back porch */ 375*7c478bd9Sstevel@tonic-gate }; 376*7c478bd9Sstevel@tonic-gate 377*7c478bd9Sstevel@tonic-gate 378*7c478bd9Sstevel@tonic-gate #define FBIOGXINFO (FIOC|39) 379*7c478bd9Sstevel@tonic-gate #define FBIOMONINFO (FIOC|40) 380*7c478bd9Sstevel@tonic-gate 381*7c478bd9Sstevel@tonic-gate /* 382*7c478bd9Sstevel@tonic-gate * Color map I/O. 383*7c478bd9Sstevel@tonic-gate */ 384*7c478bd9Sstevel@tonic-gate struct fbcmap_i { 385*7c478bd9Sstevel@tonic-gate unsigned int flags; /* see below */ 386*7c478bd9Sstevel@tonic-gate int id; /* colormap id for multiple cmaps */ 387*7c478bd9Sstevel@tonic-gate int index; /* first element (0 origin) */ 388*7c478bd9Sstevel@tonic-gate int count; /* number of elements */ 389*7c478bd9Sstevel@tonic-gate unsigned char *red; /* red color map elements */ 390*7c478bd9Sstevel@tonic-gate unsigned char *green; /* green color map elements */ 391*7c478bd9Sstevel@tonic-gate unsigned char *blue; /* blue color map elements */ 392*7c478bd9Sstevel@tonic-gate }; 393*7c478bd9Sstevel@tonic-gate 394*7c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32 395*7c478bd9Sstevel@tonic-gate 396*7c478bd9Sstevel@tonic-gate struct fbcmap_i32 { 397*7c478bd9Sstevel@tonic-gate uint32_t flags; /* see below */ 398*7c478bd9Sstevel@tonic-gate int32_t id; /* colormap id for multiple cmaps */ 399*7c478bd9Sstevel@tonic-gate int32_t index; /* first element (0 origin) */ 400*7c478bd9Sstevel@tonic-gate int32_t count; /* number of elements */ 401*7c478bd9Sstevel@tonic-gate caddr32_t red; /* red color map elements */ 402*7c478bd9Sstevel@tonic-gate caddr32_t green; /* green color map elements */ 403*7c478bd9Sstevel@tonic-gate caddr32_t blue; /* blue color map elements */ 404*7c478bd9Sstevel@tonic-gate }; 405*7c478bd9Sstevel@tonic-gate 406*7c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */ 407*7c478bd9Sstevel@tonic-gate 408*7c478bd9Sstevel@tonic-gate #define FB_CMAP_BLOCK 0x1 /* wait for vrt before returning */ 409*7c478bd9Sstevel@tonic-gate #define FB_CMAP_KERNEL 0x2 /* called within kernel */ 410*7c478bd9Sstevel@tonic-gate 411*7c478bd9Sstevel@tonic-gate #define FBIOPUTCMAPI (FIOC|41) 412*7c478bd9Sstevel@tonic-gate #define FBIOGETCMAPI (FIOC|42) 413*7c478bd9Sstevel@tonic-gate 414*7c478bd9Sstevel@tonic-gate /* assigning a given window id to a pixrect - special for PHIGS */ 415*7c478bd9Sstevel@tonic-gate #define FBIO_ASSIGNWID (FIOC|43) 416*7c478bd9Sstevel@tonic-gate 417*7c478bd9Sstevel@tonic-gate /* assigning a given window to be stereo */ 418*7c478bd9Sstevel@tonic-gate #define FBIO_STEREO (FIOC|44) 419*7c478bd9Sstevel@tonic-gate #define FB_WIN_STEREO 0x2 420*7c478bd9Sstevel@tonic-gate 421*7c478bd9Sstevel@tonic-gate #endif /* !ASM */ 422*7c478bd9Sstevel@tonic-gate 423*7c478bd9Sstevel@tonic-gate /* frame buffer type codes */ 424*7c478bd9Sstevel@tonic-gate #define FBTYPE_NOTYPE (-1) /* for backwards compatibility */ 425*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN1BW 0 /* Multibus mono */ 426*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN1COLOR 1 /* Multibus color */ 427*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN2BW 2 /* memory mono */ 428*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN2COLOR 3 /* color w/rasterop chips */ 429*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN2GP 4 /* GP1/GP2 */ 430*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN5COLOR 5 /* RoadRunner accelerator */ 431*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN3COLOR 6 /* memory color */ 432*7c478bd9Sstevel@tonic-gate #define FBTYPE_MEMCOLOR 7 /* memory 24-bit */ 433*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUN4COLOR 8 /* memory color w/overlay */ 434*7c478bd9Sstevel@tonic-gate 435*7c478bd9Sstevel@tonic-gate #define FBTYPE_NOTSUN1 9 /* reserved for customer */ 436*7c478bd9Sstevel@tonic-gate #define FBTYPE_NOTSUN2 10 /* reserved for customer */ 437*7c478bd9Sstevel@tonic-gate #define FBTYPE_NOTSUN3 11 /* reserved for customer */ 438*7c478bd9Sstevel@tonic-gate 439*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNFAST_COLOR 12 /* accelerated 8bit */ 440*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNROP_COLOR 13 /* MEMCOLOR with rop h/w */ 441*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNFB_VIDEO 14 /* Simple video mixing */ 442*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNGIFB 15 /* medical image */ 443*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNGPLAS 16 /* plasma panel */ 444*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNGP3 17 /* cg12 running gpsi microcode */ 445*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNGT 18 /* gt graphics accelerator */ 446*7c478bd9Sstevel@tonic-gate #define FBTYPE_SUNLEO 19 /* zx graphics accelerator */ 447*7c478bd9Sstevel@tonic-gate #define FBTYPE_MDICOLOR 20 /* cgfourteen framebuffer */ 448*7c478bd9Sstevel@tonic-gate 449*7c478bd9Sstevel@tonic-gate #define FBTYPE_LASTPLUSONE 21 /* max number of fbs (change as add) */ 450*7c478bd9Sstevel@tonic-gate 451*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 452*7c478bd9Sstevel@tonic-gate } 453*7c478bd9Sstevel@tonic-gate #endif 454*7c478bd9Sstevel@tonic-gate 455*7c478bd9Sstevel@tonic-gate #endif /* _SYS_FBIO_H */ 456