Commit 218b6d52 authored by Chris Wilson's avatar Chris Wilson Committed by Greg Kroah-Hartman

drm/i915/fbdev: Actually configure untiled displays

commit d179b88d upstream.

If we skipped all the connectors that were not part of a tile, we would
leave conn_seq=0 and conn_configured=0, convincing ourselves that we
had stagnated in our configuration attempts. Avoid this situation by
starting conn_seq=ALL_CONNECTORS, and repeating until we find no more
connectors to configure.

Fixes: 754a7659 ("drm/i915/fbdev: Stop repeating tile configuration on stagnation")
Reported-by: default avatarMaarten Lankhorst <[email protected]>
Signed-off-by: default avatarChris Wilson <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Reviewed-by: default avatarMaarten Lankhorst <[email protected]>
Link:[email protected]
Cc: <[email protected]> # v3.19+
(cherry picked from commit d9b308b1)
Signed-off-by: default avatarJani Nikula <[email protected]>
Signed-off-by: default avatarGreg Kroah-Hartman <[email protected]>
parent f7016c39
......@@ -336,8 +336,8 @@ 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, conn_seq, mask;
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
unsigned long conn_configured, conn_seq;
int i, j;
bool *save_enabled;
bool fallback = true, ret = true;
......@@ -355,10 +355,9 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
memcpy(save_enabled, enabled, count);
mask = GENMASK(count - 1, 0);
conn_seq = 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;
......@@ -371,7 +370,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
if (conn_configured & BIT(i))
if (conn_seq == 0 && !connector->has_tile)
/* First pass, only consider tiled connectors */
if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile)
if (connector->status == connector_status_connected)
......@@ -475,8 +475,10 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
conn_configured |= BIT(i);
if ((conn_configured & mask) != mask && conn_configured != conn_seq)
if (conn_configured != conn_seq) { /* repeat until no more are found */
conn_seq = conn_configured;
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