0001
0002 #ifndef _LINUX_SYSFB_H
0003 #define _LINUX_SYSFB_H
0004
0005
0006
0007
0008
0009
0010 #include <linux/kernel.h>
0011 #include <linux/platform_data/simplefb.h>
0012 #include <linux/screen_info.h>
0013
0014 enum {
0015 M_I17,
0016 M_I20,
0017 M_I20_SR,
0018 M_I24,
0019 M_I24_8_1,
0020 M_I24_10_1,
0021 M_I27_11_1,
0022 M_MINI,
0023 M_MINI_3_1,
0024 M_MINI_4_1,
0025 M_MB,
0026 M_MB_2,
0027 M_MB_3,
0028 M_MB_5_1,
0029 M_MB_6_1,
0030 M_MB_7_1,
0031 M_MB_SR,
0032 M_MBA,
0033 M_MBA_3,
0034 M_MBP,
0035 M_MBP_2,
0036 M_MBP_2_2,
0037 M_MBP_SR,
0038 M_MBP_4,
0039 M_MBP_5_1,
0040 M_MBP_5_2,
0041 M_MBP_5_3,
0042 M_MBP_6_1,
0043 M_MBP_6_2,
0044 M_MBP_7_1,
0045 M_MBP_8_2,
0046 M_UNKNOWN
0047 };
0048
0049 struct efifb_dmi_info {
0050 char *optname;
0051 unsigned long base;
0052 int stride;
0053 int width;
0054 int height;
0055 int flags;
0056 };
0057
0058 #ifdef CONFIG_SYSFB
0059
0060 void sysfb_disable(void);
0061
0062 #else
0063
0064 static inline void sysfb_disable(void)
0065 {
0066 }
0067
0068 #endif
0069
0070 #ifdef CONFIG_EFI
0071
0072 extern struct efifb_dmi_info efifb_dmi_list[];
0073 void sysfb_apply_efi_quirks(struct platform_device *pd);
0074
0075 #else
0076
0077 static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
0078 {
0079 }
0080
0081 #endif
0082
0083 #ifdef CONFIG_SYSFB_SIMPLEFB
0084
0085 bool sysfb_parse_mode(const struct screen_info *si,
0086 struct simplefb_platform_data *mode);
0087 struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
0088 const struct simplefb_platform_data *mode);
0089
0090 #else
0091
0092 static inline bool sysfb_parse_mode(const struct screen_info *si,
0093 struct simplefb_platform_data *mode)
0094 {
0095 return false;
0096 }
0097
0098 static inline struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
0099 const struct simplefb_platform_data *mode)
0100 {
0101 return ERR_PTR(-EINVAL);
0102 }
0103
0104 #endif
0105
0106 #endif