intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [BACKPORT 4.14.y 0/8] Candidates from Spreadtrum 4.14 product kernel
@ 2019-09-03  6:53 Baolin Wang
  2019-09-03  6:55 ` [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays Baolin Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Baolin Wang @ 2019-09-03  6:53 UTC (permalink / raw)
  To: stable, chris, airlied, davem, kuznet, yoshfuji, edumazet, peterz,
	mingo, vyasevich, nhorman, linus.walleij, natechancellor, sre,
	paulus, gregkh
  Cc: intel-gfx, dri-devel, netdev, longman, hariprasad.kelam,
	linux-sctp, linux-gpio, david, linux-pm, ebiggers, linux-ppp,
	lanqing.liu, linux-serial, arnd, baolin.wang, orsonzhai,
	vincent.guittot, linux-kernel

With Arnd's script [1] help, I found some bugfixes in Spreadtrum 4.14 product
kernel, but missing in v4.14.141:

86fda90ab588 net: sctp: fix warning "NULL check before some freeing functions is not needed"
25a09ce79639 ppp: mppe: Revert "ppp: mppe: Add softdep to arc4"
d9b308b1f8a1 drm/i915/fbdev: Actually configure untiled displays
47d3d7fdb10a ip6: fix skb leak in ip6frag_expire_frag_queue()
5b9cea15a3de serial: sprd: Modify the baud rate calculation formula
513e1073d52e locking/lockdep: Add debug_locks check in __lock_downgrade()
957063c92473 pinctrl: sprd: Use define directive for sprd_pinconf_params values
87a2b65fc855 power: supply: sysfs: ratelimit property read error message

[1] https://lore.kernel.org/lkml/20190322154425.3852517-19-arnd@arndb.de/T/

Chris Wilson (1):
  drm/i915/fbdev: Actually configure untiled displays

David Lechner (1):
  power: supply: sysfs: ratelimit property read error message

Eric Biggers (1):
  ppp: mppe: Revert "ppp: mppe: Add softdep to arc4"

Eric Dumazet (1):
  ip6: fix skb leak in ip6frag_expire_frag_queue()

Hariprasad Kelam (1):
  net: sctp: fix warning "NULL check before some freeing functions is
    not needed"

Lanqing Liu (1):
  serial: sprd: Modify the baud rate calculation formula

Nathan Chancellor (1):
  pinctrl: sprd: Use define directive for sprd_pinconf_params values

Waiman Long (1):
  locking/lockdep: Add debug_locks check in __lock_downgrade()

 drivers/gpu/drm/i915/intel_fbdev.c        |   12 +++++++-----
 drivers/net/ppp/ppp_mppe.c                |    1 -
 drivers/pinctrl/sprd/pinctrl-sprd.c       |    6 ++----
 drivers/power/supply/power_supply_sysfs.c |    3 ++-
 drivers/tty/serial/sprd_serial.c          |    2 +-
 include/net/ipv6_frag.h                   |    1 -
 kernel/locking/lockdep.c                  |    3 +++
 net/sctp/sm_make_chunk.c                  |   12 ++++--------
 8 files changed, 19 insertions(+), 21 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays
  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 ` Baolin Wang
  2019-09-04 13:18   ` Jani Nikula
  2019-09-04 17:25   ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Baolin Wang @ 2019-09-03  6:55 UTC (permalink / raw)
  To: stable, chris, airlied
  Cc: intel-gfx, dri-devel, arnd, baolin.wang, orsonzhai,
	vincent.guittot, linux-kernel

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>
---
 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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays
  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
  2019-09-05  1:44     ` Baolin Wang
  2019-09-04 17:25   ` Greg KH
  1 sibling, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2019-09-04 13:18 UTC (permalink / raw)
  To: stable, chris, airlied
  Cc: vincent.guittot, arnd, baolin.wang, intel-gfx, linux-kernel,
	dri-devel, orsonzhai

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays
  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
@ 2019-09-04 17:25   ` Greg KH
  2019-09-05  1:47     ` Baolin Wang
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2019-09-04 17:25 UTC (permalink / raw)
  To: Baolin Wang
  Cc: stable, chris, airlied, intel-gfx, dri-devel, arnd, orsonzhai,
	vincent.guittot, linux-kernel

On Tue, Sep 03, 2019 at 02:55:26PM +0800, Baolin Wang 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>
> ---
>  drivers/gpu/drm/i915/intel_fbdev.c |   12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

What is the git commit id of this patch in Linus's tree?

Can you please add that as the first line of the changelog like is done
with all other stable patches?  That way I can verify that what you
posted here is the correct one.

Please fix the up for all of these and resend.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays
  2019-09-04 13:18   ` Jani Nikula
@ 2019-09-05  1:44     ` Baolin Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Baolin Wang @ 2019-09-05  1:44 UTC (permalink / raw)
  To: Jani Nikula
  Cc: # 3.4.x, chris, airlied, Vincent Guittot, Arnd Bergmann,
	intel-gfx, LKML, dri-devel, Orson Zhai

On Wed, 4 Sep 2019 at 21:19, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>
> 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:

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@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



-- 
Baolin Wang
Best Regards

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BACKPORT 4.14.y 1/8] drm/i915/fbdev: Actually configure untiled displays
  2019-09-04 17:25   ` Greg KH
@ 2019-09-05  1:47     ` Baolin Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Baolin Wang @ 2019-09-05  1:47 UTC (permalink / raw)
  To: Greg KH
  Cc: # 3.4.x, chris, airlied, intel-gfx, dri-devel, Arnd Bergmann,
	Orson Zhai, Vincent Guittot, LKML

On Thu, 5 Sep 2019 at 01:25, Greg KH <greg@kroah.com> wrote:
>
> On Tue, Sep 03, 2019 at 02:55:26PM +0800, Baolin Wang 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>
> > ---
> >  drivers/gpu/drm/i915/intel_fbdev.c |   12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
>
> What is the git commit id of this patch in Linus's tree?

The commit id is: d9b308b1f8a1acc0c3279f443d4fe0f9f663252e

>
> Can you please add that as the first line of the changelog like is done
> with all other stable patches?  That way I can verify that what you
> posted here is the correct one.
>
> Please fix the up for all of these and resend.

Sure. Thanks.

-- 
Baolin Wang
Best Regards

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-05  1:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-09-05  1:44     ` Baolin Wang
2019-09-04 17:25   ` Greg KH
2019-09-05  1:47     ` Baolin Wang

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).