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