]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Sep 2020 15:07:24 +0000 (17:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Sep 2020 15:07:24 +0000 (17:07 +0200)
added patches:
alsa-usb-audio-update-documentation-comment-for-ms2109-quirk.patch
dma-pool-fix-an-uninitialized-variable-bug-in-atomic_pool_expand.patch
drm-vmwgfx-ldu-use-drm_mode_config_reset.patch
drm-vmwgfx-sou-use-drm_mode_config_reset.patch
drm-vmwgfx-stdu-use-drm_mode_config_reset.patch
libbpf-fix-build-on-ppc64le-architecture.patch

queue-5.8/alsa-usb-audio-update-documentation-comment-for-ms2109-quirk.patch [new file with mode: 0644]
queue-5.8/dma-pool-fix-an-uninitialized-variable-bug-in-atomic_pool_expand.patch [new file with mode: 0644]
queue-5.8/drm-vmwgfx-ldu-use-drm_mode_config_reset.patch [new file with mode: 0644]
queue-5.8/drm-vmwgfx-sou-use-drm_mode_config_reset.patch [new file with mode: 0644]
queue-5.8/drm-vmwgfx-stdu-use-drm_mode_config_reset.patch [new file with mode: 0644]
queue-5.8/libbpf-fix-build-on-ppc64le-architecture.patch [new file with mode: 0644]
queue-5.8/series

diff --git a/queue-5.8/alsa-usb-audio-update-documentation-comment-for-ms2109-quirk.patch b/queue-5.8/alsa-usb-audio-update-documentation-comment-for-ms2109-quirk.patch
new file mode 100644 (file)
index 0000000..fcac6ac
--- /dev/null
@@ -0,0 +1,35 @@
+From 74a2a7de81a2ef20732ec02087314e92692a7a1b Mon Sep 17 00:00:00 2001
+From: Hector Martin <marcan@marcan.st>
+Date: Sun, 16 Aug 2020 17:44:31 +0900
+Subject: ALSA: usb-audio: Update documentation comment for MS2109 quirk
+
+From: Hector Martin <marcan@marcan.st>
+
+commit 74a2a7de81a2ef20732ec02087314e92692a7a1b upstream.
+
+As the recent fix addressed the channel swap problem more properly,
+update the comment as well.
+
+Fixes: 1b7ecc241a67 ("ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109")
+Signed-off-by: Hector Martin <marcan@marcan.st>
+Link: https://lore.kernel.org/r/20200816084431.102151-1-marcan@marcan.st
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/quirks-table.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -3727,8 +3727,8 @@ ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* A
+  * they pretend to be 96kHz mono as a workaround for stereo being broken
+  * by that...
+  *
+- * They also have swapped L-R channels, but that's for userspace to deal
+- * with.
++ * They also have an issue with initial stream alignment that causes the
++ * channels to be swapped and out of phase, which is dealt with in quirks.c.
+  */
+ {
+       .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
diff --git a/queue-5.8/dma-pool-fix-an-uninitialized-variable-bug-in-atomic_pool_expand.patch b/queue-5.8/dma-pool-fix-an-uninitialized-variable-bug-in-atomic_pool_expand.patch
new file mode 100644 (file)
index 0000000..2571e21
--- /dev/null
@@ -0,0 +1,31 @@
+From 892fc9f6835ecf075efac20789b012c5c9997fcc Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Wed, 26 Aug 2020 14:33:30 +0300
+Subject: dma-pool: Fix an uninitialized variable bug in atomic_pool_expand()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 892fc9f6835ecf075efac20789b012c5c9997fcc upstream.
+
+The "page" pointer can be used with out being initialized.
+
+Fixes: d7e673ec2c8e ("dma-pool: Only allocate from CMA when in same memory zone")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/dma/pool.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/dma/pool.c
++++ b/kernel/dma/pool.c
+@@ -84,7 +84,7 @@ static int atomic_pool_expand(struct gen
+                             gfp_t gfp)
+ {
+       unsigned int order;
+-      struct page *page;
++      struct page *page = NULL;
+       void *addr;
+       int ret = -ENOMEM;
diff --git a/queue-5.8/drm-vmwgfx-ldu-use-drm_mode_config_reset.patch b/queue-5.8/drm-vmwgfx-ldu-use-drm_mode_config_reset.patch
new file mode 100644 (file)
index 0000000..682c998
--- /dev/null
@@ -0,0 +1,66 @@
+From 981243371a5d832af5bc572071172e955d02fe88 Mon Sep 17 00:00:00 2001
+From: Roland Scheidegger <sroland@vmware.com>
+Date: Fri, 7 Aug 2020 22:04:33 +0200
+Subject: drm/vmwgfx/ldu: Use drm_mode_config_reset
+
+From: Roland Scheidegger <sroland@vmware.com>
+
+commit 981243371a5d832af5bc572071172e955d02fe88 upstream.
+
+Same problem as in stdu, same fix.
+
+Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset")
+Acked-by: Charmaine Lee <charmainel@vmware.com>
+Reviewed-by: Zack Rusin <zackr@vmware.com>
+Signed-off-by: Roland Scheidegger <sroland@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c |    8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+@@ -387,8 +387,6 @@ static int vmw_ldu_init(struct vmw_priva
+       ldu->base.is_implicit = true;
+       /* Initialize primary plane */
+-      vmw_du_plane_reset(primary);
+-
+       ret = drm_universal_plane_init(dev, &ldu->base.primary,
+                                      0, &vmw_ldu_plane_funcs,
+                                      vmw_primary_plane_formats,
+@@ -402,8 +400,6 @@ static int vmw_ldu_init(struct vmw_priva
+       drm_plane_helper_add(primary, &vmw_ldu_primary_plane_helper_funcs);
+       /* Initialize cursor plane */
+-      vmw_du_plane_reset(cursor);
+-
+       ret = drm_universal_plane_init(dev, &ldu->base.cursor,
+                       0, &vmw_ldu_cursor_funcs,
+                       vmw_cursor_plane_formats,
+@@ -417,7 +413,6 @@ static int vmw_ldu_init(struct vmw_priva
+       drm_plane_helper_add(cursor, &vmw_ldu_cursor_plane_helper_funcs);
+-      vmw_du_connector_reset(connector);
+       ret = drm_connector_init(dev, connector, &vmw_legacy_connector_funcs,
+                                DRM_MODE_CONNECTOR_VIRTUAL);
+       if (ret) {
+@@ -445,7 +440,6 @@ static int vmw_ldu_init(struct vmw_priva
+               goto err_free_encoder;
+       }
+-      vmw_du_crtc_reset(crtc);
+       ret = drm_crtc_init_with_planes(dev, crtc, &ldu->base.primary,
+                                       &ldu->base.cursor,
+                                       &vmw_legacy_crtc_funcs, NULL);
+@@ -520,6 +514,8 @@ int vmw_kms_ldu_init_display(struct vmw_
+       dev_priv->active_display_unit = vmw_du_legacy;
++      drm_mode_config_reset(dev);
++
+       DRM_INFO("Legacy Display Unit initialized\n");
+       return 0;
diff --git a/queue-5.8/drm-vmwgfx-sou-use-drm_mode_config_reset.patch b/queue-5.8/drm-vmwgfx-sou-use-drm_mode_config_reset.patch
new file mode 100644 (file)
index 0000000..7fb48a3
--- /dev/null
@@ -0,0 +1,67 @@
+From 1338441cf166e2ef789af5915b961d4e13a4ec31 Mon Sep 17 00:00:00 2001
+From: Roland Scheidegger <sroland@vmware.com>
+Date: Fri, 7 Aug 2020 22:03:42 +0200
+Subject: drm/vmwgfx/sou: Use drm_mode_config_reset
+
+From: Roland Scheidegger <sroland@vmware.com>
+
+commit 1338441cf166e2ef789af5915b961d4e13a4ec31 upstream.
+
+Same problem as in stdu, same fix.
+
+Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset")
+Acked-by: Charmaine Lee <charmainel@vmware.com>
+Reviewed-by: Zack Rusin <zackr@vmware.com>
+Signed-off-by: Roland Scheidegger <sroland@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |    9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+@@ -859,8 +859,6 @@ static int vmw_sou_init(struct vmw_priva
+       sou->base.is_implicit = false;
+       /* Initialize primary plane */
+-      vmw_du_plane_reset(primary);
+-
+       ret = drm_universal_plane_init(dev, &sou->base.primary,
+                                      0, &vmw_sou_plane_funcs,
+                                      vmw_primary_plane_formats,
+@@ -875,8 +873,6 @@ static int vmw_sou_init(struct vmw_priva
+       drm_plane_enable_fb_damage_clips(primary);
+       /* Initialize cursor plane */
+-      vmw_du_plane_reset(cursor);
+-
+       ret = drm_universal_plane_init(dev, &sou->base.cursor,
+                       0, &vmw_sou_cursor_funcs,
+                       vmw_cursor_plane_formats,
+@@ -890,7 +886,6 @@ static int vmw_sou_init(struct vmw_priva
+       drm_plane_helper_add(cursor, &vmw_sou_cursor_plane_helper_funcs);
+-      vmw_du_connector_reset(connector);
+       ret = drm_connector_init(dev, connector, &vmw_sou_connector_funcs,
+                                DRM_MODE_CONNECTOR_VIRTUAL);
+       if (ret) {
+@@ -918,8 +913,6 @@ static int vmw_sou_init(struct vmw_priva
+               goto err_free_encoder;
+       }
+-
+-      vmw_du_crtc_reset(crtc);
+       ret = drm_crtc_init_with_planes(dev, crtc, &sou->base.primary,
+                                       &sou->base.cursor,
+                                       &vmw_screen_object_crtc_funcs, NULL);
+@@ -973,6 +966,8 @@ int vmw_kms_sou_init_display(struct vmw_
+       dev_priv->active_display_unit = vmw_du_screen_object;
++      drm_mode_config_reset(dev);
++
+       DRM_INFO("Screen Objects Display Unit initialized\n");
+       return 0;
diff --git a/queue-5.8/drm-vmwgfx-stdu-use-drm_mode_config_reset.patch b/queue-5.8/drm-vmwgfx-stdu-use-drm_mode_config_reset.patch
new file mode 100644 (file)
index 0000000..711924f
--- /dev/null
@@ -0,0 +1,83 @@
+From 68745d1edf1700a668c15ecbed466d18f14c7e9b Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Thu, 6 Aug 2020 17:42:27 +0200
+Subject: drm/vmwgfx/stdu: Use drm_mode_config_reset
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit 68745d1edf1700a668c15ecbed466d18f14c7e9b upstream.
+
+When converting to atomic the state reset was done by directly calling
+the functions, and before the modeset object was fully initialized.
+This means the various ->dev pointers weren't set up.
+
+After
+
+commit 51f644b40b4b794b28b982fdd5d0dd8ee63f9272
+Author: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date:   Fri Jun 12 18:00:49 2020 +0200
+
+    drm/atomic-helper: reset vblank on crtc reset
+
+this started to oops because now we're trying to derefence
+drm_crtc->dev. Fix this up by entirely switching over to
+drm_mode_config_reset, called once everything is set up.
+
+Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset")
+Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
+Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
+Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
+Tested-by: Roland Scheidegger <sroland@vmware.com>
+Signed-off-by: Roland Scheidegger <sroland@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c |    9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+@@ -1738,8 +1738,6 @@ static int vmw_stdu_init(struct vmw_priv
+       stdu->base.is_implicit = false;
+       /* Initialize primary plane */
+-      vmw_du_plane_reset(primary);
+-
+       ret = drm_universal_plane_init(dev, primary,
+                                      0, &vmw_stdu_plane_funcs,
+                                      vmw_primary_plane_formats,
+@@ -1754,8 +1752,6 @@ static int vmw_stdu_init(struct vmw_priv
+       drm_plane_enable_fb_damage_clips(primary);
+       /* Initialize cursor plane */
+-      vmw_du_plane_reset(cursor);
+-
+       ret = drm_universal_plane_init(dev, cursor,
+                       0, &vmw_stdu_cursor_funcs,
+                       vmw_cursor_plane_formats,
+@@ -1769,8 +1765,6 @@ static int vmw_stdu_init(struct vmw_priv
+       drm_plane_helper_add(cursor, &vmw_stdu_cursor_plane_helper_funcs);
+-      vmw_du_connector_reset(connector);
+-
+       ret = drm_connector_init(dev, connector, &vmw_stdu_connector_funcs,
+                                DRM_MODE_CONNECTOR_VIRTUAL);
+       if (ret) {
+@@ -1798,7 +1792,6 @@ static int vmw_stdu_init(struct vmw_priv
+               goto err_free_encoder;
+       }
+-      vmw_du_crtc_reset(crtc);
+       ret = drm_crtc_init_with_planes(dev, crtc, &stdu->base.primary,
+                                       &stdu->base.cursor,
+                                       &vmw_stdu_crtc_funcs, NULL);
+@@ -1894,6 +1887,8 @@ int vmw_kms_stdu_init_display(struct vmw
+               }
+       }
++      drm_mode_config_reset(dev);
++
+       DRM_INFO("Screen Target Display device initialized\n");
+       return 0;
diff --git a/queue-5.8/libbpf-fix-build-on-ppc64le-architecture.patch b/queue-5.8/libbpf-fix-build-on-ppc64le-architecture.patch
new file mode 100644 (file)
index 0000000..011fe17
--- /dev/null
@@ -0,0 +1,47 @@
+From 3fb1a96a91120877488071a167d26d76be4be977 Mon Sep 17 00:00:00 2001
+From: Andrii Nakryiko <andriin@fb.com>
+Date: Tue, 18 Aug 2020 09:44:56 -0700
+Subject: libbpf: Fix build on ppc64le architecture
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Andrii Nakryiko <andriin@fb.com>
+
+commit 3fb1a96a91120877488071a167d26d76be4be977 upstream.
+
+On ppc64le we get the following warning:
+
+  In file included from btf_dump.c:16:0:
+  btf_dump.c: In function ‘btf_dump_emit_struct_def’:
+  ../include/linux/kernel.h:20:17: error: comparison of distinct pointer types lacks a cast [-Werror]
+    (void) (&_max1 == &_max2);  \
+                   ^
+  btf_dump.c:882:11: note: in expansion of macro ‘max’
+      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
+             ^~~
+
+Fix by explicitly casting to __s64, which is a return type from
+btf__resolve_size().
+
+Fixes: 702eddc77a90 ("libbpf: Handle GCC built-in types for Arm NEON")
+Signed-off-by: Andrii Nakryiko <andriin@fb.com>
+Signed-off-by: Alexei Starovoitov <ast@kernel.org>
+Link: https://lore.kernel.org/bpf/20200818164456.1181661-1-andriin@fb.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/lib/bpf/btf_dump.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/lib/bpf/btf_dump.c
++++ b/tools/lib/bpf/btf_dump.c
+@@ -876,7 +876,7 @@ static void btf_dump_emit_struct_def(str
+                       btf_dump_printf(d, ": %d", m_sz);
+                       off = m_off + m_sz;
+               } else {
+-                      m_sz = max(0LL, btf__resolve_size(d->btf, m->type));
++                      m_sz = max((__s64)0, btf__resolve_size(d->btf, m->type));
+                       off = m_off + m_sz * 8;
+               }
+               btf_dump_printf(d, ";");
index 6d286c904f7659c1c9c1fa35c109f70d71163bc1..88131a5c9dc7aff75b60b035514bdf82e32e43c5 100644 (file)
@@ -247,3 +247,9 @@ drm-atomic-helper-reset-vblank-on-crtc-reset.patch
 fbmem-pull-fbcon_update_vcs-out-of-fb_set_var.patch
 mm-page_counter-fix-various-data-races-at-memsw.patch
 hid-hiddev-fix-slab-out-of-bounds-write-in-hiddev_ioctl_usage.patch
+drm-vmwgfx-stdu-use-drm_mode_config_reset.patch
+drm-vmwgfx-sou-use-drm_mode_config_reset.patch
+drm-vmwgfx-ldu-use-drm_mode_config_reset.patch
+libbpf-fix-build-on-ppc64le-architecture.patch
+dma-pool-fix-an-uninitialized-variable-bug-in-atomic_pool_expand.patch
+alsa-usb-audio-update-documentation-comment-for-ms2109-quirk.patch