| 1 |
|
| 2 | #ifndef _LINUX_SYSFB_H
|
| 3 | #define _LINUX_SYSFB_H
|
| 4 |
|
| 5 | |
| 6 | * Generic System Framebuffers on x86
|
| 7 | * Copyright (c) 2012-2013 David Herrmann <[email protected]>
|
| 8 |
|
| 9 |
|
| 10 | #include <linux/kernel.h>
|
| 11 | #include <linux/platform_data/simplefb.h>
|
| 12 | #include <linux/screen_info.h>
|
| 13 |
|
| 14 | enum {
|
| 15 | M_I17,
|
| 16 | M_I20,
|
| 17 | M_I20_SR,
|
| 18 | M_I24,
|
| 19 | M_I24_8_1,
|
| 20 | M_I24_10_1,
|
| 21 | M_I27_11_1,
|
| 22 | M_MINI,
|
| 23 | M_MINI_3_1,
|
| 24 | M_MINI_4_1,
|
| 25 | M_MB,
|
| 26 | M_MB_2,
|
| 27 | M_MB_3,
|
| 28 | M_MB_5_1,
|
| 29 | M_MB_6_1,
|
| 30 | M_MB_7_1,
|
| 31 | M_MB_SR,
|
| 32 | M_MBA,
|
| 33 | M_MBA_3,
|
| 34 | M_MBP,
|
| 35 | M_MBP_2,
|
| 36 | M_MBP_2_2,
|
| 37 | M_MBP_SR,
|
| 38 | M_MBP_4,
|
| 39 | M_MBP_5_1,
|
| 40 | M_MBP_5_2,
|
| 41 | M_MBP_5_3,
|
| 42 | M_MBP_6_1,
|
| 43 | M_MBP_6_2,
|
| 44 | M_MBP_7_1,
|
| 45 | M_MBP_8_2,
|
| 46 | M_UNKNOWN
|
| 47 | };
|
| 48 |
|
| 49 | struct efifb_dmi_info {
|
| 50 | char *optname;
|
| 51 | unsigned long base;
|
| 52 | int stride;
|
| 53 | int width;
|
| 54 | int height;
|
| 55 | int flags;
|
| 56 | };
|
| 57 |
|
| 58 | #ifdef CONFIG_EFI
|
| 59 |
|
| 60 | extern struct efifb_dmi_info efifb_dmi_list[];
|
| 61 | void sysfb_apply_efi_quirks(struct platform_device *pd);
|
| 62 |
|
| 63 | #else
|
| 64 |
|
| 65 | static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
|
| 66 | {
|
| 67 | }
|
| 68 |
|
| 69 | #endif
|
| 70 |
|
| 71 | #ifdef CONFIG_SYSFB_SIMPLEFB
|
| 72 |
|
| 73 | bool sysfb_parse_mode(const struct screen_info *si,
|
| 74 | struct simplefb_platform_data *mode);
|
| 75 | int sysfb_create_simplefb(const struct screen_info *si,
|
| 76 | const struct simplefb_platform_data *mode);
|
| 77 |
|
| 78 | #else
|
| 79 |
|
| 80 | static inline bool sysfb_parse_mode(const struct screen_info *si,
|
| 81 | struct simplefb_platform_data *mode)
|
| 82 | {
|
| 83 | return false;
|
| 84 | }
|
| 85 |
|
| 86 | static inline int sysfb_create_simplefb(const struct screen_info *si,
|
| 87 | const struct simplefb_platform_data *mode)
|
| 88 | {
|
| 89 | return -EINVAL;
|
| 90 | }
|
| 91 |
|
| 92 | #endif
|
| 93 |
|
| 94 | #endif
|