Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4814192yba; Tue, 30 Apr 2019 04:58:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwVeVijyDauZsjtfVbjgcnicAc+jq8IviUoNyPoPS2BTkHaXM5ATq/6tRY94Auwsch0ZM3 X-Received: by 2002:a17:902:e485:: with SMTP id cj5mr43556888plb.280.1556625495368; Tue, 30 Apr 2019 04:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556625495; cv=none; d=google.com; s=arc-20160816; b=jRf3AfxreX3KPfPuWLZ/zaHyTBAduqR7gVYZbvCXznURE2Do+GdvxmkeLnHOn/4yoU A7Vlgf3/TMXy2DbUd5D9oUWd/4/5N/Cmnroo2yu681KrpKGSbGAEHa91736bbMYdmql6 TpqDTEFXcs0xg+KzkK9jSLf0T9m8paN1eOkeqwsaZFR3VoXKy5YTDJ+exLNy26PFYcZO jP5FiYDXHN73TxCQK9GnkynJsVXFiWcqfj4lf95sApOohHY98J0djQInZGER6Ey/2WIL q2YgrC9UezefkNE43KQOBPFbipVqSWA5wdAzm2bO1ohynp+5wsoyGioKLGlpDGWeGL8Q mxtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iD606QM3ceBfLHm7VblS2dT5SyH2O8Nsxa8czdAwvQk=; b=GwhUFX3djtYu+wajw/6UGUTQoC0vvxClJKnmtZXRJW+TDyvBoV/UneuUdmJisxQ1+7 VrnKeSUy9GGpugNf2G7Zo4UjCMb+nCc+zB6GRnUHAbhgW0A5BumtWc2zyX0XzmJEmP4L SLqAu294bB7SlvCZM27fZXrZQODTmLEISaWfHlrubl9pshVXvs8i7dIlaV8p/ZRjvjtV P7fVjEk4FWm6EynjS8b0PtCcEe0/aDc/SuC0FuyTmCLbYpGBMb2ovXjrGcTNGymR7YLE hJFKydAfu3Pj96DqPZSj9wn+NCE7v0GzouTFA5r1FyD0ZsuaX4yOg+68v9iQK+3BbM03 6rTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kC47u7pG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184si4140002pfy.111.2019.04.30.04.57.59; Tue, 30 Apr 2019 04:58:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kC47u7pG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730563AbfD3Ltp (ORCPT + 99 others); Tue, 30 Apr 2019 07:49:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:36310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731039AbfD3Ltm (ORCPT ); Tue, 30 Apr 2019 07:49:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D989C20449; Tue, 30 Apr 2019 11:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556624981; bh=7GntyMXcWt4UU0gvioaIi9lga+nZyYFukfanMAnLfzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kC47u7pG+/KX/WAdJv4eb7B1UnmWKBuY2lazb4AhCUrdBUGl/NDwAMZ/A134F1e7U CF6iax2fuGRdfPz2Rf+1XmMFa8EzfevPR2MvYHShufh7g/LaY3OJP1jncvN072f11u cKg+Sq79Gyrfy93wAJhV7yuPfZTNiqC3eB3deXFc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Airlie Subject: [PATCH 5.0 44/89] Revert "drm/i915/fbdev: Actually configure untiled displays" Date: Tue, 30 Apr 2019 13:38:35 +0200 Message-Id: <20190430113611.821040876@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190430113609.741196396@linuxfoundation.org> References: <20190430113609.741196396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Airlie commit 9fa246256e09dc30820524401cdbeeaadee94025 upstream. 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 Cc: # v3.19+ Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_fbdev.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) --- 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(stru 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(stru 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 @@ retry: 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 @@ retry: 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