1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _LINUX_SISFB_H_ 20 #define _LINUX_SISFB_H_ 21 #include <linux/types.h> 22 #include <asm/ioctl.h> 23 #define CRT2_DEFAULT 0x00000001 24 #define CRT2_LCD 0x00000002 25 #define CRT2_TV 0x00000004 26 #define CRT2_VGA 0x00000008 27 #define TV_NTSC 0x00000010 28 #define TV_PAL 0x00000020 29 #define TV_HIVISION 0x00000040 30 #define TV_YPBPR 0x00000080 31 #define TV_AVIDEO 0x00000100 32 #define TV_SVIDEO 0x00000200 33 #define TV_SCART 0x00000400 34 #define TV_PALM 0x00001000 35 #define TV_PALN 0x00002000 36 #define TV_NTSCJ 0x00001000 37 #define TV_CHSCART 0x00008000 38 #define TV_CHYPBPR525I 0x00010000 39 #define CRT1_VGA 0x00000000 40 #define CRT1_LCDA 0x00020000 41 #define VGA2_CONNECTED 0x00040000 42 #define VB_DISPTYPE_CRT1 0x00080000 43 #define VB_SINGLE_MODE 0x20000000 44 #define VB_MIRROR_MODE 0x40000000 45 #define VB_DUALVIEW_MODE 0x80000000 46 #define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA) 47 #define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ) 48 #define TV_INTERFACE (TV_AVIDEO | TV_SVIDEO | TV_SCART | TV_HIVISION | TV_YPBPR | TV_CHSCART | TV_CHYPBPR525I) 49 #define TV_YPBPR525I TV_NTSC 50 #define TV_YPBPR525P TV_PAL 51 #define TV_YPBPR750P TV_PALM 52 #define TV_YPBPR1080I TV_PALN 53 #define TV_YPBPRALL (TV_YPBPR525I | TV_YPBPR525P | TV_YPBPR750P | TV_YPBPR1080I) 54 #define VB_DISPTYPE_DISP2 CRT2_ENABLE 55 #define VB_DISPTYPE_CRT2 CRT2_ENABLE 56 #define VB_DISPTYPE_DISP1 VB_DISPTYPE_CRT1 57 #define VB_DISPMODE_SINGLE VB_SINGLE_MODE 58 #define VB_DISPMODE_MIRROR VB_MIRROR_MODE 59 #define VB_DISPMODE_DUAL VB_DUALVIEW_MODE 60 #define VB_DISPLAY_MODE (SINGLE_MODE | MIRROR_MODE | DUALVIEW_MODE) 61 struct sisfb_info { 62 __u32 sisfb_id; 63 #ifndef SISFB_ID 64 #define SISFB_ID 0x53495346 65 #endif 66 __u32 chip_id; 67 __u32 memory; 68 __u32 heapstart; 69 __u8 fbvidmode; 70 __u8 sisfb_version; 71 __u8 sisfb_revision; 72 __u8 sisfb_patchlevel; 73 __u8 sisfb_caps; 74 __u32 sisfb_tqlen; 75 __u32 sisfb_pcibus; 76 __u32 sisfb_pcislot; 77 __u32 sisfb_pcifunc; 78 __u8 sisfb_lcdpdc; 79 __u8 sisfb_lcda; 80 __u32 sisfb_vbflags; 81 __u32 sisfb_currentvbflags; 82 __u32 sisfb_scalelcd; 83 __u32 sisfb_specialtiming; 84 __u8 sisfb_haveemi; 85 __u8 sisfb_emi30, sisfb_emi31, sisfb_emi32, sisfb_emi33; 86 __u8 sisfb_haveemilcd; 87 __u8 sisfb_lcdpdca; 88 __u16 sisfb_tvxpos, sisfb_tvypos; 89 __u32 sisfb_heapsize; 90 __u32 sisfb_videooffset; 91 __u32 sisfb_curfstn; 92 __u32 sisfb_curdstn; 93 __u16 sisfb_pci_vendor; 94 __u32 sisfb_vbflags2; 95 __u8 sisfb_can_post; 96 __u8 sisfb_card_posted; 97 __u8 sisfb_was_boot_device; 98 __u8 reserved[183]; 99 }; 100 #define SISFB_CMD_GETVBFLAGS 0x55AA0001 101 #define SISFB_CMD_SWITCHCRT1 0x55AA0010 102 #define SISFB_CMD_ERR_OK 0x80000000 103 #define SISFB_CMD_ERR_LOCKED 0x80000001 104 #define SISFB_CMD_ERR_EARLY 0x80000002 105 #define SISFB_CMD_ERR_NOVB 0x80000003 106 #define SISFB_CMD_ERR_NOCRT2 0x80000004 107 #define SISFB_CMD_ERR_UNKNOWN 0x8000ffff 108 #define SISFB_CMD_ERR_OTHER 0x80010000 109 struct sisfb_cmd { 110 __u32 sisfb_cmd; 111 __u32 sisfb_arg[16]; 112 __u32 sisfb_result[4]; 113 }; 114 #define SISFB_GET_INFO_SIZE _IOR(0xF3, 0x00, __u32) 115 #define SISFB_GET_INFO _IOR(0xF3, 0x01, struct sisfb_info) 116 #define SISFB_GET_VBRSTATUS _IOR(0xF3, 0x02, __u32) 117 #define SISFB_GET_AUTOMAXIMIZE _IOR(0xF3, 0x03, __u32) 118 #define SISFB_SET_AUTOMAXIMIZE _IOW(0xF3, 0x03, __u32) 119 #define SISFB_GET_TVPOSOFFSET _IOR(0xF3, 0x04, __u32) 120 #define SISFB_SET_TVPOSOFFSET _IOW(0xF3, 0x04, __u32) 121 #define SISFB_COMMAND _IOWR(0xF3, 0x05, struct sisfb_cmd) 122 #define SISFB_SET_LOCK _IOW(0xF3, 0x06, __u32) 123 #define SISFB_GET_INFO_OLD _IOR('n', 0xF8, __u32) 124 #define SISFB_GET_VBRSTATUS_OLD _IOR('n', 0xF9, __u32) 125 #define SISFB_GET_AUTOMAXIMIZE_OLD _IOR('n', 0xFA, __u32) 126 #define SISFB_SET_AUTOMAXIMIZE_OLD _IOW('n', 0xFA, __u32) 127 struct sis_memreq { 128 __u32 offset; 129 __u32 size; 130 }; 131 #endif 132