aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2014-02-12 15:26:24 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-02-12 17:42:16 -0500
commit2f1046f304b1ab14ea611a01b85f3486f2b9ce5b (patch)
tree28b20bee0f4ab471931391217bd575c5523d29e4
parentbbb5eebf034be22fb4de6e9879a0933d3292cf2f (diff)
drm: export cmdline and preferred mode functions from fb helper
This allows drivers to use them in custom initial_config functions. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c6
-rw-r--r--include/drm/drm_fb_helper.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 98a03639b413..d99df15a78bc 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1136,7 +1136,7 @@ static int drm_fb_helper_probe_connector_modes(struct drm_fb_helper *fb_helper,
1136 return count; 1136 return count;
1137} 1137}
1138 1138
1139static struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector, int width, int height) 1139struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector, int width, int height)
1140{ 1140{
1141 struct drm_display_mode *mode; 1141 struct drm_display_mode *mode;
1142 1142
@@ -1149,6 +1149,7 @@ static struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_conn
1149 } 1149 }
1150 return NULL; 1150 return NULL;
1151} 1151}
1152EXPORT_SYMBOL(drm_has_preferred_mode);
1152 1153
1153static bool drm_has_cmdline_mode(struct drm_fb_helper_connector *fb_connector) 1154static bool drm_has_cmdline_mode(struct drm_fb_helper_connector *fb_connector)
1154{ 1155{
@@ -1157,7 +1158,7 @@ static bool drm_has_cmdline_mode(struct drm_fb_helper_connector *fb_connector)
1157 return cmdline_mode->specified; 1158 return cmdline_mode->specified;
1158} 1159}
1159 1160
1160static struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, 1161struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
1161 int width, int height) 1162 int width, int height)
1162{ 1163{
1163 struct drm_cmdline_mode *cmdline_mode; 1164 struct drm_cmdline_mode *cmdline_mode;
@@ -1197,6 +1198,7 @@ create_mode:
1197 list_add(&mode->head, &fb_helper_conn->connector->modes); 1198 list_add(&mode->head, &fb_helper_conn->connector->modes);
1198 return mode; 1199 return mode;
1199} 1200}
1201EXPORT_SYMBOL(drm_pick_cmdline_mode);
1200 1202
1201static bool drm_connector_enabled(struct drm_connector *connector, bool strict) 1203static bool drm_connector_enabled(struct drm_connector *connector, bool strict)
1202{ 1204{
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 471f276ce8f7..2d659dc39972 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -121,5 +121,11 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
121int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); 121int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
122int drm_fb_helper_debug_enter(struct fb_info *info); 122int drm_fb_helper_debug_enter(struct fb_info *info);
123int drm_fb_helper_debug_leave(struct fb_info *info); 123int drm_fb_helper_debug_leave(struct fb_info *info);
124struct drm_display_mode *
125drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector,
126 int width, int height);
127struct drm_display_mode *
128drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
129 int width, int height);
124 130
125#endif 131#endif