1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef __LINUX_FBIO_H 3*4882a593Smuzhiyun #define __LINUX_FBIO_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #include <uapi/asm/fbio.h> 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap) 8*4882a593Smuzhiyun #define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap) 9*4882a593Smuzhiyun /* Addresses on the fd of a cgsix that are mappable */ 10*4882a593Smuzhiyun #define CG6_FBC 0x70000000 11*4882a593Smuzhiyun #define CG6_TEC 0x70001000 12*4882a593Smuzhiyun #define CG6_BTREGS 0x70002000 13*4882a593Smuzhiyun #define CG6_FHC 0x70004000 14*4882a593Smuzhiyun #define CG6_THC 0x70005000 15*4882a593Smuzhiyun #define CG6_ROM 0x70006000 16*4882a593Smuzhiyun #define CG6_RAM 0x70016000 17*4882a593Smuzhiyun #define CG6_DHC 0x80000000 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #define CG3_MMAP_OFFSET 0x4000000 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* Addresses on the fd of a tcx that are mappable */ 22*4882a593Smuzhiyun #define TCX_RAM8BIT 0x00000000 23*4882a593Smuzhiyun #define TCX_RAM24BIT 0x01000000 24*4882a593Smuzhiyun #define TCX_UNK3 0x10000000 25*4882a593Smuzhiyun #define TCX_UNK4 0x20000000 26*4882a593Smuzhiyun #define TCX_CONTROLPLANE 0x28000000 27*4882a593Smuzhiyun #define TCX_UNK6 0x30000000 28*4882a593Smuzhiyun #define TCX_UNK7 0x38000000 29*4882a593Smuzhiyun #define TCX_TEC 0x70000000 30*4882a593Smuzhiyun #define TCX_BTREGS 0x70002000 31*4882a593Smuzhiyun #define TCX_THC 0x70004000 32*4882a593Smuzhiyun #define TCX_DHC 0x70008000 33*4882a593Smuzhiyun #define TCX_ALT 0x7000a000 34*4882a593Smuzhiyun #define TCX_SYNC 0x7000e000 35*4882a593Smuzhiyun #define TCX_UNK2 0x70010000 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun /* CG14 definitions */ 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun /* Offsets into the OBIO space: */ 40*4882a593Smuzhiyun #define CG14_REGS 0 /* registers */ 41*4882a593Smuzhiyun #define CG14_CURSORREGS 0x1000 /* cursor registers */ 42*4882a593Smuzhiyun #define CG14_DACREGS 0x2000 /* DAC registers */ 43*4882a593Smuzhiyun #define CG14_XLUT 0x3000 /* X Look Up Table -- ??? */ 44*4882a593Smuzhiyun #define CG14_CLUT1 0x4000 /* Color Look Up Table */ 45*4882a593Smuzhiyun #define CG14_CLUT2 0x5000 /* Color Look Up Table */ 46*4882a593Smuzhiyun #define CG14_CLUT3 0x6000 /* Color Look Up Table */ 47*4882a593Smuzhiyun #define CG14_AUTO 0xf000 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun struct fbcmap32 { 50*4882a593Smuzhiyun int index; /* first element (0 origin) */ 51*4882a593Smuzhiyun int count; 52*4882a593Smuzhiyun u32 red; 53*4882a593Smuzhiyun u32 green; 54*4882a593Smuzhiyun u32 blue; 55*4882a593Smuzhiyun }; 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) 58*4882a593Smuzhiyun #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun struct fbcursor32 { 61*4882a593Smuzhiyun short set; /* what to set, choose from the list above */ 62*4882a593Smuzhiyun short enable; /* cursor on/off */ 63*4882a593Smuzhiyun struct fbcurpos pos; /* cursor position */ 64*4882a593Smuzhiyun struct fbcurpos hot; /* cursor hot spot */ 65*4882a593Smuzhiyun struct fbcmap32 cmap; /* color map info */ 66*4882a593Smuzhiyun struct fbcurpos size; /* cursor bit map size */ 67*4882a593Smuzhiyun u32 image; /* cursor image bits */ 68*4882a593Smuzhiyun u32 mask; /* cursor mask bits */ 69*4882a593Smuzhiyun }; 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) 72*4882a593Smuzhiyun #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) 73*4882a593Smuzhiyun #endif /* __LINUX_FBIO_H */ 74