From beab8385506e86b0d49676745fb9a741debec871 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Fri, 21 Oct 2022 11:24:01 -0500 Subject: kernel-6.0.3-300 * Fri Oct 21 2022 Justin M. Forbes [6.0.3-0] - drm/vc4: hdmi: Fix HSM clock too low on Pi4 (maxime@cerno.tech) - Config updates for new options in 6.0.3 (Justin M. Forbes) - Revert "redhat: properly handle binary files in patches" (Justin M. Forbes) - Linux v6.0.3 Resolves: Signed-off-by: Justin M. Forbes --- patch-6.0-redhat.patch | 146 ++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 73 deletions(-) (limited to 'patch-6.0-redhat.patch') diff --git a/patch-6.0-redhat.patch b/patch-6.0-redhat.patch index f5f8dd853..5a29194bf 100644 --- a/patch-6.0-redhat.patch +++ b/patch-6.0-redhat.patch @@ -15,9 +15,9 @@ drivers/firmware/efi/efi.c | 124 +++++++++++++++------ drivers/firmware/efi/secureboot.c | 38 +++++++ drivers/firmware/sysfb.c | 18 ++- - drivers/gpu/drm/drm_ioctl.c | 8 +- drivers/gpu/drm/i915/display/intel_bios.c | 46 +++----- - drivers/gpu/drm/vc4/vc4_hdmi.c | 29 +++++ + drivers/gpu/drm/vc4/vc4_hdmi.c | 46 +++++++- + drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + drivers/hid/hid-rmi.c | 64 ----------- drivers/hwtracing/coresight/coresight-etm4x-core.c | 19 ++++ drivers/input/rmi4/rmi_driver.c | 124 ++++++++++++--------- @@ -26,7 +26,6 @@ drivers/nvme/host/multipath.c | 19 ++-- drivers/nvme/host/nvme.h | 4 + drivers/pci/quirks.c | 24 ++++ - drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 10 +- drivers/usb/core/hub.c | 7 ++ include/linux/efi.h | 22 ++-- include/linux/lsm_hook_defs.h | 2 + @@ -42,10 +41,10 @@ security/lockdown/lockdown.c | 1 + security/security.c | 6 + tools/testing/selftests/net/fib_nexthops.sh | 5 + - 44 files changed, 570 insertions(+), 223 deletions(-) + 43 files changed, 573 insertions(+), 220 deletions(-) diff --git a/Makefile b/Makefile -index aa449693ad09..9cf6cf0e5402 100644 +index d4297b3d0735..e7373ece0e0b 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,10 @@ $(if $(filter __%, $(MAKECMDGOALS)), \ @@ -60,7 +59,7 @@ index aa449693ad09..9cf6cf0e5402 100644 # to get the ordering right. # diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 87badeae3181..2ec7919034d8 100644 +index 11ecf09aadc8..5d91c8c3cd49 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1387,9 +1387,9 @@ config HIGHMEM @@ -76,10 +75,10 @@ index 87badeae3181..2ec7919034d8 100644 The VM uses one page of physical memory for each page table. For systems with a lot of processes, this can use a lot of diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 1ce7685ad5de..101f1d767658 100644 +index 3795eb5ba1cd..55d299a03150 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -1182,7 +1182,7 @@ endchoice +@@ -1199,7 +1199,7 @@ endchoice config ARM64_FORCE_52BIT bool "Force 52-bit virtual addresses for userspace" @@ -88,7 +87,7 @@ index 1ce7685ad5de..101f1d767658 100644 help For systems with 52-bit userspace VAs enabled, the kernel will attempt to maintain compatibility with older software by providing 48-bit VAs -@@ -1421,6 +1421,7 @@ config XEN +@@ -1438,6 +1438,7 @@ config XEN config FORCE_MAX_ZONEORDER int default "14" if ARM64_64K_PAGES @@ -599,25 +598,6 @@ index 1f276f108cc9..7039ad9bdf7f 100644 pd = sysfb_create_simplefb(si, &mode); if (!IS_ERR(pd)) goto unlock_mutex; -diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c -index 8faad23dc1d8..ca2a6e6101dc 100644 ---- a/drivers/gpu/drm/drm_ioctl.c -+++ b/drivers/gpu/drm/drm_ioctl.c -@@ -472,7 +472,13 @@ EXPORT_SYMBOL(drm_invalid_op); - */ - static int drm_copy_field(char __user *buf, size_t *buf_len, const char *value) - { -- int len; -+ size_t len; -+ -+ /* don't attempt to copy a NULL pointer */ -+ if (WARN_ONCE(!value, "BUG: the value to copy was not set!")) { -+ *buf_len = 0; -+ return 0; -+ } - - /* don't overflow userbuf */ - len = strlen(value); diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index 7d6eb9ad7a02..f801d923fdec 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c @@ -713,29 +693,69 @@ index 7d6eb9ad7a02..f801d923fdec 100644 if (16 * (size + table_size) <= block_size) { diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c -index 1e5f68704d7d..874c6bd787c5 100644 +index 1e5f68704d7d..4e5bba0822a5 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2869,12 +2869,37 @@ static int vc4_hdmi_runtime_resume(struct device *dev) +@@ -2712,9 +2712,16 @@ static int vc4_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi) + DRM_ERROR("Failed to get HDMI state machine clock\n"); + return PTR_ERR(vc4_hdmi->hsm_clock); + } ++ + vc4_hdmi->audio_clock = vc4_hdmi->hsm_clock; + vc4_hdmi->cec_clock = vc4_hdmi->hsm_clock; + ++ vc4_hdmi->hsm_rpm_clock = devm_clk_get(dev, "hdmi"); ++ if (IS_ERR(vc4_hdmi->hsm_rpm_clock)) { ++ DRM_ERROR("Failed to get HDMI state machine clock\n"); ++ return PTR_ERR(vc4_hdmi->hsm_rpm_clock); ++ } ++ + return 0; + } + +@@ -2796,6 +2803,12 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi) + return PTR_ERR(vc4_hdmi->hsm_clock); + } + ++ vc4_hdmi->hsm_rpm_clock = devm_clk_get(dev, "hdmi"); ++ if (IS_ERR(vc4_hdmi->hsm_rpm_clock)) { ++ DRM_ERROR("Failed to get HDMI state machine clock\n"); ++ return PTR_ERR(vc4_hdmi->hsm_rpm_clock); ++ } ++ + vc4_hdmi->pixel_bvb_clock = devm_clk_get(dev, "bvb"); + if (IS_ERR(vc4_hdmi->pixel_bvb_clock)) { + DRM_ERROR("Failed to get pixel bvb clock\n"); +@@ -2859,7 +2872,7 @@ static int vc4_hdmi_runtime_suspend(struct device *dev) + { + struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); + +- clk_disable_unprepare(vc4_hdmi->hsm_clock); ++ clk_disable_unprepare(vc4_hdmi->hsm_rpm_clock); + + return 0; + } +@@ -2869,12 +2882,37 @@ static int vc4_hdmi_runtime_resume(struct device *dev) struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); unsigned long __maybe_unused flags; u32 __maybe_unused value; + unsigned long rate; int ret; +- ret = clk_prepare_enable(vc4_hdmi->hsm_clock); + /* + * The HSM clock is in the HDMI power domain, so we need to set + * its frequency while the power domain is active so that it + * keeps its rate. + */ -+ ret = clk_set_min_rate(vc4_hdmi->hsm_clock, HSM_MIN_CLOCK_FREQ); -+ if (ret) -+ return ret; -+ - ret = clk_prepare_enable(vc4_hdmi->hsm_clock); ++ ret = clk_set_min_rate(vc4_hdmi->hsm_rpm_clock, HSM_MIN_CLOCK_FREQ); if (ret) return ret; ++ ret = clk_prepare_enable(vc4_hdmi->hsm_rpm_clock); ++ if (ret) ++ return ret; ++ + /* + * Whenever the RaspberryPi boots without an HDMI monitor + * plugged in, the firmware won't have initialized the HSM clock @@ -745,7 +765,7 @@ index 1e5f68704d7d..874c6bd787c5 100644 + * case, it will lead to a silent CPU stall. Let's make sure we + * prevent such a case. + */ -+ rate = clk_get_rate(vc4_hdmi->hsm_clock); ++ rate = clk_get_rate(vc4_hdmi->hsm_rpm_clock); + if (!rate) { + ret = -EINVAL; + goto err_disable_clk; @@ -754,7 +774,7 @@ index 1e5f68704d7d..874c6bd787c5 100644 if (vc4_hdmi->variant->reset) vc4_hdmi->variant->reset(vc4_hdmi); -@@ -2896,6 +2921,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev) +@@ -2896,6 +2934,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev) #endif return 0; @@ -765,6 +785,18 @@ index 1e5f68704d7d..874c6bd787c5 100644 } static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h +index c3ed2b07df23..47f141ec8c40 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.h ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.h +@@ -171,6 +171,7 @@ struct vc4_hdmi { + struct clk *cec_clock; + struct clk *pixel_clock; + struct clk *hsm_clock; ++ struct clk *hsm_rpm_clock; + struct clk *audio_clock; + struct clk *pixel_bvb_clock; + diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c index 311eee599ce9..2460c6bd46f8 100644 --- a/drivers/hid/hid-rmi.c @@ -1149,7 +1181,7 @@ index 3a808146b50f..c1a3f3057921 100644 * Changes the default domain of an iommu group that has *only* one device * diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c -index 8d5a7ae19844..f3939183c346 100644 +index 59e4b188fc71..9c6bfc02e6a1 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -250,6 +250,9 @@ static void nvme_delete_ctrl_sync(struct nvme_ctrl *ctrl) @@ -1216,7 +1248,7 @@ index 8d5a7ae19844..f3939183c346 100644 #ifdef CONFIG_NVME_AUTH queue_work(nvme_wq, &ctrl->dhchap_auth_work); diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c -index 6ef497c75a16..c019294e1058 100644 +index b9cf17cbbbd5..9aa33fc59f67 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -80,14 +80,10 @@ void nvme_mpath_start_freeze(struct nvme_subsystem *subsys) @@ -1252,7 +1284,7 @@ index 6ef497c75a16..c019294e1058 100644 spin_lock_irqsave(&ns->head->requeue_lock, flags); for (bio = req->bio; bio; bio = bio->bi_next) { -@@ -871,8 +877,7 @@ int nvme_mpath_init_identify(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) +@@ -872,8 +878,7 @@ int nvme_mpath_init_identify(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) int error = 0; /* check if multipath is enabled and we have the capability */ @@ -1263,7 +1295,7 @@ index 6ef497c75a16..c019294e1058 100644 if (!ctrl->max_namespaces || diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h -index 1bdf714dcd9e..10e45b82466c 100644 +index a0bf9560cf67..2a226be9b32a 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -844,6 +844,7 @@ void nvme_mpath_wait_freeze(struct nvme_subsystem *subsys); @@ -1319,38 +1351,6 @@ index 4944798e75b5..079a29ef1bf2 100644 /* * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero) * class code. Fix it. -diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -index 0b1e9337ee8e..e6ededc51523 100644 ---- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -@@ -1124,7 +1124,7 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy, - struct rockchip_usb2phy_port *rport, - struct device_node *child_np) - { -- int ret; -+ int ret, id; - - rport->port_id = USB2PHY_PORT_OTG; - rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_OTG]; -@@ -1162,13 +1162,15 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy, - - ret = devm_extcon_register_notifier(rphy->dev, rphy->edev, - EXTCON_USB_HOST, &rport->event_nb); -- if (ret) -+ if (ret) { - dev_err(rphy->dev, "register USB HOST notifier failed\n"); -+ goto out; -+ } - - if (!of_property_read_bool(rphy->dev->of_node, "extcon")) { - /* do initial sync of usb state */ -- ret = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); -- extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !ret); -+ id = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); -+ extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !id); - } - } - diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index bbab424b0d55..ed86042fb57b 100644 --- a/drivers/usb/core/hub.c -- cgit