aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-04-23 20:47:56 -0400
committerDave Airlie <airlied@redhat.com>2019-04-23 20:47:56 -0400
commit9fa246256e09dc30820524401cdbeeaadee94025 (patch)
tree2d640c68e947b448d00f2318d999d0902ed65584
parent085b7755808aa11f78ab9377257e1dad2e6fa4bb (diff)
Revert "drm/i915/fbdev: Actually configure untiled displays"
This reverts commit d179b88deb3bf6fed4991a31fd6f0f2cad21fab5. This commit is documented to break userspace X.org modesetting driver in certain configurations. The X.org modesetting userspace driver is broken. No fixes are available yet. In order for this patch to be applied it either needs a config option or a workaround developed. This has been reported a few times, saying it's a userspace problem is clearly against the regression rules. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109806 Signed-off-by: Dave Airlie <airlied@redhat.com> Cc: <stable@vger.kernel.org> # v3.19+
-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