diff mbox series

[Disco] Revert "drm/i915/fbdev: Actually configure untiled displays"

Message ID 20190404061724.12824-1-tjaalton@ubuntu.com
State New
Headers show
Series [Disco] Revert "drm/i915/fbdev: Actually configure untiled displays" | expand

Commit Message

Timo Aaltonen April 4, 2019, 6:17 a.m. UTC
From: Timo Aaltonen <timo.aaltonen@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1821820

This reverts commit d179b88deb3bf6fed4991a31fd6f0f2cad21fab5.

This commit breaks X in certain cases. Let's follow other distros and
revert it until X is fixed.

Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
---
 drivers/gpu/drm/i915/intel_fbdev.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comments

Seth Forshee April 4, 2019, 1:26 p.m. UTC | #1
On Thu, Apr 04, 2019 at 09:17:24AM +0300, Timo Aaltonen wrote:
> From: Timo Aaltonen <timo.aaltonen@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1821820
> 
> This reverts commit d179b88deb3bf6fed4991a31fd6f0f2cad21fab5.
> 
> This commit breaks X in certain cases. Let's follow other distros and
> revert it until X is fixed.
> 
> Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>

Applied to disco/master-next, thanks!
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 4ee16b264dbe..7f365ac0b549 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -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,9 +355,10 @@  static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
 		drm_modeset_backoff(&ctx);
 
 	memcpy(save_enabled, enabled, count);
-	conn_seq = GENMASK(count - 1, 0);
+	mask = GENMASK(count - 1, 0);
 	conn_configured = 0;
 retry:
+	conn_seq = conn_configured;
 	for (i = 0; i < count; i++) {
 		struct drm_fb_helper_connector *fb_conn;
 		struct drm_connector *connector;
@@ -370,8 +371,7 @@  static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
 		if (conn_configured & BIT(i))
 			continue;
 
-		/* First pass, only consider tiled connectors */
-		if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile)
+		if (conn_seq == 0 && !connector->has_tile)
 			continue;
 
 		if (connector->status == connector_status_connected)
@@ -475,10 +475,8 @@  static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
 		conn_configured |= BIT(i);
 	}
 
-	if (conn_configured != conn_seq) { /* repeat until no more are found */
-		conn_seq = conn_configured;
+	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