aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-24 15:06:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-24 15:06:40 -0400
commit98b98d316349e9a028e632629fe813d07fa5afdd (patch)
treecaaf6a662a86c5e2a418f0929ca05f0748803ac5 /include/drm
parent0d66cba1ac3ad38614077443d604d6a09cec99de (diff)
parent931474c4c30633400ff0dff8fb452ae20e01d067 (diff)
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (169 commits) drivers/gpu/drm/radeon/atom.c: fix warning drm/radeon/kms: bump kms version number drm/radeon/kms: properly set num banks for fusion asics drm/radeon/kms/atom: move dig phy init out of modesetting drm/radeon/kms/cayman: fix typo in register mask drm/radeon/kms: fix typo in spread spectrum code drm/radeon/kms: fix tile_config value reported to userspace on cayman. drm/radeon/kms: fix incorrect comparison in cayman setup code. drm/radeon/kms: add wait idle ioctl for eg->cayman drm/radeon/cayman: setup hdp to invalidate and flush when asked drm/radeon/evergreen/btc/fusion: setup hdp to invalidate and flush when asked agp/uninorth: Fix lockups with radeon KMS and >1x. drm/radeon/kms: the SS_Id field in the LCD table if for LVDS only drm/radeon/kms: properly set the CLK_REF bit for DCE3 devices drm/radeon/kms: fixup eDP connector handling drm/radeon/kms: bail early for eDP in hotplug callback drm/radeon/kms: simplify hotplug handler logic drm/radeon/kms: rewrite DP handling drm/radeon/kms/atom: add support for setting DP panel mode drm/radeon/kms: atombios.h updates for DP panel mode ...
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h49
-rw-r--r--include/drm/drm_crtc.h6
-rw-r--r--include/drm/drm_dp_helper.h5
-rw-r--r--include/drm/drm_edid.h25
-rw-r--r--include/drm/drm_fb_helper.h16
5 files changed, 69 insertions, 32 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
125extern void drm_ut_debug_printk(unsigned int request_level, 125extern __attribute__((format (printf, 4, 5)))
126void 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, ...);
130extern __attribute__((format (printf, 2, 3)))
131int 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 */
998struct 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
1003struct drm_pending_vblank_event { 1013struct 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);
1396extern void drm_calc_timestamping_constants(struct drm_crtc *crtc); 1406extern void drm_calc_timestamping_constants(struct drm_crtc *crtc);
1397 1407
1408extern bool
1409drm_mode_parse_command_line_for_connector(const char *mode_option,
1410 struct drm_connector *connector,
1411 struct drm_cmdline_mode *mode);
1412
1413extern struct drm_display_mode *
1414drm_mode_create_from_cmdline_mode(struct drm_device *dev,
1415 struct drm_cmdline_mode *cmd);
1416
1398/* Modesetting support */ 1417/* Modesetting support */
1399extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); 1418extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
1400extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc); 1419extern 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 */
44struct 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
57struct drm_fb_helper_surface_size { 43struct 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
76struct drm_fb_helper_connector { 62struct 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
81struct drm_fb_helper { 67struct drm_fb_helper {