Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp687282ybe; Wed, 4 Sep 2019 06:20:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXWKwf/uwzdKOo12v3DUNmihw5JH55KWIjJdVCH85RrVvpTGztk0nPhNjMOM71hAdVyMEE X-Received: by 2002:a17:90a:fa3:: with SMTP id 32mr5001046pjz.35.1567603227390; Wed, 04 Sep 2019 06:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567603227; cv=none; d=google.com; s=arc-20160816; b=isAZzyZE21fp/6Z4Iu5z3AyNBIRT/hZOYeTpreyDLZ80mfkihvmBg14Fy32DlENLuF tIELVDwCEsfDmgDpSrb0z9yuTC448Bv9JvCucl+Nsv7dn/Q80ANqZbQNJs58FiG5YVJY 1/al0IibYa0Ny3nUDhWomem9YIkxpr6TPq7iTDBGgz4VwZX+hnb8QZIcZvpy5zbmteei NMJ5XoqH1/fR8iz40a3mK7RAvzA9nxS3JXCQ6lfzBrPmfJdWB3HgcxdoPBruhlVFTM18 N3Z1QpJ9LpHsHNG3MNQDRuEiPlC9T4E5KikfnDZXybtZjh1CPTyIZ+Y+risxNOhFlqV+ /WKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=A+lFXmBJ5n51FhagUsiGfXGzFBM+tpNDFPVgQcgR8Xs=; b=RXoim39lOJX49D7eoRnzVSB6t/z16XIjhqZ29+FnW/z1fBmdKaiJB/g+8hL/hfFSph g3ZZTALRD5gAOPmJOsEEa6oeJvLL5ZGkllHmSHNcaD+tUFvbHSaUW0VRYMiUH1hogaB1 yNhIBj1Fjo/4j8ehfXPTT5eCEpaC/62alhcwC7h3QmdRbXWrVNnHDzqnHfA2yF5JkSue VA7lrkVmouRK3J2A9RdXQviS5RGl7wkmapVbFL/kYdtFx/e33w9hd2qHeqpgnfsTMKiE opQKENyhxqXq4JNc4jO2BqR+yGYsIWcqbwNaHzI/HO0leZdnpD6ep3cGEyebLwOgcJin rv3g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si11002809plz.115.2019.09.04.06.20.10; Wed, 04 Sep 2019 06:20:27 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730462AbfIDNTH (ORCPT + 99 others); Wed, 4 Sep 2019 09:19:07 -0400 Received: from mga05.intel.com ([192.55.52.43]:29334 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727900AbfIDNTH (ORCPT ); Wed, 4 Sep 2019 09:19:07 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2019 06:19:06 -0700 X-IronPort-AV: E=Sophos;i="5.64,467,1559545200"; d="scan'208";a="176940991" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2019 06:19:02 -0700 From: Jani Nikula To: Baolin Wang , stable@vger.kernel.org, chris@chris-wilson.co.uk, airlied@linux.ie Cc: vincent.guittot@linaro.org, arnd@arndb.de, baolin.wang@linaro.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, orsonzhai@gmail.com Subject: Re: [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays In-Reply-To: <5723d9006de706582fb46f9e1e3eb8ce168c2126.1567492316.git.baolin.wang@linaro.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <5723d9006de706582fb46f9e1e3eb8ce168c2126.1567492316.git.baolin.wang@linaro.org> Date: Wed, 04 Sep 2019 16:18:59 +0300 Message-ID: <878sr442t8.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 03 Sep 2019, Baolin Wang wrote: > From: Chris Wilson > > 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: 754a76591b12 ("drm/i915/fbdev: Stop repeating tile configuration on stagnation") > Reported-by: Maarten Lankhorst > Signed-off-by: Chris Wilson > Cc: Maarten Lankhorst > Reviewed-by: Maarten Lankhorst > Link: https://patchwork.freedesktop.org/patch/msgid/20190215123019.32283-1-chris@chris-wilson.co.uk > Cc: # v3.19+ > Signed-off-by: Baolin Wang Please look into the scripts to avoid picking up stuff that has subsequently been reverted: commit 9fa246256e09dc30820524401cdbeeaadee94025 Author: Dave Airlie Date: Wed Apr 24 10:47:56 2019 +1000 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 Cc: # v3.19+ BR, Jani. > --- > drivers/gpu/drm/i915/intel_fbdev.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c > index da2d309..14eb8a0 100644 > --- a/drivers/gpu/drm/i915/intel_fbdev.c > +++ b/drivers/gpu/drm/i915/intel_fbdev.c > @@ -326,8 +326,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; > @@ -345,10 +345,9 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, > drm_modeset_backoff(&ctx); > > memcpy(save_enabled, enabled, count); > - mask = GENMASK(count - 1, 0); > + conn_seq = 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; > @@ -361,7 +360,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, > if (conn_configured & BIT(i)) > continue; > > - if (conn_seq == 0 && !connector->has_tile) > + /* First pass, only consider tiled connectors */ > + if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile) > continue; > > if (connector->status == connector_status_connected) > @@ -465,8 +465,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 -- Jani Nikula, Intel Open Source Graphics Center