--- /dev/null
+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
+@@ -20,7 +20,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
+@@ -2033,6 +2033,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;
+ }
+@@ -2042,6 +2045,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
+@@ -126,6 +126,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 */
+
+ /**
--- /dev/null
+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
+@@ -399,7 +399,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;
+ }
+ }
--- /dev/null
+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;
--- /dev/null
+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);
+ }
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-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
--- /dev/null
+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
+@@ -828,6 +828,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,