diff options
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r-- | include/drm/drmP.h | 49 |
1 files changed, 34 insertions, 15 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); |