diff --git a/projects/Allwinner/patches/linux/0013-drm_call_drm_atomic_helper_shutdown_at_shutdown.patch b/projects/Allwinner/patches/linux/0013-drm_call_drm_atomic_helper_shutdown_at_shutdown.patch deleted file mode 100644 index 65d9ee5a53..0000000000 --- a/projects/Allwinner/patches/linux/0013-drm_call_drm_atomic_helper_shutdown_at_shutdown.patch +++ /dev/null @@ -1,61 +0,0 @@ -Subject: [PATCH] drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers -From: Douglas Anderson -Date: Fri, 01 Sep 2023 16:39:53 -0700 -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 7bit - -Based on grepping through the source code these drivers appear to be -missing a call to drm_atomic_helper_shutdown() at system shutdown -time. Among other things, this means that if a panel is in use that it -won't be cleanly powered off at system shutdown time. - -The fact that we should call drm_atomic_helper_shutdown() in the case -of OS shutdown/restart comes straight out of the kernel doc "driver -instance overview" in drm_drv.c. - -All of the drivers in this patch were fairly straightforward to fix -since they already had a call to drm_atomic_helper_shutdown() at -remove/unbind time but were just lacking one at system shutdown. The -only hitch is that some of these drivers use the component model to -register/unregister their DRM devices. The shutdown callback is part -of the original device. The typical solution here, based on how other -DRM drivers do this, is to keep track of whether the device is bound -based on drvdata. In most cases the drvdata is the drm_device, so we -can just make sure it is NULL when the device is not bound. In some -drivers, this required minor code changes. To make things simpler, -drm_atomic_helper_shutdown() has been modified to consider a NULL -drm_device as a noop in the patch ("drm/atomic-helper: -drm_atomic_helper_shutdown(NULL) should be a noop"). - -Suggested-by: Maxime Ripard -Signed-off-by: Douglas Anderson -Acked-by: Maxime Ripard -Link: https://lore.kernel.org/r/20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid ---- - -diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c -index 6a8dfc022d3c..35d7a7ffd208 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_drv.c -+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c -@@ -413,6 +413,11 @@ static void sun4i_drv_remove(struct platform_device *pdev) - component_master_del(&pdev->dev, &sun4i_drv_master_ops); - } - -+static void sun4i_drv_shutdown(struct platform_device *pdev) -+{ -+ drm_atomic_helper_shutdown(platform_get_drvdata(pdev)); -+} -+ - static const struct of_device_id sun4i_drv_of_table[] = { - { .compatible = "allwinner,sun4i-a10-display-engine" }, - { .compatible = "allwinner,sun5i-a10s-display-engine" }, -@@ -437,6 +442,7 @@ MODULE_DEVICE_TABLE(of, sun4i_drv_of_table); - static struct platform_driver sun4i_drv_platform_driver = { - .probe = sun4i_drv_probe, - .remove_new = sun4i_drv_remove, -+ .shutdown = sun4i_drv_shutdown, - .driver = { - .name = "sun4i-drm", - .of_match_table = sun4i_drv_of_table, - diff --git a/projects/Allwinner/patches/linux/0044-ARM-dts-sun8i-r40-Add-interconnect-to-video-codec.patch b/projects/Allwinner/patches/linux/0044-ARM-dts-sun8i-r40-Add-interconnect-to-video-codec.patch deleted file mode 100644 index b0af71a9d8..0000000000 --- a/projects/Allwinner/patches/linux/0044-ARM-dts-sun8i-r40-Add-interconnect-to-video-codec.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 667a93ec571a2a8f2487c258c928936d73b7fa14 Mon Sep 17 00:00:00 2001 -From: Jernej Skrabec -Date: Sun, 19 Feb 2023 13:02:31 +0100 -Subject: [PATCH] ARM: dts: sun8i-r40: Add interconnect to video-codec - -Video codec needs interconnect, so driver knows that it needs to adjust -DMA addresses. - -Signed-off-by: Jernej Skrabec ---- - arch/arm/boot/dts/allwinner/sun8i-r40.dtsi | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi b/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi -index 4ef26d8f5340..a5b1f1e3900d 100644 ---- a/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi -+++ b/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi -@@ -338,6 +338,8 @@ video-codec@1c0e000 { - resets = <&ccu RST_BUS_VE>; - interrupts = ; - allwinner,sram = <&ve_sram 1>; -+ interconnects = <&mbus 4>; -+ interconnect-names = "dma-mem"; - }; - - mmc0: mmc@1c0f000 { --- -2.39.2 - diff --git a/projects/Allwinner/patches/linux/0069-clk-sunxi-ng-h6-Reparent-CPUX-during-PLL-CPUX-rate-c.patch b/projects/Allwinner/patches/linux/0069-clk-sunxi-ng-h6-Reparent-CPUX-during-PLL-CPUX-rate-c.patch deleted file mode 100644 index a9b2056c88..0000000000 --- a/projects/Allwinner/patches/linux/0069-clk-sunxi-ng-h6-Reparent-CPUX-during-PLL-CPUX-rate-c.patch +++ /dev/null @@ -1,66 +0,0 @@ -From edfe1a6c99aff85e97dc1600355a66bbcb417531 Mon Sep 17 00:00:00 2001 -From: Jernej Skrabec -Date: Thu, 12 Oct 2023 20:25:42 +0200 -Subject: [PATCH 22/25] clk: sunxi-ng: h6: Reparent CPUX during PLL CPUX rate - change - -While PLL CPUX clock rate change when CPU is running from it works in -vast majority of cases, now and then it causes instability. This leads -to system crashes and other undefined behaviour. After a lot of testing -(30+ hours) while also doing a lot of frequency switches, we can't -observe any instability issues anymore when doing reparenting to stable -clock like 24 MHz oscillator. - -Fixes: 524353ea480b ("clk: sunxi-ng: add support for the Allwinner H6 CCU") -Link: https://forum.libreelec.tv/thread/27295-orange-pi-3-lts-freezes/ -Reported-by: Chad Wagner -Tested-by: Chad Wagner -Signed-off-by: Jernej Skrabec ---- - drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c -index 42568c616181..892df807275c 100644 ---- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c -+++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c -@@ -1181,11 +1181,18 @@ static const u32 usb2_clk_regs[] = { - SUN50I_H6_USB3_CLK_REG, - }; - -+static struct ccu_mux_nb sun50i_h6_cpu_nb = { -+ .common = &cpux_clk.common, -+ .cm = &cpux_clk.mux, -+ .delay_us = 1, -+ .bypass_index = 0, /* index of 24 MHz oscillator */ -+}; -+ - static int sun50i_h6_ccu_probe(struct platform_device *pdev) - { - void __iomem *reg; -+ int i, ret; - u32 val; -- int i; - - reg = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(reg)) -@@ -1252,7 +1259,15 @@ static int sun50i_h6_ccu_probe(struct platform_device *pdev) - val |= BIT(24); - writel(val, reg + SUN50I_H6_HDMI_CEC_CLK_REG); - -- return devm_sunxi_ccu_probe(&pdev->dev, reg, &sun50i_h6_ccu_desc); -+ ret = devm_sunxi_ccu_probe(&pdev->dev, reg, &sun50i_h6_ccu_desc); -+ if (ret) -+ return ret; -+ -+ /* Reparent CPU during PLL CPUX rate changes */ -+ ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk, -+ &sun50i_h6_cpu_nb); -+ -+ return 0; - } - - static const struct of_device_id sun50i_h6_ccu_ids[] = { --- -2.42.0 -