@@ -312,8 +312,18 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
continue;
}
+ if (connector->force == DRM_FORCE_OFF) {
+ DRM_DEBUG_KMS("connector %d is disabled by user, skipping\n",
+ connector->base.id);
+ enabled[i] = false;
+ continue;
+ }
+
encoder = connector->encoder;
if (!encoder || WARN_ON(!encoder->crtc)) {
+ if (connector->force > DRM_FORCE_OFF)
+ goto bail;
+
DRM_DEBUG_KMS("connector %d has no encoder or crtc, skipping\n",
connector->base.id);
enabled[i] = false;
@@ -327,12 +337,9 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
* with a single CRTC, since our cloning support may not
* match the BIOS.
*/
- for (j = 0; j < fb_helper->connector_count; j++) {
- if (crtcs[j] == new_crtc) {
- any_enabled = false;
- goto out;
- }
- }
+ for (j = 0; j < fb_helper->connector_count; j++)
+ if (crtcs[j] == new_crtc)
+ goto bail;
DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
fb_conn->connector->base.id);
@@ -375,8 +382,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
any_enabled = true;
}
-out:
if (!any_enabled) {
+bail:
memcpy(enabled, save_enabled, dev->mode_config.num_connector);
kfree(save_enabled);
return false;