[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMz4kuJVTaDnDEKD77G_X=iVZf98e3isgSt0w7Yvb+_KnSfc9Q@mail.gmail.com>
Date: Thu, 5 Sep 2019 09:44:48 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: Jani Nikula <jani.nikula@...ux.intel.com>
Cc: "# 3.4.x" <stable@...r.kernel.org>, chris@...is-wilson.co.uk,
airlied@...ux.ie, Vincent Guittot <vincent.guittot@...aro.org>,
Arnd Bergmann <arnd@...db.de>, intel-gfx@...ts.freedesktop.org,
LKML <linux-kernel@...r.kernel.org>,
dri-devel@...ts.freedesktop.org, Orson Zhai <orsonzhai@...il.com>
Subject: Re: [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays
On Wed, 4 Sep 2019 at 21:19, Jani Nikula <jani.nikula@...ux.intel.com> wrote:
>
> On Tue, 03 Sep 2019, Baolin Wang <baolin.wang@...aro.org> wrote:
> > From: Chris Wilson <chris@...is-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@...ux.intel.com>
> > Signed-off-by: Chris Wilson <chris@...is-wilson.co.uk>
> > Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> > Link: https://patchwork.freedesktop.org/patch/msgid/20190215123019.32283-1-chris@chris-wilson.co.uk
> > Cc: <stable@...r.kernel.org> # v3.19+
> > Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
>
> Please look into the scripts to avoid picking up stuff that has
> subsequently been reverted:
I am very sorry, I missed this patch had been reverted, I will check
why this revert patch was not in our product kernel. Thanks for your
comments.
>
> commit 9fa246256e09dc30820524401cdbeeaadee94025
> Author: Dave Airlie <airlied@...hat.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@...hat.com>
> Cc: <stable@...r.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
--
Baolin Wang
Best Regards
Powered by blists - more mailing lists