summaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-04-17 07:43:32 +0100
committerDave Airlie <airlied@redhat.com>2011-04-28 14:56:23 +1000
commit1794d257fa7bab3ea5162f8abdca749996b65343 (patch)
treeea8d035a218a0cb0ee83443b3c25bd8df25567e2 /include/drm/drmP.h
parentbbb0aef5cfe95fe9b51a7eeba4a440b69037b01f (diff)
downloadblackbird-obmc-linux-1794d257fa7bab3ea5162f8abdca749996b65343.tar.gz
blackbird-obmc-linux-1794d257fa7bab3ea5162f8abdca749996b65343.zip
drm: Export the command-line mode parser
In the absence of configuration data for providing the fixed mode for a panel, I would like to be able to pass such modes along a separate module paramenter. To do so, I then need to parse a modeline from a string, which drm is already capable of. Export that capability to the drivers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 4ab866e73f46..738b3a5faa12 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -994,6 +994,22 @@ struct drm_minor {
struct drm_mode_group mode_group;
};
+/* mode specified on the command line */
+struct drm_cmdline_mode {
+ bool specified;
+ bool refresh_specified;
+ bool bpp_specified;
+ int xres, yres;
+ int bpp;
+ int refresh;
+ bool rb;
+ bool interlace;
+ bool cvt;
+ bool margins;
+ enum drm_connector_force force;
+};
+
+
struct drm_pending_vblank_event {
struct drm_pending_event base;
int pipe;
@@ -1389,6 +1405,15 @@ extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
struct drm_crtc *refcrtc);
extern void drm_calc_timestamping_constants(struct drm_crtc *crtc);
+extern bool
+drm_mode_parse_command_line_for_connector(const char *mode_option,
+ struct drm_connector *connector,
+ struct drm_cmdline_mode *mode);
+
+extern struct drm_display_mode *
+drm_mode_create_from_cmdline_mode(struct drm_device *dev,
+ struct drm_cmdline_mode *cmd);
+
/* Modesetting support */
extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
OpenPOWER on IntegriCloud