linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Baolin Wang <baolin.wang@linaro.org>,
	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
Date: Wed, 04 Sep 2019 16:18:59 +0300	[thread overview]
Message-ID: <878sr442t8.fsf@intel.com> (raw)
In-Reply-To: <5723d9006de706582fb46f9e1e3eb8ce168c2126.1567492316.git.baolin.wang@linaro.org>

On Tue, 03 Sep 2019, Baolin Wang <baolin.wang@linaro.org> wrote:
> From: Chris Wilson <chris@chris-wilson.co.uk>
>
> 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 <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Link: https://patchwork.freedesktop.org/patch/msgid/20190215123019.32283-1-chris@chris-wilson.co.uk
> Cc: <stable@vger.kernel.org> # v3.19+
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

Please look into the scripts to avoid picking up stuff that has
subsequently been reverted:

commit 9fa246256e09dc30820524401cdbeeaadee94025
Author: Dave Airlie <airlied@redhat.com>
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 <airlied@redhat.com>
    Cc: <stable@vger.kernel.org> # 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

  reply	other threads:[~2019-09-04 13:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  6:53 [BACKPORT 4.14.y 0/8] Candidates from Spreadtrum 4.14 product kernel Baolin Wang
2019-09-03  6:55 ` [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays Baolin Wang
2019-09-04 13:18   ` Jani Nikula [this message]
2019-09-05  1:44     ` Baolin Wang
2019-09-04 17:25   ` Greg KH
2019-09-05  1:47     ` Baolin Wang
2019-09-03  6:56 ` [BACKPORT 4.14.y 2/8] ip6: fix skb leak in ip6frag_expire_frag_queue() Baolin Wang
2019-09-03  6:57 ` [BACKPORT 4.14.y 3/8] locking/lockdep: Add debug_locks check in __lock_downgrade() Baolin Wang
2019-09-03  6:58 ` [BACKPORT 4.14.y 4/8] net: sctp: fix warning "NULL check before some freeing functions is not needed" Baolin Wang
2019-09-03 14:52   ` Marcelo Ricardo Leitner
2019-09-03 18:33     ` Greg KH
2019-09-04  2:38       ` Baolin Wang
2019-09-03  6:59 ` [BACKPORT 4.14.y 5/8] pinctrl: sprd: Use define directive for sprd_pinconf_params values Baolin Wang
2019-09-03  6:59 ` [BACKPORT 4.14.y 6/8] power: supply: sysfs: ratelimit property read error message Baolin Wang
2019-09-03  7:00 ` [BACKPORT 4.14.y 7/8] ppp: mppe: Revert "ppp: mppe: Add softdep to arc4" Baolin Wang
2019-09-03  7:01 ` [BACKPORT 4.14.y 8/8] serial: sprd: Modify the baud rate calculation formula Baolin Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sr442t8.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).