Commit 754a7659 authored by Chris Wilson's avatar Chris Wilson

drm/i915/fbdev: Stop repeating tile configuration on stagnation

If we cease making progress in finding matching outputs for a tiled
configuration, stop looping over the remaining unconfigured outputs.

v2: Use conn_seq (instead of pass) to only apply tile configuration on
first pass.

Fixes: b0ee9e7f ("drm/fb: add support for tiled monitor configurations. (v2)")
Signed-off-by: default avatarChris Wilson <[email protected]>
Cc: Tomasz Lis <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: <[email protected]> # v3.19+
Reviewed-by: default avatarTomasz Lis <[email protected]>
Link:[email protected]
parent 8d0e9bcb
......@@ -350,14 +350,13 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
bool *enabled, int width, int height)
struct drm_i915_private *dev_priv = to_i915(fb_helper->dev);
unsigned long conn_configured, mask;
unsigned long conn_configured, conn_seq, mask;
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
int i, j;
bool *save_enabled;
bool fallback = true;
int num_connectors_enabled = 0;
int num_connectors_detected = 0;
int pass = 0;
save_enabled = kcalloc(count, sizeof(bool), GFP_KERNEL);
if (!save_enabled)
......@@ -367,6 +366,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
mask = GENMASK(count - 1, 0);
conn_configured = 0;
conn_seq = conn_configured;
for (i = 0; i < count; i++) {
struct drm_fb_helper_connector *fb_conn;
struct drm_connector *connector;
......@@ -380,7 +380,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
if (conn_configured & BIT(i))
if (pass == 0 && !connector->has_tile)
if (conn_seq == 0 && !connector->has_tile)
if (connector->status == connector_status_connected)
......@@ -491,10 +491,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
conn_configured |= BIT(i);
if ((conn_configured & mask) != mask) {
if ((conn_configured & mask) != mask && conn_configured != conn_seq)
goto retry;
* If the BIOS didn't enable everything it could, fall back to have the
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment