]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 14:11:23 +0000 (15:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 14:11:23 +0000 (15:11 +0100)
added patches:
media-rc-compile-rc-cec.c-into-rc-core.patch
media-rkisp1-params-fix-wrong-bits-settings.patch
media-usbtv-fix-deadlock-on-suspend.patch
media-v4l-vsp1-fix-bru-null-pointer-access.patch
media-v4l-vsp1-fix-uif-null-pointer-access.patch
sh_eth-fix-trscer-mask-for-r7s9210.patch

queue-5.11/media-rc-compile-rc-cec.c-into-rc-core.patch [new file with mode: 0644]
queue-5.11/media-rkisp1-params-fix-wrong-bits-settings.patch [new file with mode: 0644]
queue-5.11/media-usbtv-fix-deadlock-on-suspend.patch [new file with mode: 0644]
queue-5.11/media-v4l-vsp1-fix-bru-null-pointer-access.patch [new file with mode: 0644]
queue-5.11/media-v4l-vsp1-fix-uif-null-pointer-access.patch [new file with mode: 0644]
queue-5.11/series
queue-5.11/sh_eth-fix-trscer-mask-for-r7s9210.patch [new file with mode: 0644]

diff --git a/queue-5.11/media-rc-compile-rc-cec.c-into-rc-core.patch b/queue-5.11/media-rc-compile-rc-cec.c-into-rc-core.patch
new file mode 100644 (file)
index 0000000..e6e1e02
--- /dev/null
@@ -0,0 +1,140 @@
+From f09f9f93afad770a04b35235a0aa465fcc8d6e3d Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hverkuil@xs4all.nl>
+Date: Fri, 26 Feb 2021 11:37:47 +0100
+Subject: media: rc: compile rc-cec.c into rc-core
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+
+commit f09f9f93afad770a04b35235a0aa465fcc8d6e3d upstream.
+
+The rc-cec keymap is unusual in that it can't be built as a module,
+instead it is registered directly in rc-main.c if CONFIG_MEDIA_CEC_RC
+is set. This is because it can be called from drm_dp_cec_set_edid() via
+cec_register_adapter() in an asynchronous context, and it is not
+allowed to use request_module() to load rc-cec.ko in that case. Trying to
+do so results in a 'WARN_ON_ONCE(wait && current_is_async())'.
+
+Since this keymap is only used if CONFIG_MEDIA_CEC_RC is set, we
+just compile this keymap into the rc-core module and never as a
+separate module.
+
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Fixes: 2c6d1fffa1d9 (drm: add support for DisplayPort CEC-Tunneling-over-AUX)
+Reported-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sean Young <sean@mess.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/rc/Makefile         |    1 +
+ drivers/media/rc/keymaps/Makefile |    1 -
+ drivers/media/rc/keymaps/rc-cec.c |   28 +++++++++++-----------------
+ drivers/media/rc/rc-main.c        |    6 ++++++
+ include/media/rc-map.h            |    7 +++++++
+ 5 files changed, 25 insertions(+), 18 deletions(-)
+
+--- a/drivers/media/rc/Makefile
++++ b/drivers/media/rc/Makefile
+@@ -5,6 +5,7 @@ obj-y += keymaps/
+ obj-$(CONFIG_RC_CORE) += rc-core.o
+ rc-core-y := rc-main.o rc-ir-raw.o
+ rc-core-$(CONFIG_LIRC) += lirc_dev.o
++rc-core-$(CONFIG_MEDIA_CEC_RC) += keymaps/rc-cec.o
+ rc-core-$(CONFIG_BPF_LIRC_MODE2) += bpf-lirc.o
+ obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
+ obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
+--- a/drivers/media/rc/keymaps/Makefile
++++ b/drivers/media/rc/keymaps/Makefile
+@@ -21,7 +21,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t
+                       rc-behold.o \
+                       rc-behold-columbus.o \
+                       rc-budget-ci-old.o \
+-                      rc-cec.o \
+                       rc-cinergy-1400.o \
+                       rc-cinergy.o \
+                       rc-d680-dmb.o \
+--- a/drivers/media/rc/keymaps/rc-cec.c
++++ b/drivers/media/rc/keymaps/rc-cec.c
+@@ -1,6 +1,16 @@
+ // SPDX-License-Identifier: GPL-2.0-or-later
+ /* Keytable for the CEC remote control
+  *
++ * This keymap is unusual in that it can't be built as a module,
++ * instead it is registered directly in rc-main.c if CONFIG_MEDIA_CEC_RC
++ * is set. This is because it can be called from drm_dp_cec_set_edid() via
++ * cec_register_adapter() in an asynchronous context, and it is not
++ * allowed to use request_module() to load rc-cec.ko in that case.
++ *
++ * Since this keymap is only used if CONFIG_MEDIA_CEC_RC is set, we
++ * just compile this keymap into the rc-core module and never as a
++ * separate module.
++ *
+  * Copyright (c) 2015 by Kamil Debski
+  */
+@@ -152,7 +162,7 @@ static struct rc_map_table cec[] = {
+       /* 0x77-0xff: Reserved */
+ };
+-static struct rc_map_list cec_map = {
++struct rc_map_list cec_map = {
+       .map = {
+               .scan           = cec,
+               .size           = ARRAY_SIZE(cec),
+@@ -160,19 +170,3 @@ static struct rc_map_list cec_map = {
+               .name           = RC_MAP_CEC,
+       }
+ };
+-
+-static int __init init_rc_map_cec(void)
+-{
+-      return rc_map_register(&cec_map);
+-}
+-
+-static void __exit exit_rc_map_cec(void)
+-{
+-      rc_map_unregister(&cec_map);
+-}
+-
+-module_init(init_rc_map_cec);
+-module_exit(exit_rc_map_cec);
+-
+-MODULE_LICENSE("GPL");
+-MODULE_AUTHOR("Kamil Debski");
+--- a/drivers/media/rc/rc-main.c
++++ b/drivers/media/rc/rc-main.c
+@@ -2069,6 +2069,9 @@ static int __init rc_core_init(void)
+       led_trigger_register_simple("rc-feedback", &led_feedback);
+       rc_map_register(&empty_map);
++#ifdef CONFIG_MEDIA_CEC_RC
++      rc_map_register(&cec_map);
++#endif
+       return 0;
+ }
+@@ -2078,6 +2081,9 @@ static void __exit rc_core_exit(void)
+       lirc_dev_exit();
+       class_unregister(&rc_class);
+       led_trigger_unregister_simple(led_feedback);
++#ifdef CONFIG_MEDIA_CEC_RC
++      rc_map_unregister(&cec_map);
++#endif
+       rc_map_unregister(&empty_map);
+ }
+--- a/include/media/rc-map.h
++++ b/include/media/rc-map.h
+@@ -175,6 +175,13 @@ struct rc_map_list {
+       struct rc_map map;
+ };
++#ifdef CONFIG_MEDIA_CEC_RC
++/*
++ * rc_map_list from rc-cec.c
++ */
++extern struct rc_map_list cec_map;
++#endif
++
+ /* Routines from rc-map.c */
+ /**
diff --git a/queue-5.11/media-rkisp1-params-fix-wrong-bits-settings.patch b/queue-5.11/media-rkisp1-params-fix-wrong-bits-settings.patch
new file mode 100644 (file)
index 0000000..519289f
--- /dev/null
@@ -0,0 +1,33 @@
+From 2025a48cfd92d541c5ee47deee97f8a46d00c4ac Mon Sep 17 00:00:00 2001
+From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
+Date: Mon, 1 Mar 2021 18:18:35 +0100
+Subject: media: rkisp1: params: fix wrong bits settings
+
+From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
+
+commit 2025a48cfd92d541c5ee47deee97f8a46d00c4ac upstream.
+
+The histogram mode is set using 'rkisp1_params_set_bits'.
+Only the bits of the mode should be the value argument for
+that function. Otherwise bits outside the mode mask are
+turned on which is not what was intended.
+
+Fixes: bae1155cf579 ("media: staging: rkisp1: add output device for parameters")
+Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/platform/rockchip/rkisp1/rkisp1-params.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
++++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
+@@ -1288,7 +1288,6 @@ static void rkisp1_params_config_paramet
+       memset(hst.hist_weight, 0x01, sizeof(hst.hist_weight));
+       rkisp1_hst_config(params, &hst);
+       rkisp1_param_set_bits(params, RKISP1_CIF_ISP_HIST_PROP,
+-                            ~RKISP1_CIF_ISP_HIST_PROP_MODE_MASK |
+                             rkisp1_hst_params_default_config.mode);
+       /* set the  range */
diff --git a/queue-5.11/media-usbtv-fix-deadlock-on-suspend.patch b/queue-5.11/media-usbtv-fix-deadlock-on-suspend.patch
new file mode 100644 (file)
index 0000000..5c720fc
--- /dev/null
@@ -0,0 +1,42 @@
+From 8a7e27fd5cd696ba564a3f62cedef7269cfd0723 Mon Sep 17 00:00:00 2001
+From: Maxim Mikityanskiy <maxtram95@gmail.com>
+Date: Fri, 5 Feb 2021 23:51:39 +0100
+Subject: media: usbtv: Fix deadlock on suspend
+
+From: Maxim Mikityanskiy <maxtram95@gmail.com>
+
+commit 8a7e27fd5cd696ba564a3f62cedef7269cfd0723 upstream.
+
+usbtv doesn't support power management, so on system suspend the
+.disconnect callback of the driver is called. The teardown sequence
+includes a call to snd_card_free. Its implementation waits until the
+refcount of the sound card device drops to zero, however, if its file is
+open, snd_card_file_add takes a reference, which can't be dropped during
+the suspend, because the userspace processes are already frozen at this
+point. snd_card_free waits for completion forever, leading to a hang on
+suspend.
+
+This commit fixes this deadlock condition by replacing snd_card_free
+with snd_card_free_when_closed, that doesn't wait until all references
+are released, allowing suspend to progress.
+
+Fixes: 63ddf68de52e ("[media] usbtv: add audio support")
+Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/usb/usbtv/usbtv-audio.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/usb/usbtv/usbtv-audio.c
++++ b/drivers/media/usb/usbtv/usbtv-audio.c
+@@ -371,7 +371,7 @@ void usbtv_audio_free(struct usbtv *usbt
+       cancel_work_sync(&usbtv->snd_trigger);
+       if (usbtv->snd && usbtv->udev) {
+-              snd_card_free(usbtv->snd);
++              snd_card_free_when_closed(usbtv->snd);
+               usbtv->snd = NULL;
+       }
+ }
diff --git a/queue-5.11/media-v4l-vsp1-fix-bru-null-pointer-access.patch b/queue-5.11/media-v4l-vsp1-fix-bru-null-pointer-access.patch
new file mode 100644 (file)
index 0000000..4d17f1e
--- /dev/null
@@ -0,0 +1,32 @@
+From ac8d82f586c8692b501cb974604a71ef0e22a04c Mon Sep 17 00:00:00 2001
+From: Biju Das <biju.das.jz@bp.renesas.com>
+Date: Mon, 1 Mar 2021 13:08:27 +0100
+Subject: media: v4l: vsp1: Fix bru null pointer access
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+commit ac8d82f586c8692b501cb974604a71ef0e22a04c upstream.
+
+RZ/G2L SoC has only BRS. This patch fixes null pointer access,when only
+BRS is enabled.
+
+Fixes: cbb7fa49c7466("media: v4l: vsp1: Rename BRU to BRx")
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/platform/vsp1/vsp1_drm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/platform/vsp1/vsp1_drm.c
++++ b/drivers/media/platform/vsp1/vsp1_drm.c
+@@ -245,7 +245,7 @@ static int vsp1_du_pipeline_setup_brx(st
+               brx = &vsp1->bru->entity;
+       else if (pipe->brx && !drm_pipe->force_brx_release)
+               brx = pipe->brx;
+-      else if (!vsp1->bru->entity.pipe)
++      else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe)
+               brx = &vsp1->bru->entity;
+       else
+               brx = &vsp1->brs->entity;
diff --git a/queue-5.11/media-v4l-vsp1-fix-uif-null-pointer-access.patch b/queue-5.11/media-v4l-vsp1-fix-uif-null-pointer-access.patch
new file mode 100644 (file)
index 0000000..fe9e66e
--- /dev/null
@@ -0,0 +1,35 @@
+From 6732f313938027a910e1f7351951ff52c0329e70 Mon Sep 17 00:00:00 2001
+From: Biju Das <biju.das.jz@bp.renesas.com>
+Date: Mon, 1 Mar 2021 13:08:28 +0100
+Subject: media: v4l: vsp1: Fix uif null pointer access
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+commit 6732f313938027a910e1f7351951ff52c0329e70 upstream.
+
+RZ/G2L SoC has no UIF. This patch fixes null pointer access, when UIF
+module is not used.
+
+Fixes: 5e824f989e6e8("media: v4l: vsp1: Integrate DISCOM in display pipeline")
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/platform/vsp1/vsp1_drm.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/platform/vsp1/vsp1_drm.c
++++ b/drivers/media/platform/vsp1/vsp1_drm.c
+@@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs
+        * make sure it is present in the pipeline's list of entities if it
+        * wasn't already.
+        */
+-      if (!use_uif) {
++      if (drm_pipe->uif && !use_uif) {
+               drm_pipe->uif->pipe = NULL;
+-      } else if (!drm_pipe->uif->pipe) {
++      } else if (drm_pipe->uif && !drm_pipe->uif->pipe) {
+               drm_pipe->uif->pipe = pipe;
+               list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
+       }
index b19ab8b187478271628b4e4b0eb84c8b59cc01ea..09fcb1523f450fd434fbcc7eedbc78df84eb7a6d 100644 (file)
@@ -113,3 +113,9 @@ drm-i915-wedge-the-gpu-if-command-parser-setup-fails.patch
 s390-cio-return-efault-if-copy_to_user-fails-take-2.patch
 s390-crypto-return-efault-if-copy_to_user-fails.patch
 qxl-fix-uninitialised-struct-field-head.surface_id.patch
+sh_eth-fix-trscer-mask-for-r7s9210.patch
+media-usbtv-fix-deadlock-on-suspend.patch
+media-rkisp1-params-fix-wrong-bits-settings.patch
+media-v4l-vsp1-fix-uif-null-pointer-access.patch
+media-v4l-vsp1-fix-bru-null-pointer-access.patch
+media-rc-compile-rc-cec.c-into-rc-core.patch
diff --git a/queue-5.11/sh_eth-fix-trscer-mask-for-r7s9210.patch b/queue-5.11/sh_eth-fix-trscer-mask-for-r7s9210.patch
new file mode 100644 (file)
index 0000000..4725c6a
--- /dev/null
@@ -0,0 +1,33 @@
+From 165bc5a4f30eee4735845aa7dbd6b738643f2603 Mon Sep 17 00:00:00 2001
+From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
+Date: Sun, 28 Feb 2021 23:27:32 +0300
+Subject: sh_eth: fix TRSCER mask for R7S9210
+
+From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
+
+commit 165bc5a4f30eee4735845aa7dbd6b738643f2603 upstream.
+
+According  to the RZ/A2M Group User's Manual: Hardware, Rev. 2.00,
+the TRSCER register has bit 9 reserved, hence we can't use the driver's
+default TRSCER mask.  Add the explicit initializer for sh_eth_cpu_data::
+trscer_err_mask for R7S9210.
+
+Fixes: 6e0bb04d0e4f ("sh_eth: Add R7S9210 support")
+Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/renesas/sh_eth.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/renesas/sh_eth.c
++++ b/drivers/net/ethernet/renesas/sh_eth.c
+@@ -780,6 +780,8 @@ static struct sh_eth_cpu_data r7s9210_da
+       .fdr_value      = 0x0000070f,
++      .trscer_err_mask = DESC_I_RINT8 | DESC_I_RINT5,
++
+       .apr            = 1,
+       .mpr            = 1,
+       .tpauser        = 1,