diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drmP.h | 49 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 6 | ||||
-rw-r--r-- | include/drm/drm_dp_helper.h | 5 | ||||
-rw-r--r-- | include/drm/drm_edid.h | 25 | ||||
-rw-r--r-- | include/drm/drm_fb_helper.h | 16 | ||||
-rw-r--r-- | include/linux/mxm-wmi.h | 33 | ||||
-rw-r--r-- | include/linux/pci.h | 7 |
7 files changed, 107 insertions, 34 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 202424d17ed7..738b3a5faa12 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -122,10 +122,14 @@ struct drm_device; | |||
122 | * using the DRM_DEBUG_KMS and DRM_DEBUG. | 122 | * using the DRM_DEBUG_KMS and DRM_DEBUG. |
123 | */ | 123 | */ |
124 | 124 | ||
125 | extern void drm_ut_debug_printk(unsigned int request_level, | 125 | extern __attribute__((format (printf, 4, 5))) |
126 | void drm_ut_debug_printk(unsigned int request_level, | ||
126 | const char *prefix, | 127 | const char *prefix, |
127 | const char *function_name, | 128 | const char *function_name, |
128 | const char *format, ...); | 129 | const char *format, ...); |
130 | extern __attribute__((format (printf, 2, 3))) | ||
131 | int drm_err(const char *func, const char *format, ...); | ||
132 | |||
129 | /***********************************************************************/ | 133 | /***********************************************************************/ |
130 | /** \name DRM template customization defaults */ | 134 | /** \name DRM template customization defaults */ |
131 | /*@{*/ | 135 | /*@{*/ |
@@ -181,21 +185,11 @@ extern void drm_ut_debug_printk(unsigned int request_level, | |||
181 | * \param fmt printf() like format string. | 185 | * \param fmt printf() like format string. |
182 | * \param arg arguments | 186 | * \param arg arguments |
183 | */ | 187 | */ |
184 | #define DRM_ERROR(fmt, arg...) \ | 188 | #define DRM_ERROR(fmt, ...) \ |
185 | printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ##arg) | 189 | drm_err(__func__, fmt, ##__VA_ARGS__) |
186 | |||
187 | /** | ||
188 | * Memory error output. | ||
189 | * | ||
190 | * \param area memory area where the error occurred. | ||
191 | * \param fmt printf() like format string. | ||
192 | * \param arg arguments | ||
193 | */ | ||
194 | #define DRM_MEM_ERROR(area, fmt, arg...) \ | ||
195 | printk(KERN_ERR "[" DRM_NAME ":%s:%s] *ERROR* " fmt , __func__, \ | ||
196 | drm_mem_stats[area].name , ##arg) | ||
197 | 190 | ||
198 | #define DRM_INFO(fmt, arg...) printk(KERN_INFO "[" DRM_NAME "] " fmt , ##arg) | 191 | #define DRM_INFO(fmt, ...) \ |
192 | printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__) | ||
199 | 193 | ||
200 | /** | 194 | /** |
201 | * Debug output. | 195 | * Debug output. |
@@ -1000,6 +994,22 @@ struct drm_minor { | |||
1000 | struct drm_mode_group mode_group; | 994 | struct drm_mode_group mode_group; |
1001 | }; | 995 | }; |
1002 | 996 | ||
997 | /* mode specified on the command line */ | ||
998 | struct drm_cmdline_mode { | ||
999 | bool specified; | ||
1000 | bool refresh_specified; | ||
1001 | bool bpp_specified; | ||
1002 | int xres, yres; | ||
1003 | int bpp; | ||
1004 | int refresh; | ||
1005 | bool rb; | ||
1006 | bool interlace; | ||
1007 | bool cvt; | ||
1008 | bool margins; | ||
1009 | enum drm_connector_force force; | ||
1010 | }; | ||
1011 | |||
1012 | |||
1003 | struct drm_pending_vblank_event { | 1013 | struct drm_pending_vblank_event { |
1004 | struct drm_pending_event base; | 1014 | struct drm_pending_event base; |
1005 | int pipe; | 1015 | int pipe; |
@@ -1395,6 +1405,15 @@ extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, | |||
1395 | struct drm_crtc *refcrtc); | 1405 | struct drm_crtc *refcrtc); |
1396 | extern void drm_calc_timestamping_constants(struct drm_crtc *crtc); | 1406 | extern void drm_calc_timestamping_constants(struct drm_crtc *crtc); |
1397 | 1407 | ||
1408 | extern bool | ||
1409 | drm_mode_parse_command_line_for_connector(const char *mode_option, | ||
1410 | struct drm_connector *connector, | ||
1411 | struct drm_cmdline_mode *mode); | ||
1412 | |||
1413 | extern struct drm_display_mode * | ||
1414 | drm_mode_create_from_cmdline_mode(struct drm_device *dev, | ||
1415 | struct drm_cmdline_mode *cmd); | ||
1416 | |||
1398 | /* Modesetting support */ | 1417 | /* Modesetting support */ |
1399 | extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); | 1418 | extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); |
1400 | extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc); | 1419 | extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc); |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index d94684b7ba34..9573e0ce3120 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -183,7 +183,9 @@ enum subpixel_order { | |||
183 | SubPixelNone, | 183 | SubPixelNone, |
184 | }; | 184 | }; |
185 | 185 | ||
186 | 186 | #define DRM_COLOR_FORMAT_RGB444 (1<<0) | |
187 | #define DRM_COLOR_FORMAT_YCRCB444 (1<<1) | ||
188 | #define DRM_COLOR_FORMAT_YCRCB422 (1<<2) | ||
187 | /* | 189 | /* |
188 | * Describes a given display (e.g. CRT or flat panel) and its limitations. | 190 | * Describes a given display (e.g. CRT or flat panel) and its limitations. |
189 | */ | 191 | */ |
@@ -198,8 +200,10 @@ struct drm_display_info { | |||
198 | unsigned int min_vfreq, max_vfreq; | 200 | unsigned int min_vfreq, max_vfreq; |
199 | unsigned int min_hfreq, max_hfreq; | 201 | unsigned int min_hfreq, max_hfreq; |
200 | unsigned int pixel_clock; | 202 | unsigned int pixel_clock; |
203 | unsigned int bpc; | ||
201 | 204 | ||
202 | enum subpixel_order subpixel_order; | 205 | enum subpixel_order subpixel_order; |
206 | u32 color_formats; | ||
203 | 207 | ||
204 | char *raw_edid; /* if any */ | 208 | char *raw_edid; /* if any */ |
205 | }; | 209 | }; |
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 83a389e44543..91567bbdb027 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h | |||
@@ -53,6 +53,7 @@ | |||
53 | 53 | ||
54 | #define DP_MAX_LANE_COUNT 0x002 | 54 | #define DP_MAX_LANE_COUNT 0x002 |
55 | # define DP_MAX_LANE_COUNT_MASK 0x1f | 55 | # define DP_MAX_LANE_COUNT_MASK 0x1f |
56 | # define DP_TPS3_SUPPORTED (1 << 6) | ||
56 | # define DP_ENHANCED_FRAME_CAP (1 << 7) | 57 | # define DP_ENHANCED_FRAME_CAP (1 << 7) |
57 | 58 | ||
58 | #define DP_MAX_DOWNSPREAD 0x003 | 59 | #define DP_MAX_DOWNSPREAD 0x003 |
@@ -71,10 +72,13 @@ | |||
71 | 72 | ||
72 | #define DP_MAIN_LINK_CHANNEL_CODING 0x006 | 73 | #define DP_MAIN_LINK_CHANNEL_CODING 0x006 |
73 | 74 | ||
75 | #define DP_TRAINING_AUX_RD_INTERVAL 0x00e | ||
76 | |||
74 | /* link configuration */ | 77 | /* link configuration */ |
75 | #define DP_LINK_BW_SET 0x100 | 78 | #define DP_LINK_BW_SET 0x100 |
76 | # define DP_LINK_BW_1_62 0x06 | 79 | # define DP_LINK_BW_1_62 0x06 |
77 | # define DP_LINK_BW_2_7 0x0a | 80 | # define DP_LINK_BW_2_7 0x0a |
81 | # define DP_LINK_BW_5_4 0x14 | ||
78 | 82 | ||
79 | #define DP_LANE_COUNT_SET 0x101 | 83 | #define DP_LANE_COUNT_SET 0x101 |
80 | # define DP_LANE_COUNT_MASK 0x0f | 84 | # define DP_LANE_COUNT_MASK 0x0f |
@@ -84,6 +88,7 @@ | |||
84 | # define DP_TRAINING_PATTERN_DISABLE 0 | 88 | # define DP_TRAINING_PATTERN_DISABLE 0 |
85 | # define DP_TRAINING_PATTERN_1 1 | 89 | # define DP_TRAINING_PATTERN_1 1 |
86 | # define DP_TRAINING_PATTERN_2 2 | 90 | # define DP_TRAINING_PATTERN_2 2 |
91 | # define DP_TRAINING_PATTERN_3 3 | ||
87 | # define DP_TRAINING_PATTERN_MASK 0x3 | 92 | # define DP_TRAINING_PATTERN_MASK 0x3 |
88 | 93 | ||
89 | # define DP_LINK_QUAL_PATTERN_DISABLE (0 << 2) | 94 | # define DP_LINK_QUAL_PATTERN_DISABLE (0 << 2) |
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 5881fad91faa..eacb415b309a 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -155,12 +155,35 @@ struct detailed_timing { | |||
155 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) | 155 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) |
156 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 4) | 156 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 4) |
157 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 5) | 157 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 5) |
158 | #define DRM_EDID_INPUT_DIGITAL (1 << 7) /* bits below must be zero if set */ | 158 | #define DRM_EDID_INPUT_DIGITAL (1 << 7) |
159 | #define DRM_EDID_DIGITAL_DEPTH_MASK (7 << 4) | ||
160 | #define DRM_EDID_DIGITAL_DEPTH_UNDEF (0 << 4) | ||
161 | #define DRM_EDID_DIGITAL_DEPTH_6 (1 << 4) | ||
162 | #define DRM_EDID_DIGITAL_DEPTH_8 (2 << 4) | ||
163 | #define DRM_EDID_DIGITAL_DEPTH_10 (3 << 4) | ||
164 | #define DRM_EDID_DIGITAL_DEPTH_12 (4 << 4) | ||
165 | #define DRM_EDID_DIGITAL_DEPTH_14 (5 << 4) | ||
166 | #define DRM_EDID_DIGITAL_DEPTH_16 (6 << 4) | ||
167 | #define DRM_EDID_DIGITAL_DEPTH_RSVD (7 << 4) | ||
168 | #define DRM_EDID_DIGITAL_TYPE_UNDEF (0) | ||
169 | #define DRM_EDID_DIGITAL_TYPE_DVI (1) | ||
170 | #define DRM_EDID_DIGITAL_TYPE_HDMI_A (2) | ||
171 | #define DRM_EDID_DIGITAL_TYPE_HDMI_B (3) | ||
172 | #define DRM_EDID_DIGITAL_TYPE_MDDI (4) | ||
173 | #define DRM_EDID_DIGITAL_TYPE_DP (5) | ||
159 | 174 | ||
160 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 0) | 175 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 0) |
161 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 1) | 176 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 1) |
162 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 2) | 177 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 2) |
178 | /* If analog */ | ||
163 | #define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ | 179 | #define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ |
180 | /* If digital */ | ||
181 | #define DRM_EDID_FEATURE_COLOR_MASK (3 << 3) | ||
182 | #define DRM_EDID_FEATURE_RGB (0 << 3) | ||
183 | #define DRM_EDID_FEATURE_RGB_YCRCB444 (1 << 3) | ||
184 | #define DRM_EDID_FEATURE_RGB_YCRCB422 (2 << 3) | ||
185 | #define DRM_EDID_FEATURE_RGB_YCRCB (3 << 3) /* both 4:4:4 and 4:2:2 */ | ||
186 | |||
164 | #define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 5) | 187 | #define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 5) |
165 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 6) | 188 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 6) |
166 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 7) | 189 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 7) |
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index c99c3d3e7811..6e3076ad646e 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h | |||
@@ -40,20 +40,6 @@ struct drm_fb_helper_crtc { | |||
40 | struct drm_display_mode *desired_mode; | 40 | struct drm_display_mode *desired_mode; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* mode specified on the command line */ | ||
44 | struct drm_fb_helper_cmdline_mode { | ||
45 | bool specified; | ||
46 | bool refresh_specified; | ||
47 | bool bpp_specified; | ||
48 | int xres, yres; | ||
49 | int bpp; | ||
50 | int refresh; | ||
51 | bool rb; | ||
52 | bool interlace; | ||
53 | bool cvt; | ||
54 | bool margins; | ||
55 | }; | ||
56 | |||
57 | struct drm_fb_helper_surface_size { | 43 | struct drm_fb_helper_surface_size { |
58 | u32 fb_width; | 44 | u32 fb_width; |
59 | u32 fb_height; | 45 | u32 fb_height; |
@@ -74,8 +60,8 @@ struct drm_fb_helper_funcs { | |||
74 | }; | 60 | }; |
75 | 61 | ||
76 | struct drm_fb_helper_connector { | 62 | struct drm_fb_helper_connector { |
77 | struct drm_fb_helper_cmdline_mode cmdline_mode; | ||
78 | struct drm_connector *connector; | 63 | struct drm_connector *connector; |
64 | struct drm_cmdline_mode cmdline_mode; | ||
79 | }; | 65 | }; |
80 | 66 | ||
81 | struct drm_fb_helper { | 67 | struct drm_fb_helper { |
diff --git a/include/linux/mxm-wmi.h b/include/linux/mxm-wmi.h new file mode 100644 index 000000000000..617a2950523c --- /dev/null +++ b/include/linux/mxm-wmi.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * MXM WMI driver | ||
3 | * | ||
4 | * Copyright(C) 2010 Red Hat. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef MXM_WMI_H | ||
22 | #define MXM_WMI_H | ||
23 | |||
24 | /* discrete adapters */ | ||
25 | #define MXM_MXDS_ADAPTER_0 0x0 | ||
26 | #define MXM_MXDS_ADAPTER_1 0x0 | ||
27 | /* integrated adapter */ | ||
28 | #define MXM_MXDS_ADAPTER_IGD 0x10 | ||
29 | int mxm_wmi_call_mxds(int adapter); | ||
30 | int mxm_wmi_call_mxmx(int adapter); | ||
31 | bool mxm_wmi_supported(void); | ||
32 | |||
33 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 4604d1d5514d..c446b5ca2d38 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -941,8 +941,11 @@ int pci_cfg_space_size_ext(struct pci_dev *dev); | |||
941 | int pci_cfg_space_size(struct pci_dev *dev); | 941 | int pci_cfg_space_size(struct pci_dev *dev); |
942 | unsigned char pci_bus_max_busnr(struct pci_bus *bus); | 942 | unsigned char pci_bus_max_busnr(struct pci_bus *bus); |
943 | 943 | ||
944 | #define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0) | ||
945 | #define PCI_VGA_STATE_CHANGE_DECODES (1 << 1) | ||
946 | |||
944 | int pci_set_vga_state(struct pci_dev *pdev, bool decode, | 947 | int pci_set_vga_state(struct pci_dev *pdev, bool decode, |
945 | unsigned int command_bits, bool change_bridge); | 948 | unsigned int command_bits, u32 flags); |
946 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 949 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
947 | 950 | ||
948 | #include <linux/pci-dma.h> | 951 | #include <linux/pci-dma.h> |
@@ -1087,7 +1090,7 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
1087 | 1090 | ||
1088 | /* some architectures require additional setup to direct VGA traffic */ | 1091 | /* some architectures require additional setup to direct VGA traffic */ |
1089 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, | 1092 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, |
1090 | unsigned int command_bits, bool change_bridge); | 1093 | unsigned int command_bits, u32 flags); |
1091 | extern void pci_register_set_vga_state(arch_set_vga_state_t func); | 1094 | extern void pci_register_set_vga_state(arch_set_vga_state_t func); |
1092 | 1095 | ||
1093 | #else /* CONFIG_PCI is not enabled */ | 1096 | #else /* CONFIG_PCI is not enabled */ |