diff options
Diffstat (limited to 'drivers/gpu/drm/drm_probe_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_probe_helper.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index db7d250f7ac7..6857e9ad6339 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c | |||
@@ -82,6 +82,22 @@ static void drm_mode_validate_flag(struct drm_connector *connector, | |||
82 | return; | 82 | return; |
83 | } | 83 | } |
84 | 84 | ||
85 | static int drm_helper_probe_add_cmdline_mode(struct drm_connector *connector) | ||
86 | { | ||
87 | struct drm_display_mode *mode; | ||
88 | |||
89 | if (!connector->cmdline_mode.specified) | ||
90 | return 0; | ||
91 | |||
92 | mode = drm_mode_create_from_cmdline_mode(connector->dev, | ||
93 | &connector->cmdline_mode); | ||
94 | if (mode == NULL) | ||
95 | return 0; | ||
96 | |||
97 | drm_mode_probed_add(connector, mode); | ||
98 | return 1; | ||
99 | } | ||
100 | |||
85 | static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connector *connector, | 101 | static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connector *connector, |
86 | uint32_t maxX, uint32_t maxY, bool merge_type_bits) | 102 | uint32_t maxX, uint32_t maxY, bool merge_type_bits) |
87 | { | 103 | { |
@@ -141,6 +157,7 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect | |||
141 | 157 | ||
142 | if (count == 0 && connector->status == connector_status_connected) | 158 | if (count == 0 && connector->status == connector_status_connected) |
143 | count = drm_add_modes_noedid(connector, 1024, 768); | 159 | count = drm_add_modes_noedid(connector, 1024, 768); |
160 | count += drm_helper_probe_add_cmdline_mode(connector); | ||
144 | if (count == 0) | 161 | if (count == 0) |
145 | goto prune; | 162 | goto prune; |
146 | 163 | ||