aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fbdev.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fbdev.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index e8f694b57b8a..376ffe842e26 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -338,8 +338,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
338 bool *enabled, int width, int height) 338 bool *enabled, int width, int height)
339{ 339{
340 struct drm_i915_private *dev_priv = to_i915(fb_helper->dev); 340 struct drm_i915_private *dev_priv = to_i915(fb_helper->dev);
341 unsigned long conn_configured, conn_seq, mask;
341 unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG); 342 unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
342 unsigned long conn_configured, conn_seq;
343 int i, j; 343 int i, j;
344 bool *save_enabled; 344 bool *save_enabled;
345 bool fallback = true, ret = true; 345 bool fallback = true, ret = true;
@@ -357,9 +357,10 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
357 drm_modeset_backoff(&ctx); 357 drm_modeset_backoff(&ctx);
358 358
359 memcpy(save_enabled, enabled, count); 359 memcpy(save_enabled, enabled, count);
360 conn_seq = GENMASK(count - 1, 0); 360 mask = GENMASK(count - 1, 0);
361 conn_configured = 0; 361 conn_configured = 0;
362retry: 362retry:
363 conn_seq = conn_configured;
363 for (i = 0; i < count; i++) { 364 for (i = 0; i < count; i++) {
364 struct drm_fb_helper_connector *fb_conn; 365 struct drm_fb_helper_connector *fb_conn;
365 struct drm_connector *connector; 366 struct drm_connector *connector;
@@ -372,8 +373,7 @@ retry:
372 if (conn_configured & BIT(i)) 373 if (conn_configured & BIT(i))
373 continue; 374 continue;
374 375
375 /* First pass, only consider tiled connectors */ 376 if (conn_seq == 0 && !connector->has_tile)
376 if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile)
377 continue; 377 continue;
378 378
379 if (connector->status == connector_status_connected) 379 if (connector->status == connector_status_connected)
@@ -477,10 +477,8 @@ retry:
477 conn_configured |= BIT(i); 477 conn_configured |= BIT(i);
478 } 478 }
479 479
480 if (conn_configured != conn_seq) { /* repeat until no more are found */ 480 if ((conn_configured & mask) != mask && conn_configured != conn_seq)
481 conn_seq = conn_configured;
482 goto retry; 481 goto retry;
483 }
484 482
485 /* 483 /*
486 * If the BIOS didn't enable everything it could, fall back to have the 484 * If the BIOS didn't enable everything it could, fall back to have the