18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __LINUX_FBIO_H
38c2ecf20Sopenharmony_ci#define __LINUX_FBIO_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/compiler.h>
68c2ecf20Sopenharmony_ci#include <linux/types.h>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci/* Constants used for fbio SunOS compatibility */
98c2ecf20Sopenharmony_ci/* (C) 1996 Miguel de Icaza */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci/* Frame buffer types */
128c2ecf20Sopenharmony_ci#define FBTYPE_NOTYPE           -1
138c2ecf20Sopenharmony_ci#define FBTYPE_SUN1BW           0   /* mono */
148c2ecf20Sopenharmony_ci#define FBTYPE_SUN1COLOR        1
158c2ecf20Sopenharmony_ci#define FBTYPE_SUN2BW           2
168c2ecf20Sopenharmony_ci#define FBTYPE_SUN2COLOR        3
178c2ecf20Sopenharmony_ci#define FBTYPE_SUN2GP           4
188c2ecf20Sopenharmony_ci#define FBTYPE_SUN5COLOR        5
198c2ecf20Sopenharmony_ci#define FBTYPE_SUN3COLOR        6
208c2ecf20Sopenharmony_ci#define FBTYPE_MEMCOLOR         7
218c2ecf20Sopenharmony_ci#define FBTYPE_SUN4COLOR        8
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#define FBTYPE_NOTSUN1          9
248c2ecf20Sopenharmony_ci#define FBTYPE_NOTSUN2          10
258c2ecf20Sopenharmony_ci#define FBTYPE_NOTSUN3          11
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#define FBTYPE_SUNFAST_COLOR    12  /* cg6 */
288c2ecf20Sopenharmony_ci#define FBTYPE_SUNROP_COLOR     13
298c2ecf20Sopenharmony_ci#define FBTYPE_SUNFB_VIDEO      14
308c2ecf20Sopenharmony_ci#define FBTYPE_SUNGIFB          15
318c2ecf20Sopenharmony_ci#define FBTYPE_SUNGPLAS         16
328c2ecf20Sopenharmony_ci#define FBTYPE_SUNGP3           17
338c2ecf20Sopenharmony_ci#define FBTYPE_SUNGT            18
348c2ecf20Sopenharmony_ci#define FBTYPE_SUNLEO           19      /* zx Leo card */
358c2ecf20Sopenharmony_ci#define FBTYPE_MDICOLOR         20      /* cg14 */
368c2ecf20Sopenharmony_ci#define FBTYPE_TCXCOLOR		21	/* SUNW,tcx card */
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#define FBTYPE_LASTPLUSONE      21	/* This is not last + 1 in fact... */
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci/* Does not seem to be listed in the Sun file either */
418c2ecf20Sopenharmony_ci#define FBTYPE_CREATOR          22
428c2ecf20Sopenharmony_ci#define FBTYPE_PCI_IGA1682	23
438c2ecf20Sopenharmony_ci#define FBTYPE_P9100COLOR	24
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#define FBTYPE_PCI_GENERIC	1000
468c2ecf20Sopenharmony_ci#define FBTYPE_PCI_MACH64	1001
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/* fbio ioctls */
498c2ecf20Sopenharmony_ci/* Returned by FBIOGTYPE */
508c2ecf20Sopenharmony_cistruct  fbtype {
518c2ecf20Sopenharmony_ci        int     fb_type;        /* fb type, see above */
528c2ecf20Sopenharmony_ci        int     fb_height;      /* pixels */
538c2ecf20Sopenharmony_ci        int     fb_width;       /* pixels */
548c2ecf20Sopenharmony_ci        int     fb_depth;
558c2ecf20Sopenharmony_ci        int     fb_cmsize;      /* color map entries */
568c2ecf20Sopenharmony_ci        int     fb_size;        /* fb size in bytes */
578c2ecf20Sopenharmony_ci};
588c2ecf20Sopenharmony_ci#define FBIOGTYPE _IOR('F', 0, struct fbtype)
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_cistruct  fbcmap {
618c2ecf20Sopenharmony_ci        int             index;          /* first element (0 origin) */
628c2ecf20Sopenharmony_ci        int             count;
638c2ecf20Sopenharmony_ci        unsigned char   __user *red;
648c2ecf20Sopenharmony_ci        unsigned char   __user *green;
658c2ecf20Sopenharmony_ci        unsigned char   __user *blue;
668c2ecf20Sopenharmony_ci};
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci#ifdef __KERNEL__
698c2ecf20Sopenharmony_ci#define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap)
708c2ecf20Sopenharmony_ci#define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap)
718c2ecf20Sopenharmony_ci#else
728c2ecf20Sopenharmony_ci#define FBIOPUTCMAP _IOW('F', 3, struct fbcmap)
738c2ecf20Sopenharmony_ci#define FBIOGETCMAP _IOW('F', 4, struct fbcmap)
748c2ecf20Sopenharmony_ci#endif
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci/* # of device specific values */
778c2ecf20Sopenharmony_ci#define FB_ATTR_NDEVSPECIFIC    8
788c2ecf20Sopenharmony_ci/* # of possible emulations */
798c2ecf20Sopenharmony_ci#define FB_ATTR_NEMUTYPES       4
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_cistruct fbsattr {
828c2ecf20Sopenharmony_ci        int     flags;
838c2ecf20Sopenharmony_ci        int     emu_type;	/* -1 if none */
848c2ecf20Sopenharmony_ci        int     dev_specific[FB_ATTR_NDEVSPECIFIC];
858c2ecf20Sopenharmony_ci};
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_cistruct fbgattr {
888c2ecf20Sopenharmony_ci        int     real_type;	/* real frame buffer type */
898c2ecf20Sopenharmony_ci        int     owner;		/* unknown */
908c2ecf20Sopenharmony_ci        struct fbtype fbtype;	/* real frame buffer fbtype */
918c2ecf20Sopenharmony_ci        struct fbsattr sattr;
928c2ecf20Sopenharmony_ci        int     emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */
938c2ecf20Sopenharmony_ci};
948c2ecf20Sopenharmony_ci#define FBIOSATTR  _IOW('F', 5, struct fbgattr) /* Unsupported: */
958c2ecf20Sopenharmony_ci#define FBIOGATTR  _IOR('F', 6, struct fbgattr)	/* supported */
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ci#define FBIOSVIDEO _IOW('F', 7, int)
988c2ecf20Sopenharmony_ci#define FBIOGVIDEO _IOR('F', 8, int)
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_cistruct fbcursor {
1018c2ecf20Sopenharmony_ci        short set;              /* what to set, choose from the list above */
1028c2ecf20Sopenharmony_ci        short enable;           /* cursor on/off */
1038c2ecf20Sopenharmony_ci        struct fbcurpos pos;    /* cursor position */
1048c2ecf20Sopenharmony_ci        struct fbcurpos hot;    /* cursor hot spot */
1058c2ecf20Sopenharmony_ci        struct fbcmap cmap;     /* color map info */
1068c2ecf20Sopenharmony_ci        struct fbcurpos size;   /* cursor bit map size */
1078c2ecf20Sopenharmony_ci        char __user *image;     /* cursor image bits */
1088c2ecf20Sopenharmony_ci        char __user *mask;      /* cursor mask bits */
1098c2ecf20Sopenharmony_ci};
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci/* set/get cursor attributes/shape */
1128c2ecf20Sopenharmony_ci#define FBIOSCURSOR     _IOW('F', 24, struct fbcursor)
1138c2ecf20Sopenharmony_ci#define FBIOGCURSOR     _IOWR('F', 25, struct fbcursor)
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci/* set/get cursor position */
1168c2ecf20Sopenharmony_ci#define FBIOSCURPOS     _IOW('F', 26, struct fbcurpos)
1178c2ecf20Sopenharmony_ci#define FBIOGCURPOS     _IOW('F', 27, struct fbcurpos)
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci/* get max cursor size */
1208c2ecf20Sopenharmony_ci#define FBIOGCURMAX     _IOR('F', 28, struct fbcurpos)
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci/* wid manipulation */
1238c2ecf20Sopenharmony_cistruct fb_wid_alloc {
1248c2ecf20Sopenharmony_ci#define FB_WID_SHARED_8		0
1258c2ecf20Sopenharmony_ci#define FB_WID_SHARED_24	1
1268c2ecf20Sopenharmony_ci#define FB_WID_DBL_8		2
1278c2ecf20Sopenharmony_ci#define FB_WID_DBL_24		3
1288c2ecf20Sopenharmony_ci	__u32	wa_type;
1298c2ecf20Sopenharmony_ci	__s32	wa_index;	/* Set on return */
1308c2ecf20Sopenharmony_ci	__u32	wa_count;
1318c2ecf20Sopenharmony_ci};
1328c2ecf20Sopenharmony_cistruct fb_wid_item {
1338c2ecf20Sopenharmony_ci	__u32	wi_type;
1348c2ecf20Sopenharmony_ci	__s32	wi_index;
1358c2ecf20Sopenharmony_ci	__u32	wi_attrs;
1368c2ecf20Sopenharmony_ci	__u32	wi_values[32];
1378c2ecf20Sopenharmony_ci};
1388c2ecf20Sopenharmony_cistruct fb_wid_list {
1398c2ecf20Sopenharmony_ci	__u32	wl_flags;
1408c2ecf20Sopenharmony_ci	__u32	wl_count;
1418c2ecf20Sopenharmony_ci	struct fb_wid_item	*wl_list;
1428c2ecf20Sopenharmony_ci};
1438c2ecf20Sopenharmony_ci
1448c2ecf20Sopenharmony_ci#define FBIO_WID_ALLOC	_IOWR('F', 30, struct fb_wid_alloc)
1458c2ecf20Sopenharmony_ci#define FBIO_WID_FREE	_IOW('F', 31, struct fb_wid_alloc)
1468c2ecf20Sopenharmony_ci#define FBIO_WID_PUT	_IOW('F', 32, struct fb_wid_list)
1478c2ecf20Sopenharmony_ci#define FBIO_WID_GET	_IOWR('F', 33, struct fb_wid_list)
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ci/* Creator ioctls */
1508c2ecf20Sopenharmony_ci#define FFB_IOCTL	('F'<<8)
1518c2ecf20Sopenharmony_ci#define FFB_SYS_INFO		(FFB_IOCTL|80)
1528c2ecf20Sopenharmony_ci#define FFB_CLUTREAD		(FFB_IOCTL|81)
1538c2ecf20Sopenharmony_ci#define FFB_CLUTPOST		(FFB_IOCTL|82)
1548c2ecf20Sopenharmony_ci#define FFB_SETDIAGMODE		(FFB_IOCTL|83)
1558c2ecf20Sopenharmony_ci#define FFB_GETMONITORID	(FFB_IOCTL|84)
1568c2ecf20Sopenharmony_ci#define FFB_GETVIDEOMODE	(FFB_IOCTL|85)
1578c2ecf20Sopenharmony_ci#define FFB_SETVIDEOMODE	(FFB_IOCTL|86)
1588c2ecf20Sopenharmony_ci#define FFB_SETSERVER		(FFB_IOCTL|87)
1598c2ecf20Sopenharmony_ci#define FFB_SETOVCTL		(FFB_IOCTL|88)
1608c2ecf20Sopenharmony_ci#define FFB_GETOVCTL		(FFB_IOCTL|89)
1618c2ecf20Sopenharmony_ci#define FFB_GETSAXNUM		(FFB_IOCTL|90)
1628c2ecf20Sopenharmony_ci#define FFB_FBDEBUG		(FFB_IOCTL|91)
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_ci/* Cg14 ioctls */
1658c2ecf20Sopenharmony_ci#define MDI_IOCTL          ('M'<<8)
1668c2ecf20Sopenharmony_ci#define MDI_RESET          (MDI_IOCTL|1)
1678c2ecf20Sopenharmony_ci#define MDI_GET_CFGINFO    (MDI_IOCTL|2)
1688c2ecf20Sopenharmony_ci#define MDI_SET_PIXELMODE  (MDI_IOCTL|3)
1698c2ecf20Sopenharmony_ci#    define MDI_32_PIX     32
1708c2ecf20Sopenharmony_ci#    define MDI_16_PIX     16
1718c2ecf20Sopenharmony_ci#    define MDI_8_PIX      8
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_cistruct mdi_cfginfo {
1748c2ecf20Sopenharmony_ci	int     mdi_ncluts;     /* Number of implemented CLUTs in this MDI */
1758c2ecf20Sopenharmony_ci        int     mdi_type;       /* FBTYPE name */
1768c2ecf20Sopenharmony_ci        int     mdi_height;     /* height */
1778c2ecf20Sopenharmony_ci        int     mdi_width;      /* width */
1788c2ecf20Sopenharmony_ci        int     mdi_size;       /* available ram */
1798c2ecf20Sopenharmony_ci        int     mdi_mode;       /* 8bpp, 16bpp or 32bpp */
1808c2ecf20Sopenharmony_ci        int     mdi_pixfreq;    /* pixel clock (from PROM) */
1818c2ecf20Sopenharmony_ci};
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci/* SparcLinux specific ioctl for the MDI, should be replaced for
1848c2ecf20Sopenharmony_ci * the SET_XLUT/SET_CLUTn ioctls instead
1858c2ecf20Sopenharmony_ci */
1868c2ecf20Sopenharmony_ci#define MDI_CLEAR_XLUT       (MDI_IOCTL|9)
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ci/* leo & ffb ioctls */
1898c2ecf20Sopenharmony_cistruct fb_clut_alloc {
1908c2ecf20Sopenharmony_ci	__u32	clutid;	/* Set on return */
1918c2ecf20Sopenharmony_ci 	__u32	flag;
1928c2ecf20Sopenharmony_ci 	__u32	index;
1938c2ecf20Sopenharmony_ci};
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_cistruct fb_clut {
1968c2ecf20Sopenharmony_ci#define FB_CLUT_WAIT	0x00000001	/* Not yet implemented */
1978c2ecf20Sopenharmony_ci 	__u32	flag;
1988c2ecf20Sopenharmony_ci 	__u32	clutid;
1998c2ecf20Sopenharmony_ci 	__u32	offset;
2008c2ecf20Sopenharmony_ci 	__u32	count;
2018c2ecf20Sopenharmony_ci 	char *	red;
2028c2ecf20Sopenharmony_ci 	char *	green;
2038c2ecf20Sopenharmony_ci 	char *	blue;
2048c2ecf20Sopenharmony_ci};
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_cistruct fb_clut32 {
2078c2ecf20Sopenharmony_ci 	__u32	flag;
2088c2ecf20Sopenharmony_ci 	__u32	clutid;
2098c2ecf20Sopenharmony_ci 	__u32	offset;
2108c2ecf20Sopenharmony_ci 	__u32	count;
2118c2ecf20Sopenharmony_ci 	__u32	red;
2128c2ecf20Sopenharmony_ci 	__u32	green;
2138c2ecf20Sopenharmony_ci 	__u32	blue;
2148c2ecf20Sopenharmony_ci};
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci#define LEO_CLUTALLOC	_IOWR('L', 53, struct fb_clut_alloc)
2178c2ecf20Sopenharmony_ci#define LEO_CLUTFREE	_IOW('L', 54, struct fb_clut_alloc)
2188c2ecf20Sopenharmony_ci#define LEO_CLUTREAD	_IOW('L', 55, struct fb_clut)
2198c2ecf20Sopenharmony_ci#define LEO_CLUTPOST	_IOW('L', 56, struct fb_clut)
2208c2ecf20Sopenharmony_ci#define LEO_SETGAMMA	_IOW('L', 68, int) /* Not yet implemented */
2218c2ecf20Sopenharmony_ci#define LEO_GETGAMMA	_IOR('L', 69, int) /* Not yet implemented */
2228c2ecf20Sopenharmony_ci
2238c2ecf20Sopenharmony_ci#ifdef __KERNEL__
2248c2ecf20Sopenharmony_ci/* Addresses on the fd of a cgsix that are mappable */
2258c2ecf20Sopenharmony_ci#define CG6_FBC    0x70000000
2268c2ecf20Sopenharmony_ci#define CG6_TEC    0x70001000
2278c2ecf20Sopenharmony_ci#define CG6_BTREGS 0x70002000
2288c2ecf20Sopenharmony_ci#define CG6_FHC    0x70004000
2298c2ecf20Sopenharmony_ci#define CG6_THC    0x70005000
2308c2ecf20Sopenharmony_ci#define CG6_ROM    0x70006000
2318c2ecf20Sopenharmony_ci#define CG6_RAM    0x70016000
2328c2ecf20Sopenharmony_ci#define CG6_DHC    0x80000000
2338c2ecf20Sopenharmony_ci
2348c2ecf20Sopenharmony_ci#define CG3_MMAP_OFFSET 0x4000000
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ci/* Addresses on the fd of a tcx that are mappable */
2378c2ecf20Sopenharmony_ci#define TCX_RAM8BIT   		0x00000000
2388c2ecf20Sopenharmony_ci#define TCX_RAM24BIT   		0x01000000
2398c2ecf20Sopenharmony_ci#define TCX_UNK3   		0x10000000
2408c2ecf20Sopenharmony_ci#define TCX_UNK4   		0x20000000
2418c2ecf20Sopenharmony_ci#define TCX_CONTROLPLANE   	0x28000000
2428c2ecf20Sopenharmony_ci#define TCX_UNK6   		0x30000000
2438c2ecf20Sopenharmony_ci#define TCX_UNK7   		0x38000000
2448c2ecf20Sopenharmony_ci#define TCX_TEC    		0x70000000
2458c2ecf20Sopenharmony_ci#define TCX_BTREGS 		0x70002000
2468c2ecf20Sopenharmony_ci#define TCX_THC    		0x70004000
2478c2ecf20Sopenharmony_ci#define TCX_DHC    		0x70008000
2488c2ecf20Sopenharmony_ci#define TCX_ALT	   		0x7000a000
2498c2ecf20Sopenharmony_ci#define TCX_SYNC   		0x7000e000
2508c2ecf20Sopenharmony_ci#define TCX_UNK2    		0x70010000
2518c2ecf20Sopenharmony_ci
2528c2ecf20Sopenharmony_ci/* CG14 definitions */
2538c2ecf20Sopenharmony_ci
2548c2ecf20Sopenharmony_ci/* Offsets into the OBIO space: */
2558c2ecf20Sopenharmony_ci#define CG14_REGS        0       /* registers */
2568c2ecf20Sopenharmony_ci#define CG14_CURSORREGS  0x1000  /* cursor registers */
2578c2ecf20Sopenharmony_ci#define CG14_DACREGS     0x2000  /* DAC registers */
2588c2ecf20Sopenharmony_ci#define CG14_XLUT        0x3000  /* X Look Up Table -- ??? */
2598c2ecf20Sopenharmony_ci#define CG14_CLUT1       0x4000  /* Color Look Up Table */
2608c2ecf20Sopenharmony_ci#define CG14_CLUT2       0x5000  /* Color Look Up Table */
2618c2ecf20Sopenharmony_ci#define CG14_CLUT3       0x6000  /* Color Look Up Table */
2628c2ecf20Sopenharmony_ci#define CG14_AUTO	 0xf000
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci#endif /* KERNEL */
2658c2ecf20Sopenharmony_ci
2668c2ecf20Sopenharmony_ci/* These are exported to userland for applications to use */
2678c2ecf20Sopenharmony_ci/* Mappable offsets for the cg14: control registers */
2688c2ecf20Sopenharmony_ci#define MDI_DIRECT_MAP 0x10000000
2698c2ecf20Sopenharmony_ci#define MDI_CTLREG_MAP 0x20000000
2708c2ecf20Sopenharmony_ci#define MDI_CURSOR_MAP 0x30000000
2718c2ecf20Sopenharmony_ci#define MDI_SHDW_VRT_MAP 0x40000000
2728c2ecf20Sopenharmony_ci
2738c2ecf20Sopenharmony_ci/* Mappable offsets for the cg14: frame buffer resolutions */
2748c2ecf20Sopenharmony_ci/* 32 bits */
2758c2ecf20Sopenharmony_ci#define MDI_CHUNKY_XBGR_MAP 0x50000000
2768c2ecf20Sopenharmony_ci#define MDI_CHUNKY_BGR_MAP 0x60000000
2778c2ecf20Sopenharmony_ci
2788c2ecf20Sopenharmony_ci/* 16 bits */
2798c2ecf20Sopenharmony_ci#define MDI_PLANAR_X16_MAP 0x70000000
2808c2ecf20Sopenharmony_ci#define MDI_PLANAR_C16_MAP 0x80000000
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci/* 8 bit is done as CG3 MMAP offset */
2838c2ecf20Sopenharmony_ci/* 32 bits, planar */
2848c2ecf20Sopenharmony_ci#define MDI_PLANAR_X32_MAP 0x90000000
2858c2ecf20Sopenharmony_ci#define MDI_PLANAR_B32_MAP 0xa0000000
2868c2ecf20Sopenharmony_ci#define MDI_PLANAR_G32_MAP 0xb0000000
2878c2ecf20Sopenharmony_ci#define MDI_PLANAR_R32_MAP 0xc0000000
2888c2ecf20Sopenharmony_ci
2898c2ecf20Sopenharmony_ci/* Mappable offsets on leo */
2908c2ecf20Sopenharmony_ci#define LEO_SS0_MAP            0x00000000
2918c2ecf20Sopenharmony_ci#define LEO_LC_SS0_USR_MAP     0x00800000
2928c2ecf20Sopenharmony_ci#define LEO_LD_SS0_MAP         0x00801000
2938c2ecf20Sopenharmony_ci#define LEO_LX_CURSOR_MAP      0x00802000
2948c2ecf20Sopenharmony_ci#define LEO_SS1_MAP            0x00803000
2958c2ecf20Sopenharmony_ci#define LEO_LC_SS1_USR_MAP     0x01003000
2968c2ecf20Sopenharmony_ci#define LEO_LD_SS1_MAP         0x01004000
2978c2ecf20Sopenharmony_ci#define LEO_UNK_MAP            0x01005000
2988c2ecf20Sopenharmony_ci#define LEO_LX_KRN_MAP         0x01006000
2998c2ecf20Sopenharmony_ci#define LEO_LC_SS0_KRN_MAP     0x01007000
3008c2ecf20Sopenharmony_ci#define LEO_LC_SS1_KRN_MAP     0x01008000
3018c2ecf20Sopenharmony_ci#define LEO_LD_GBL_MAP         0x01009000
3028c2ecf20Sopenharmony_ci#define LEO_UNK2_MAP           0x0100a000
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_ci#ifdef __KERNEL__
3058c2ecf20Sopenharmony_cistruct  fbcmap32 {
3068c2ecf20Sopenharmony_ci	int             index;          /* first element (0 origin) */
3078c2ecf20Sopenharmony_ci	int             count;
3088c2ecf20Sopenharmony_ci	u32		red;
3098c2ecf20Sopenharmony_ci	u32		green;
3108c2ecf20Sopenharmony_ci	u32		blue;
3118c2ecf20Sopenharmony_ci};
3128c2ecf20Sopenharmony_ci
3138c2ecf20Sopenharmony_ci#define FBIOPUTCMAP32	_IOW('F', 3, struct fbcmap32)
3148c2ecf20Sopenharmony_ci#define FBIOGETCMAP32	_IOW('F', 4, struct fbcmap32)
3158c2ecf20Sopenharmony_ci
3168c2ecf20Sopenharmony_cistruct fbcursor32 {
3178c2ecf20Sopenharmony_ci	short set;		/* what to set, choose from the list above */
3188c2ecf20Sopenharmony_ci	short enable;		/* cursor on/off */
3198c2ecf20Sopenharmony_ci	struct fbcurpos pos;	/* cursor position */
3208c2ecf20Sopenharmony_ci	struct fbcurpos hot;	/* cursor hot spot */
3218c2ecf20Sopenharmony_ci	struct fbcmap32 cmap;	/* color map info */
3228c2ecf20Sopenharmony_ci	struct fbcurpos size;	/* cursor bit map size */
3238c2ecf20Sopenharmony_ci	u32	image;		/* cursor image bits */
3248c2ecf20Sopenharmony_ci	u32	mask;		/* cursor mask bits */
3258c2ecf20Sopenharmony_ci};
3268c2ecf20Sopenharmony_ci
3278c2ecf20Sopenharmony_ci#define FBIOSCURSOR32	_IOW('F', 24, struct fbcursor32)
3288c2ecf20Sopenharmony_ci#define FBIOGCURSOR32	_IOW('F', 25, struct fbcursor32)
3298c2ecf20Sopenharmony_ci#endif
3308c2ecf20Sopenharmony_ci
3318c2ecf20Sopenharmony_ci#endif /* __LINUX_FBIO_H */
332