aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fbdev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-04-24 00:08:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-24 00:08:52 -0400
commitba25b50d582ff6c6021eee80824134aeb9ab8785 (patch)
treed6002f77ac65c936b489f21409c9b162acfc3c28 /drivers/gpu/drm/i915/intel_fbdev.c
parent12a54b150fb5b6c2f3da932dc0e665355f8a5a48 (diff)
parenta0cecc23cfcbf2626497a8c8770856dd56b67917 (diff)
Merge tag 'drm-fixes-2019-04-24' of git://anongit.freedesktop.org/drm/drm
Pull drm regression fixes from Dave Airlie: "We interrupt your regularly scheduled drm fixes for a regression special. The first is for a fix in i915 that had unexpected side effects fallout in the userspace X.org modesetting driver where X would no longer start. I got tired of the nitpicking and issued a large hammer on it. The X.org driver is buggy, but blackscreen regressions are worse. The second was an oversight that myself and Gerd should have noticed better, Gerd is trying to fix this properly, but the regression is too large to leave, even if the original behaviour is bad in some cases, it's clearly bad to break a bunch of working use cases. I'll likely have a regular fixes pull later, but I really wanted to highlight these" * tag 'drm-fixes-2019-04-24' of git://anongit.freedesktop.org/drm/drm: Revert "drm/virtio: drop prime import/export callbacks" Revert "drm/i915/fbdev: Actually configure untiled displays"
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