From c9929fabcbd367cc82a9080ced08d7f21dead45a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 10 May 2022 18:32:52 +0000 Subject: [PATCH 01/16] kernel: bump 5.10 to 5.10.116 Removed upstreamed: generic/backport-5.10/900-regulator-consumer-Add-missing-stubs-to-regulator-co.patch All other patches automatically rebased. Compile-tested: lantiq/xrx200, armvirt/64 Run-tested: lantiq/xrx200, armvirt/64 Signed-off-by: Hauke Mehrtens --- include/kernel-5.10 | 4 +- ...er-Add-missing-stubs-to-regulator-co.patch | 79 ------------------- .../generic/hack-5.10/902-debloat_proc.patch | 2 +- ...-add-support-for-Toshiba-TC58NVG0S3H.patch | 7 +- ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- .../900-arm-add-cmdline-override.patch | 2 +- ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- ...Mangle-bootloader-s-kernel-arguments.patch | 2 +- 8 files changed, 8 insertions(+), 92 deletions(-) delete mode 100644 target/linux/generic/backport-5.10/900-regulator-consumer-Add-missing-stubs-to-regulator-co.patch diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 405640f695..348ba6152a 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .115 -LINUX_KERNEL_HASH-5.10.115 = f5e417b32f89318b6d0a230109a592ffd68997817463dc4692fa49ec7fe42f71 +LINUX_VERSION-5.10 = .116 +LINUX_KERNEL_HASH-5.10.116 = 806692ba7436f9cfbc32709fe20097dbde4ae5e2f4ae582f39b1d91ce5d20b49 diff --git a/target/linux/generic/backport-5.10/900-regulator-consumer-Add-missing-stubs-to-regulator-co.patch b/target/linux/generic/backport-5.10/900-regulator-consumer-Add-missing-stubs-to-regulator-co.patch deleted file mode 100644 index c5470e8b82..0000000000 --- a/target/linux/generic/backport-5.10/900-regulator-consumer-Add-missing-stubs-to-regulator-co.patch +++ /dev/null @@ -1,79 +0,0 @@ -From a71658c7db0b2be9fcab3522aeabe11792a4f481 Mon Sep 17 00:00:00 2001 -From: Dmitry Osipenko -Date: Wed, 20 Jan 2021 23:58:44 +0300 -Subject: [PATCH] regulator: consumer: Add missing stubs to - regulator/consumer.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -commit 51dfb6ca3728bd0a0a3c23776a12d2a15a1d2457 upstream. - -Add missing stubs to regulator/consumer.h in order to fix COMPILE_TEST -of the kernel. In particular this should fix compile-testing of OPP core -because of a missing stub for regulator_sync_voltage(). - -Reported-by: kernel test robot -Signed-off-by: Dmitry Osipenko -Link: https://lore.kernel.org/r/20210120205844.12658-1-digetx@gmail.com -Signed-off-by: Mark Brown -Cc: Bjørn Mork -Cc: Sudip Mukherjee -Signed-off-by: Greg Kroah-Hartman ---- - include/linux/regulator/consumer.h | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - ---- a/include/linux/regulator/consumer.h -+++ b/include/linux/regulator/consumer.h -@@ -332,6 +332,12 @@ regulator_get_exclusive(struct device *d - } - - static inline struct regulator *__must_check -+devm_regulator_get_exclusive(struct device *dev, const char *id) -+{ -+ return ERR_PTR(-ENODEV); -+} -+ -+static inline struct regulator *__must_check - regulator_get_optional(struct device *dev, const char *id) - { - return ERR_PTR(-ENODEV); -@@ -486,6 +492,11 @@ static inline int regulator_get_voltage( - return -EINVAL; - } - -+static inline int regulator_sync_voltage(struct regulator *regulator) -+{ -+ return -EINVAL; -+} -+ - static inline int regulator_is_supported_voltage(struct regulator *regulator, - int min_uV, int max_uV) - { -@@ -578,6 +589,25 @@ static inline int devm_regulator_unregis - return 0; - } - -+static inline int regulator_suspend_enable(struct regulator_dev *rdev, -+ suspend_state_t state) -+{ -+ return -EINVAL; -+} -+ -+static inline int regulator_suspend_disable(struct regulator_dev *rdev, -+ suspend_state_t state) -+{ -+ return -EINVAL; -+} -+ -+static inline int regulator_set_suspend_voltage(struct regulator *regulator, -+ int min_uV, int max_uV, -+ suspend_state_t state) -+{ -+ return -EINVAL; -+} -+ - static inline void *regulator_get_drvdata(struct regulator *regulator) - { - return NULL; diff --git a/target/linux/generic/hack-5.10/902-debloat_proc.patch b/target/linux/generic/hack-5.10/902-debloat_proc.patch index 33a3e3c5d5..0838e2c43c 100644 --- a/target/linux/generic/hack-5.10/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.10/902-debloat_proc.patch @@ -246,7 +246,7 @@ Signed-off-by: Felix Fietkau &vmalloc_op, --- a/mm/vmstat.c +++ b/mm/vmstat.c -@@ -2044,10 +2044,12 @@ void __init init_mm_internals(void) +@@ -2040,10 +2040,12 @@ void __init init_mm_internals(void) start_shepherd_timer(); #endif #ifdef CONFIG_PROC_FS diff --git a/target/linux/generic/pending-5.10/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch b/target/linux/generic/pending-5.10/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch index f644c4a73e..bafdaccd25 100644 --- a/target/linux/generic/pending-5.10/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch +++ b/target/linux/generic/pending-5.10/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch @@ -18,11 +18,9 @@ Signed-off-by: Andreas Böhler drivers/mtd/nand/raw/nand_ids.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/drivers/mtd/nand/raw/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c -index 6e41902be35f..d64adbd1ce6b 100644 --- a/drivers/mtd/nand/raw/nand_ids.c +++ b/drivers/mtd/nand/raw/nand_ids.c -@@ -29,6 +29,9 @@ struct nand_flash_dev nand_flash_ids[] = { +@@ -29,6 +29,9 @@ struct nand_flash_dev nand_flash_ids[] = {"TC58NVG0S3E 1G 3.3V 8-bit", { .id = {0x98, 0xd1, 0x90, 0x15, 0x76, 0x14, 0x01, 0x00} }, SZ_2K, SZ_128, SZ_128K, 0, 8, 64, NAND_ECC_INFO(1, SZ_512), }, @@ -32,6 +30,3 @@ index 6e41902be35f..d64adbd1ce6b 100644 {"TC58NVG2S0F 4G 3.3V 8-bit", { .id = {0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08} }, SZ_4K, SZ_512, SZ_256K, 0, 8, 224, NAND_ECC_INFO(4, SZ_512) }, --- -2.35.1 - diff --git a/target/linux/ipq806x/patches-5.10/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-5.10/0067-generic-Mangle-bootloader-s-kernel-arguments.patch index 8f669319ed..e9f2d05937 100644 --- a/target/linux/ipq806x/patches-5.10/0067-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/ipq806x/patches-5.10/0067-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1781,6 +1781,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1777,6 +1777,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. diff --git a/target/linux/ipq806x/patches-5.10/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-5.10/900-arm-add-cmdline-override.patch index dba917872c..ddc3b7cb52 100644 --- a/target/linux/ipq806x/patches-5.10/900-arm-add-cmdline-override.patch +++ b/target/linux/ipq806x/patches-5.10/900-arm-add-cmdline-override.patch @@ -1,6 +1,6 @@ --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1794,6 +1794,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL +@@ -1790,6 +1790,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL endchoice diff --git a/target/linux/mvebu/patches-5.10/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.10/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch index 36f10fcfb5..04c80113c1 100644 --- a/target/linux/mvebu/patches-5.10/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-5.10/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -28,7 +28,7 @@ Signed-off-by: Michael Gray --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1781,6 +1781,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1777,6 +1777,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. diff --git a/target/linux/oxnas/patches-5.10/996-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/oxnas/patches-5.10/996-generic-Mangle-bootloader-s-kernel-arguments.patch index 898e602306..8f56bdbf9c 100644 --- a/target/linux/oxnas/patches-5.10/996-generic-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/oxnas/patches-5.10/996-generic-Mangle-bootloader-s-kernel-arguments.patch @@ -22,7 +22,7 @@ Signed-off-by: Adrian Panella --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1781,6 +1781,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1777,6 +1777,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. From 01a6a5c73120ccddd2a83381252ede91aac070f4 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 22 May 2022 07:12:09 -0400 Subject: [PATCH 02/16] kernel: bump 5.10 to 5.10.117 Removed upstreamed: backport-5.10/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia --- include/kernel-5.10 | 4 +- ...-support-BCM4908-s-integrated-switch.patch | 10 ++-- ..._sf2-setup-BCM4908-internal-crossbar.patch | 10 ++-- ...-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch | 2 +- ...-add-function-finding-RGMII-register.patch | 6 +- ...-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch | 2 +- ...Fix-bcm_sf2_reg_rgmii_cntrl-call-for.patch | 4 +- ...dsa-bcm_sf2-refactor-LED-regs-access.patch | 2 +- ...m_sf2-enable-GPHY-for-switch-probing.patch | 2 +- ...sf2-keep-GPHY-enabled-on-the-BCM4908.patch | 2 +- ...resolve_btfids-Build-with-host-flags.patch | 7 +-- ...the-dst-buffer-to-of_get_mac_address.patch | 4 +- ...workaround-for-Huawei-MA5671A-SFP-ON.patch | 57 ------------------- ...y-simplify-phy_link_change-arguments.patch | 8 +-- .../721-NET-no-auto-carrier-off-support.patch | 4 +- 15 files changed, 31 insertions(+), 93 deletions(-) delete mode 100644 target/linux/generic/backport-5.10/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 348ba6152a..cfc5c92055 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .116 -LINUX_KERNEL_HASH-5.10.116 = 806692ba7436f9cfbc32709fe20097dbde4ae5e2f4ae582f39b1d91ce5d20b49 +LINUX_VERSION-5.10 = .117 +LINUX_KERNEL_HASH-5.10.117 = 703ef7112cdf889950dd864ba482d04bd87d83d3df3a98ab8d4ba8a7ab1ddcc7 diff --git a/target/linux/bcm4908/patches-5.10/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch b/target/linux/bcm4908/patches-5.10/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch index 35017bf1e4..5af1f3da32 100644 --- a/target/linux/bcm4908/patches-5.10/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch +++ b/target/linux/bcm4908/patches-5.10/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch @@ -68,8 +68,8 @@ Signed-off-by: Jakub Kicinski offset = CORE_STS_OVERRIDE_IMP; else offset = CORE_STS_OVERRIDE_IMP2; -@@ -711,7 +712,8 @@ static void bcm_sf2_sw_mac_link_down(str - u32 reg, offset; +@@ -714,7 +715,8 @@ static void bcm_sf2_sw_mac_link_down(str + return; if (port != core_readl(priv, CORE_IMP0_PRT_ID)) { - if (priv->type == BCM7445_DEVICE_ID) @@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski offset = CORE_STS_OVERRIDE_GMIIP_PORT(port); else offset = CORE_STS_OVERRIDE_GMIIP2_PORT(port); -@@ -738,7 +740,8 @@ static void bcm_sf2_sw_mac_link_up(struc +@@ -741,7 +743,8 @@ static void bcm_sf2_sw_mac_link_up(struc bcm_sf2_sw_mac_link_set(ds, port, interface, true); if (port != core_readl(priv, CORE_IMP0_PRT_ID)) { @@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski offset = CORE_STS_OVERRIDE_GMIIP_PORT(port); else offset = CORE_STS_OVERRIDE_GMIIP2_PORT(port); -@@ -1131,6 +1134,30 @@ struct bcm_sf2_of_data { +@@ -1134,6 +1137,30 @@ struct bcm_sf2_of_data { unsigned int num_cfp_rules; }; @@ -119,7 +119,7 @@ Signed-off-by: Jakub Kicinski /* Register offsets for the SWITCH_REG_* block */ static const u16 bcm_sf2_7445_reg_offsets[] = { [REG_SWITCH_CNTRL] = 0x00, -@@ -1179,6 +1206,9 @@ static const struct bcm_sf2_of_data bcm_ +@@ -1182,6 +1209,9 @@ static const struct bcm_sf2_of_data bcm_ }; static const struct of_device_id bcm_sf2_of_match[] = { diff --git a/target/linux/bcm4908/patches-5.10/075-v5.13-0002-net-dsa-bcm_sf2-setup-BCM4908-internal-crossbar.patch b/target/linux/bcm4908/patches-5.10/075-v5.13-0002-net-dsa-bcm_sf2-setup-BCM4908-internal-crossbar.patch index b9ec7af1ae..6d76640ead 100644 --- a/target/linux/bcm4908/patches-5.10/075-v5.13-0002-net-dsa-bcm_sf2-setup-BCM4908-internal-crossbar.patch +++ b/target/linux/bcm4908/patches-5.10/075-v5.13-0002-net-dsa-bcm_sf2-setup-BCM4908-internal-crossbar.patch @@ -82,7 +82,7 @@ Signed-off-by: David S. Miller static void bcm_sf2_intr_disable(struct bcm_sf2_priv *priv) { intrl2_0_mask_set(priv, 0xffffffff); -@@ -872,6 +910,8 @@ static int bcm_sf2_sw_resume(struct dsa_ +@@ -875,6 +913,8 @@ static int bcm_sf2_sw_resume(struct dsa_ return ret; } @@ -91,7 +91,7 @@ Signed-off-by: David S. Miller ret = bcm_sf2_cfp_resume(ds); if (ret) return ret; -@@ -1143,6 +1183,7 @@ struct bcm_sf2_of_data { +@@ -1146,6 +1186,7 @@ struct bcm_sf2_of_data { const u16 *reg_offsets; unsigned int core_reg_align; unsigned int num_cfp_rules; @@ -99,7 +99,7 @@ Signed-off-by: David S. Miller }; static const u16 bcm_sf2_4908_reg_offsets[] = { -@@ -1167,6 +1208,7 @@ static const struct bcm_sf2_of_data bcm_ +@@ -1170,6 +1211,7 @@ static const struct bcm_sf2_of_data bcm_ .core_reg_align = 0, .reg_offsets = bcm_sf2_4908_reg_offsets, .num_cfp_rules = 0, /* FIXME */ @@ -107,7 +107,7 @@ Signed-off-by: David S. Miller }; /* Register offsets for the SWITCH_REG_* block */ -@@ -1277,6 +1319,7 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1280,6 +1322,7 @@ static int bcm_sf2_sw_probe(struct platf priv->reg_offsets = data->reg_offsets; priv->core_reg_align = data->core_reg_align; priv->num_cfp_rules = data->num_cfp_rules; @@ -115,7 +115,7 @@ Signed-off-by: David S. Miller priv->rcdev = devm_reset_control_get_optional_exclusive(&pdev->dev, "switch"); -@@ -1350,6 +1393,8 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1353,6 +1396,8 @@ static int bcm_sf2_sw_probe(struct platf goto out_clk_mdiv; } diff --git a/target/linux/bcm4908/patches-5.10/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch b/target/linux/bcm4908/patches-5.10/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch index b99bf010bd..9ff1051f35 100644 --- a/target/linux/bcm4908/patches-5.10/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch +++ b/target/linux/bcm4908/patches-5.10/075-v5.13-0003-net-dsa-bcm_sf2-Fill-in-BCM4908-CFP-entries.patch @@ -14,7 +14,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1207,7 +1207,7 @@ static const struct bcm_sf2_of_data bcm_ +@@ -1210,7 +1210,7 @@ static const struct bcm_sf2_of_data bcm_ .type = BCM4908_DEVICE_ID, .core_reg_align = 0, .reg_offsets = bcm_sf2_4908_reg_offsets, diff --git a/target/linux/bcm4908/patches-5.10/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch b/target/linux/bcm4908/patches-5.10/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch index 132a734ac4..281a8bbcda 100644 --- a/target/linux/bcm4908/patches-5.10/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch +++ b/target/linux/bcm4908/patches-5.10/075-v5.13-0004-net-dsa-bcm_sf2-add-function-finding-RGMII-register.patch @@ -113,7 +113,7 @@ Signed-off-by: David S. Miller } static void bcm_sf2_sw_mac_link_down(struct dsa_switch *ds, int port, -@@ -784,11 +815,15 @@ static void bcm_sf2_sw_mac_link_up(struc +@@ -787,11 +818,15 @@ static void bcm_sf2_sw_mac_link_up(struc { struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); struct ethtool_eee *p = &priv->dev->ports[port].eee; @@ -130,7 +130,7 @@ Signed-off-by: David S. Miller if (priv->type == BCM4908_DEVICE_ID || priv->type == BCM7445_DEVICE_ID) offset = CORE_STS_OVERRIDE_GMIIP_PORT(port); -@@ -799,7 +834,7 @@ static void bcm_sf2_sw_mac_link_up(struc +@@ -802,7 +837,7 @@ static void bcm_sf2_sw_mac_link_up(struc interface == PHY_INTERFACE_MODE_RGMII_TXID || interface == PHY_INTERFACE_MODE_MII || interface == PHY_INTERFACE_MODE_REVMII) { @@ -139,7 +139,7 @@ Signed-off-by: David S. Miller reg &= ~(RX_PAUSE_EN | TX_PAUSE_EN); if (tx_pause) -@@ -807,7 +842,7 @@ static void bcm_sf2_sw_mac_link_up(struc +@@ -810,7 +845,7 @@ static void bcm_sf2_sw_mac_link_up(struc if (rx_pause) reg |= RX_PAUSE_EN; diff --git a/target/linux/bcm4908/patches-5.10/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch b/target/linux/bcm4908/patches-5.10/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch index 67c633a930..312f46723f 100644 --- a/target/linux/bcm4908/patches-5.10/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch +++ b/target/linux/bcm4908/patches-5.10/075-v5.13-0005-net-dsa-bcm_sf2-fix-BCM4908-RGMII-reg-s.patch @@ -33,7 +33,7 @@ Signed-off-by: David S. Miller break; default: switch (port) { -@@ -1230,9 +1235,7 @@ static const u16 bcm_sf2_4908_reg_offset +@@ -1233,9 +1238,7 @@ static const u16 bcm_sf2_4908_reg_offset [REG_PHY_REVISION] = 0x14, [REG_SPHY_CNTRL] = 0x24, [REG_CROSSBAR] = 0xc8, diff --git a/target/linux/bcm4908/patches-5.10/075-v5.13-0006-net-dsa-bcm_sf2-Fix-bcm_sf2_reg_rgmii_cntrl-call-for.patch b/target/linux/bcm4908/patches-5.10/075-v5.13-0006-net-dsa-bcm_sf2-Fix-bcm_sf2_reg_rgmii_cntrl-call-for.patch index 5e5d6d939d..f7e9bcb5a2 100644 --- a/target/linux/bcm4908/patches-5.10/075-v5.13-0006-net-dsa-bcm_sf2-Fix-bcm_sf2_reg_rgmii_cntrl-call-for.patch +++ b/target/linux/bcm4908/patches-5.10/075-v5.13-0006-net-dsa-bcm_sf2-Fix-bcm_sf2_reg_rgmii_cntrl-call-for.patch @@ -23,7 +23,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -824,11 +824,9 @@ static void bcm_sf2_sw_mac_link_up(struc +@@ -827,11 +827,9 @@ static void bcm_sf2_sw_mac_link_up(struc bcm_sf2_sw_mac_link_set(ds, port, interface, true); if (port != core_readl(priv, CORE_IMP0_PRT_ID)) { @@ -36,7 +36,7 @@ Signed-off-by: David S. Miller if (priv->type == BCM4908_DEVICE_ID || priv->type == BCM7445_DEVICE_ID) offset = CORE_STS_OVERRIDE_GMIIP_PORT(port); -@@ -839,6 +837,7 @@ static void bcm_sf2_sw_mac_link_up(struc +@@ -842,6 +840,7 @@ static void bcm_sf2_sw_mac_link_up(struc interface == PHY_INTERFACE_MODE_RGMII_TXID || interface == PHY_INTERFACE_MODE_MII || interface == PHY_INTERFACE_MODE_REVMII) { diff --git a/target/linux/bcm4908/patches-5.10/076-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch b/target/linux/bcm4908/patches-5.10/076-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch index bf45cdcf24..e31d93b396 100644 --- a/target/linux/bcm4908/patches-5.10/076-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch +++ b/target/linux/bcm4908/patches-5.10/076-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch @@ -82,7 +82,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -1235,9 +1272,14 @@ static const u16 bcm_sf2_4908_reg_offset +@@ -1238,9 +1275,14 @@ static const u16 bcm_sf2_4908_reg_offset [REG_SPHY_CNTRL] = 0x24, [REG_CROSSBAR] = 0xc8, [REG_RGMII_11_CNTRL] = 0x014c, diff --git a/target/linux/bcm4908/patches-5.10/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch b/target/linux/bcm4908/patches-5.10/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch index a53fca0e90..4aec8f8439 100644 --- a/target/linux/bcm4908/patches-5.10/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch +++ b/target/linux/bcm4908/patches-5.10/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch @@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1532,10 +1532,14 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1535,10 +1535,14 @@ static int bcm_sf2_sw_probe(struct platf rev = reg_readl(priv, REG_PHY_REVISION); priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK; diff --git a/target/linux/bcm4908/patches-5.10/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch b/target/linux/bcm4908/patches-5.10/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch index 00ffb19f6f..78f6e90427 100644 --- a/target/linux/bcm4908/patches-5.10/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch +++ b/target/linux/bcm4908/patches-5.10/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch @@ -15,7 +15,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c -@@ -1546,6 +1546,12 @@ static int bcm_sf2_sw_probe(struct platf +@@ -1549,6 +1549,12 @@ static int bcm_sf2_sw_probe(struct platf priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff, priv->irq0, priv->irq1); diff --git a/target/linux/generic/backport-5.10/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch b/target/linux/generic/backport-5.10/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch index 489575fb35..caec8db5d6 100644 --- a/target/linux/generic/backport-5.10/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch +++ b/target/linux/generic/backport-5.10/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch @@ -24,8 +24,6 @@ Signed-off-by: Stijn Tintel tools/bpf/resolve_btfids/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile -index af9f9d3534c9..e727058bfe15 100644 --- a/tools/bpf/resolve_btfids/Makefile +++ b/tools/bpf/resolve_btfids/Makefile @@ -23,6 +23,8 @@ CC = $(HOSTCC) @@ -37,7 +35,7 @@ index af9f9d3534c9..e727058bfe15 100644 OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/ -@@ -45,9 +47,9 @@ $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/libsubcmd +@@ -45,9 +47,9 @@ $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/l $(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(abspath $(dir $@))/ $(abspath $@) $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(OUTPUT)/libbpf @@ -49,6 +47,3 @@ index af9f9d3534c9..e727058bfe15 100644 -I$(srctree)/tools/include \ -I$(srctree)/tools/include/uapi \ -I$(LIBBPF_SRC) \ --- -2.35.1 - diff --git a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index a4a9f5624e..3b59e4532c 100644 --- a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -1641,7 +1641,7 @@ Signed-off-by: David S. Miller lp->coalesce_count_tx = XAXIDMA_DFT_TX_THRESHOLD; --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c -@@ -1122,7 +1122,6 @@ static int xemaclite_of_probe(struct pla +@@ -1107,7 +1107,6 @@ static int xemaclite_of_probe(struct pla struct net_device *ndev = NULL; struct net_local *lp = NULL; struct device *dev = &ofdev->dev; @@ -1649,7 +1649,7 @@ Signed-off-by: David S. Miller int rc = 0; -@@ -1164,12 +1163,9 @@ static int xemaclite_of_probe(struct pla +@@ -1149,12 +1148,9 @@ static int xemaclite_of_probe(struct pla lp->next_rx_buf_to_use = 0x0; lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); diff --git a/target/linux/generic/backport-5.10/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch b/target/linux/generic/backport-5.10/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch deleted file mode 100644 index 7a9de8ee1e..0000000000 --- a/target/linux/generic/backport-5.10/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch +++ /dev/null @@ -1,57 +0,0 @@ -From f81d97cb646ab8b90fb181d66fccaf9589990de6 Mon Sep 17 00:00:00 2001 -From: Matthew Hagan -Date: Sat, 30 Apr 2022 11:00:49 +0100 -Subject: [PATCH v2] net: sfp: Add tx-fault workaround for Huawei MA5671A SFP - ONT - -As noted elsewhere, various GPON SFP modules exhibit non-standard -TX-fault behaviour. In the tested case, the Huawei MA5671A, when used -in combination with a Marvell mv88e6085 switch, was found to -persistently assert TX-fault, resulting in the module being disabled. - -This patch adds a quirk to ignore the SFP_F_TX_FAULT state, allowing the -module to function. - -Change from v1: removal of erroneous return statment (Andrew Lunn) - -Signed-off-by: Matthew Hagan -Reviewed-by: Andrew Lunn ---- - drivers/net/phy/sfp.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - ---- a/drivers/net/phy/sfp.c -+++ b/drivers/net/phy/sfp.c -@@ -249,6 +249,7 @@ struct sfp { - struct sfp_eeprom_id id; - unsigned int module_power_mW; - unsigned int module_t_start_up; -+ bool tx_fault_ignore; - - #if IS_ENABLED(CONFIG_HWMON) - struct sfp_diag diag; -@@ -1893,6 +1894,12 @@ static int sfp_sm_mod_probe(struct sfp * - else - sfp->module_t_start_up = T_START_UP; - -+ if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) && -+ !memcmp(id.base.vendor_pn, "MA5671A ", 16)) -+ sfp->tx_fault_ignore = true; -+ else -+ sfp->tx_fault_ignore = false; -+ - return 0; - } - -@@ -2320,7 +2327,10 @@ static void sfp_check_state(struct sfp * - mutex_lock(&sfp->st_mutex); - state = sfp_get_state(sfp); - changed = state ^ sfp->state; -- changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT; -+ if (sfp->tx_fault_ignore) -+ changed &= SFP_F_PRESENT | SFP_F_LOS; -+ else -+ changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT; - - for (i = 0; i < GPIO_MAX; i++) - if (changed & BIT(i)) diff --git a/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch b/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch index a73d5e7b1e..6e8b488290 100644 --- a/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch +++ b/target/linux/ramips/patches-5.10/720-Revert-net-phy-simplify-phy_link_change-arguments.patch @@ -33,7 +33,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c phy_led_trigger_change_speed(phydev); } -@@ -567,7 +567,7 @@ int phy_start_cable_test(struct phy_devi +@@ -572,7 +572,7 @@ int phy_start_cable_test(struct phy_devi goto out; /* Mark the carrier down until the test is complete */ @@ -42,7 +42,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c netif_testing_on(dev); err = phydev->drv->cable_test_start(phydev); -@@ -638,7 +638,7 @@ int phy_start_cable_test_tdr(struct phy_ +@@ -643,7 +643,7 @@ int phy_start_cable_test_tdr(struct phy_ goto out; /* Mark the carrier down until the test is complete */ @@ -51,7 +51,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c netif_testing_on(dev); err = phydev->drv->cable_test_tdr_start(phydev, config); -@@ -709,7 +709,7 @@ static int phy_check_link_status(struct +@@ -714,7 +714,7 @@ static int phy_check_link_status(struct phy_link_up(phydev); } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev->state = PHY_NOLINK; @@ -60,7 +60,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c } return 0; -@@ -1191,7 +1191,7 @@ void phy_state_machine(struct work_struc +@@ -1226,7 +1226,7 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch index b83daffd4f..5e82c13d2a 100644 --- a/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch +++ b/target/linux/ramips/patches-5.10/721-NET-no-auto-carrier-off-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -709,7 +709,10 @@ static int phy_check_link_status(struct +@@ -714,7 +714,10 @@ static int phy_check_link_status(struct phy_link_up(phydev); } else if (!phydev->link && phydev->state != PHY_NOLINK) { phydev->state = PHY_NOLINK; @@ -23,7 +23,7 @@ Signed-off-by: John Crispin } return 0; -@@ -1191,7 +1194,10 @@ void phy_state_machine(struct work_struc +@@ -1226,7 +1229,10 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; From b789a588b1c55fe1df7e2d6ae1c4f84b96a03a95 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 25 May 2022 13:09:23 -0400 Subject: [PATCH 03/16] kernel: bump 5.10 to 5.10.118 Removed upstreamed: generic-backport/774-v5.15-1-igc-remove-_I_PHY_ID-checking.patch generic-backport/774-v5.15-2-igc-remove-phy-type-checking.patch All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia --- include/kernel-5.10 | 4 +- ...at91-re-factor-clocks-suspend-resume.patch | 6 +- ...5.15-1-igc-remove-_I_PHY_ID-checking.patch | 73 ------------------- ...v5.15-2-igc-remove-phy-type-checking.patch | 43 ----------- .../generic/hack-5.10/204-module_strip.patch | 4 +- .../hack-5.10/600-bridge_offload.patch | 4 +- ...ge_allow_receiption_on_disabled_port.patch | 4 +- ...d-knob-for-filtering-rx-tx-BPDU-pack.patch | 2 +- ...PS-lantiq-improve-USB-initialization.patch | 2 +- ...add-gphy-clk-src-device-tree-binding.patch | 4 +- 10 files changed, 15 insertions(+), 131 deletions(-) delete mode 100644 target/linux/generic/backport-5.10/774-v5.15-1-igc-remove-_I_PHY_ID-checking.patch delete mode 100644 target/linux/generic/backport-5.10/774-v5.15-2-igc-remove-phy-type-checking.patch diff --git a/include/kernel-5.10 b/include/kernel-5.10 index cfc5c92055..c05a5d8425 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .117 -LINUX_KERNEL_HASH-5.10.117 = 703ef7112cdf889950dd864ba482d04bd87d83d3df3a98ab8d4ba8a7ab1ddcc7 +LINUX_VERSION-5.10 = .118 +LINUX_KERNEL_HASH-5.10.118 = c5e020f187a195ab0924fe7e71b8ab8fb92936ab47bc9d15e78daabddefe0b4b diff --git a/target/linux/at91/patches-5.10/234-clk-at91-re-factor-clocks-suspend-resume.patch b/target/linux/at91/patches-5.10/234-clk-at91-re-factor-clocks-suspend-resume.patch index fc08b1fce6..5d399f6535 100644 --- a/target/linux/at91/patches-5.10/234-clk-at91-re-factor-clocks-suspend-resume.patch +++ b/target/linux/at91/patches-5.10/234-clk-at91-re-factor-clocks-suspend-resume.patch @@ -93,7 +93,7 @@ Signed-off-by: Stephen Boyd return 0; } -@@ -245,6 +256,23 @@ static int clk_generated_set_rate(struct +@@ -249,6 +260,23 @@ static int clk_generated_set_rate(struct return 0; } @@ -117,7 +117,7 @@ Signed-off-by: Stephen Boyd static const struct clk_ops generated_ops = { .enable = clk_generated_enable, .disable = clk_generated_disable, -@@ -254,6 +282,8 @@ static const struct clk_ops generated_op +@@ -258,6 +286,8 @@ static const struct clk_ops generated_op .get_parent = clk_generated_get_parent, .set_parent = clk_generated_set_parent, .set_rate = clk_generated_set_rate, @@ -126,7 +126,7 @@ Signed-off-by: Stephen Boyd }; /** -@@ -320,8 +350,6 @@ at91_clk_register_generated(struct regma +@@ -324,8 +354,6 @@ at91_clk_register_generated(struct regma if (ret) { kfree(gck); hw = ERR_PTR(ret); diff --git a/target/linux/generic/backport-5.10/774-v5.15-1-igc-remove-_I_PHY_ID-checking.patch b/target/linux/generic/backport-5.10/774-v5.15-1-igc-remove-_I_PHY_ID-checking.patch deleted file mode 100644 index d7df0685dd..0000000000 --- a/target/linux/generic/backport-5.10/774-v5.15-1-igc-remove-_I_PHY_ID-checking.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 7c496de538eebd8212dc2a3c9a468386b264d0d4 Mon Sep 17 00:00:00 2001 -From: Sasha Neftin -Date: Wed, 7 Jul 2021 08:14:40 +0300 -Subject: igc: Remove _I_PHY_ID checking - -i225 devices have only one PHY vendor. There is no point checking -_I_PHY_ID during the link establishment and auto-negotiation process. -This patch comes to clean up these pointless checkings. - -Signed-off-by: Sasha Neftin -Tested-by: Dvora Fuxbrumer -Signed-off-by: Tony Nguyen ---- - drivers/net/ethernet/intel/igc/igc_base.c | 10 +--------- - drivers/net/ethernet/intel/igc/igc_main.c | 3 +-- - drivers/net/ethernet/intel/igc/igc_phy.c | 6 ++---- - 3 files changed, 4 insertions(+), 15 deletions(-) - -(limited to 'drivers/net/ethernet/intel/igc') - ---- a/drivers/net/ethernet/intel/igc/igc_base.c -+++ b/drivers/net/ethernet/intel/igc/igc_base.c -@@ -187,15 +187,7 @@ static s32 igc_init_phy_params_base(stru - - igc_check_for_copper_link(hw); - -- /* Verify phy id and set remaining function pointers */ -- switch (phy->id) { -- case I225_I_PHY_ID: -- phy->type = igc_phy_i225; -- break; -- default: -- ret_val = -IGC_ERR_PHY; -- goto out; -- } -+ phy->type = igc_phy_i225; - - out: - return ret_val; ---- a/drivers/net/ethernet/intel/igc/igc_main.c -+++ b/drivers/net/ethernet/intel/igc/igc_main.c -@@ -4189,8 +4189,7 @@ bool igc_has_link(struct igc_adapter *ad - break; - } - -- if (hw->mac.type == igc_i225 && -- hw->phy.id == I225_I_PHY_ID) { -+ if (hw->mac.type == igc_i225) { - if (!netif_carrier_ok(adapter->netdev)) { - adapter->flags &= ~IGC_FLAG_NEED_LINK_UPDATE; - } else if (!(adapter->flags & IGC_FLAG_NEED_LINK_UPDATE)) { ---- a/drivers/net/ethernet/intel/igc/igc_phy.c -+++ b/drivers/net/ethernet/intel/igc/igc_phy.c -@@ -249,8 +249,7 @@ static s32 igc_phy_setup_autoneg(struct - return ret_val; - } - -- if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && -- hw->phy.id == I225_I_PHY_ID) { -+ if (phy->autoneg_mask & ADVERTISE_2500_FULL) { - /* Read the MULTI GBT AN Control Register - reg 7.32 */ - ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << - MMD_DEVADDR_SHIFT) | -@@ -390,8 +389,7 @@ static s32 igc_phy_setup_autoneg(struct - ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, - mii_1000t_ctrl_reg); - -- if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && -- hw->phy.id == I225_I_PHY_ID) -+ if (phy->autoneg_mask & ADVERTISE_2500_FULL) - ret_val = phy->ops.write_reg(hw, - (STANDARD_AN_REG_MASK << - MMD_DEVADDR_SHIFT) | diff --git a/target/linux/generic/backport-5.10/774-v5.15-2-igc-remove-phy-type-checking.patch b/target/linux/generic/backport-5.10/774-v5.15-2-igc-remove-phy-type-checking.patch deleted file mode 100644 index ad4d1bb0dc..0000000000 --- a/target/linux/generic/backport-5.10/774-v5.15-2-igc-remove-phy-type-checking.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 47bca7de6a4fb8dcb564c7ca14d885c91ed19e03 Mon Sep 17 00:00:00 2001 -From: Sasha Neftin -Date: Sat, 10 Jul 2021 20:57:50 +0300 -Subject: igc: Remove phy->type checking - -i225 devices have only one phy->type: copper. There is no point checking -phy->type during the igc_has_link method from the watchdog that -invoked every 2 seconds. -This patch comes to clean up these pointless checkings. - -Signed-off-by: Sasha Neftin -Tested-by: Dvora Fuxbrumer -Signed-off-by: Tony Nguyen ---- - drivers/net/ethernet/intel/igc/igc_main.c | 15 ++++----------- - 1 file changed, 4 insertions(+), 11 deletions(-) - -(limited to 'drivers/net/ethernet/intel/igc') - ---- a/drivers/net/ethernet/intel/igc/igc_main.c -+++ b/drivers/net/ethernet/intel/igc/igc_main.c -@@ -4177,17 +4177,10 @@ bool igc_has_link(struct igc_adapter *ad - * false until the igc_check_for_link establishes link - * for copper adapters ONLY - */ -- switch (hw->phy.media_type) { -- case igc_media_type_copper: -- if (!hw->mac.get_link_status) -- return true; -- hw->mac.ops.check_for_link(hw); -- link_active = !hw->mac.get_link_status; -- break; -- default: -- case igc_media_type_unknown: -- break; -- } -+ if (!hw->mac.get_link_status) -+ return true; -+ hw->mac.ops.check_for_link(hw); -+ link_active = !hw->mac.get_link_status; - - if (hw->mac.type == igc_i225) { - if (!netif_carrier_ok(adapter->netdev)) { diff --git a/target/linux/generic/hack-5.10/204-module_strip.patch b/target/linux/generic/hack-5.10/204-module_strip.patch index 645074821f..4c6b4454c6 100644 --- a/target/linux/generic/hack-5.10/204-module_strip.patch +++ b/target/linux/generic/hack-5.10/204-module_strip.patch @@ -120,7 +120,7 @@ Signed-off-by: Felix Fietkau #ifdef CONFIG_MODVERSIONS -@@ -3247,9 +3249,11 @@ static int setup_load_info(struct load_i +@@ -3251,9 +3253,11 @@ static int setup_load_info(struct load_i static int check_modinfo(struct module *mod, struct load_info *info, int flags) { @@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau if (flags & MODULE_INIT_IGNORE_VERMAGIC) modmagic = NULL; -@@ -3270,6 +3274,7 @@ static int check_modinfo(struct module * +@@ -3274,6 +3278,7 @@ static int check_modinfo(struct module * mod->name); add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); } diff --git a/target/linux/generic/hack-5.10/600-bridge_offload.patch b/target/linux/generic/hack-5.10/600-bridge_offload.patch index 7e1b852bf3..b704c98dc8 100644 --- a/target/linux/generic/hack-5.10/600-bridge_offload.patch +++ b/target/linux/generic/hack-5.10/600-bridge_offload.patch @@ -154,7 +154,7 @@ static int br_netif_receive_skb(struct net *net, struct sock *sk, struct sk_buff *skb) -@@ -162,6 +163,7 @@ int br_handle_frame_finish(struct net *n +@@ -169,6 +170,7 @@ int br_handle_frame_finish(struct net *n dst->used = now; br_forward(dst->dst, skb, local_rcv, false); } else { @@ -162,7 +162,7 @@ if (!mcast_hit) br_flood(br, skb, pkt_type, local_rcv, false); else -@@ -280,6 +282,9 @@ static rx_handler_result_t br_handle_fra +@@ -287,6 +289,9 @@ static rx_handler_result_t br_handle_fra memset(skb->cb, 0, sizeof(struct br_input_skb_cb)); p = br_port_get_rcu(skb->dev); diff --git a/target/linux/generic/pending-5.10/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-5.10/150-bridge_allow_receiption_on_disabled_port.patch index 6de22b1c7d..8ab4b361f0 100644 --- a/target/linux/generic/pending-5.10/150-bridge_allow_receiption_on_disabled_port.patch +++ b/target/linux/generic/pending-5.10/150-bridge_allow_receiption_on_disabled_port.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -195,6 +195,9 @@ static void __br_handle_local_finish(str +@@ -202,6 +202,9 @@ static void __br_handle_local_finish(str /* note: already called with rcu_read_lock */ static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb) { @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau __br_handle_local_finish(skb); /* return 1 to signal the okfn() was called so it's ok to use the skb */ -@@ -348,6 +351,17 @@ static rx_handler_result_t br_handle_fra +@@ -355,6 +358,17 @@ static rx_handler_result_t br_handle_fra forward: switch (p->state) { diff --git a/target/linux/generic/pending-5.10/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.10/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch index 106f7d3560..d907006fa4 100644 --- a/target/linux/generic/pending-5.10/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch +++ b/target/linux/generic/pending-5.10/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev) --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -305,6 +305,8 @@ static rx_handler_result_t br_handle_fra +@@ -312,6 +312,8 @@ static rx_handler_result_t br_handle_fra fwd_mask |= p->group_fwd_mask; switch (dest[5]) { case 0x00: /* Bridge Group Address */ diff --git a/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch index 17e07cd63a..9d62892b56 100644 --- a/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch +++ b/target/linux/lantiq/patches-5.10/0051-MIPS-lantiq-improve-USB-initialization.patch @@ -41,7 +41,7 @@ Signed-off-by: Hauke Mehrtens /* the pci enable helper */ static int pci_enable(struct clk *clk) { -@@ -571,4 +590,5 @@ void __init ltq_soc_init(void) +@@ -585,4 +604,5 @@ void __init ltq_soc_init(void) clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE); clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0); } diff --git a/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch index 01b87b9d5c..92c4b56493 100644 --- a/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch +++ b/target/linux/lantiq/patches-5.10/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch @@ -1,6 +1,6 @@ --- a/arch/mips/lantiq/xway/sysctrl.c +++ b/arch/mips/lantiq/xway/sysctrl.c -@@ -426,6 +426,20 @@ static void clkdev_add_clkout(void) +@@ -440,6 +440,20 @@ static void clkdev_add_clkout(void) } } @@ -21,7 +21,7 @@ /* bring up all register ranges that we need for basic system control */ void __init ltq_soc_init(void) { -@@ -591,4 +605,6 @@ void __init ltq_soc_init(void) +@@ -605,4 +619,6 @@ void __init ltq_soc_init(void) clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0); } usb_set_clock(); From cd634afe6cb6565eb6865931c8d73d97cab3600a Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 30 May 2022 08:45:46 -0400 Subject: [PATCH 04/16] kernel: bump 5.10 to 5.10.119 Delete the crypto-lib-blake2s kmod package, as BLAKE2s is now built-in. Patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800, x86/64 Signed-off-by: John Audia --- include/kernel-5.10 | 4 +- package/kernel/linux/modules/crypto.mk | 42 ------------------- package/kernel/linux/modules/netsupport.mk | 1 - .../910-unaligned_access_hacks.patch | 4 +- target/linux/generic/config-5.10 | 1 - .../hack-5.10/261-lib-arc4-unhide.patch | 4 +- .../205-backtrace_module_info.patch | 4 +- ...hdog-add-realtek-otto-watchdog-timer.patch | 2 +- 8 files changed, 9 insertions(+), 53 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index c05a5d8425..f12a386aa5 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .118 -LINUX_KERNEL_HASH-5.10.118 = c5e020f187a195ab0924fe7e71b8ab8fb92936ab47bc9d15e78daabddefe0b4b +LINUX_VERSION-5.10 = .119 +LINUX_KERNEL_HASH-5.10.119 = 3e353e55a2b7074c905c7c517c6dae83eae440f98a12ffd471dc4df1d5172511 diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index cf2cf6c3ac..d43100703e 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -458,48 +458,6 @@ endef $(eval $(call KernelPackage,crypto-kpp)) - -define KernelPackage/crypto-lib-blake2s - TITLE:=BLAKE2s hash function library - KCONFIG:=CONFIG_CRYPTO_LIB_BLAKE2S - HIDDEN:=1 - FILES:=$(LINUX_DIR)/lib/crypto/libblake2s.ko - $(call AddDepends/crypto,+PACKAGE_kmod-crypto-hash:kmod-crypto-hash) -endef - -define KernelPackage/crypto-lib-blake2s/config - imply PACKAGE_kmod-crypto-hash -endef - -define KernelPackage/crypto-lib-blake2s/x86/64 - KCONFIG+=CONFIG_CRYPTO_BLAKE2S_X86 - FILES+=\ - $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko \ - $(LINUX_DIR)/arch/x86/crypto/blake2s-x86_64.ko -endef - -define KernelPackage/crypto-lib-blake2s/arm - KCONFIG+=CONFIG_CRYPTO_BLAKE2S_ARM - FILES+=\ - $(LINUX_DIR)/lib/crypto/libblake2s-generic.ko@lt5.12 \ - $(LINUX_DIR)/arch/arm/crypto/blake2s-arm.ko@ge5.12 -endef - -ifndef KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET) - define KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET) - KCONFIG+=CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC - FILES+=$(LINUX_DIR)/lib/crypto/libblake2s-generic.ko - endef -endif - -ifdef KernelPackage/crypto-lib-blake2s/$(ARCH) - KernelPackage/crypto-lib-blake2s/$(CRYPTO_TARGET)=\ - $(KernelPackage/crypto-lib-blake2s/$(ARCH)) -endif - -$(eval $(call KernelPackage,crypto-lib-blake2s)) - - define KernelPackage/crypto-lib-chacha20 TITLE:=ChaCha library interface KCONFIG:=CONFIG_CRYPTO_LIB_CHACHA diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 76187df50f..6fb3b57e12 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -1325,7 +1325,6 @@ define KernelPackage/wireguard SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=WireGuard secure network tunnel DEPENDS:= \ - +kmod-crypto-lib-blake2s \ +kmod-crypto-lib-chacha20poly1305 \ +kmod-crypto-lib-curve25519 \ +kmod-udptunnel4 \ diff --git a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch index f2f48d6543..f66f4fc4b6 100644 --- a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch @@ -656,8 +656,8 @@ #include +#include - u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); - u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, + u64 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); + u64 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h @@ -88,7 +88,7 @@ enum { diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 0a9d51d3f4..9d6d44e386 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -1144,7 +1144,6 @@ CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_LIB_AES=y CONFIG_CRYPTO_LIB_ARC4=y -# CONFIG_CRYPTO_LIB_BLAKE2S is not set # CONFIG_CRYPTO_LIB_CHACHA is not set # CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set # CONFIG_CRYPTO_LIB_CURVE25519 is not set diff --git a/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch b/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch index a7668acfad..dfba811f31 100644 --- a/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch +++ b/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch @@ -4,7 +4,7 @@ from backports. --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig -@@ -6,7 +6,7 @@ config CRYPTO_LIB_AES +@@ -4,7 +4,7 @@ config CRYPTO_LIB_AES tristate config CRYPTO_LIB_ARC4 @@ -12,4 +12,4 @@ from backports. + tristate "ARC4 cipher library" config CRYPTO_ARCH_HAVE_LIB_BLAKE2S - tristate + bool diff --git a/target/linux/generic/pending-5.10/205-backtrace_module_info.patch b/target/linux/generic/pending-5.10/205-backtrace_module_info.patch index f46877f254..f1f35c9923 100644 --- a/target/linux/generic/pending-5.10/205-backtrace_module_info.patch +++ b/target/linux/generic/pending-5.10/205-backtrace_module_info.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/lib/vsprintf.c +++ b/lib/vsprintf.c -@@ -983,8 +983,10 @@ char *symbol_string(char *buf, char *end +@@ -985,8 +985,10 @@ char *symbol_string(char *buf, char *end struct printf_spec spec, const char *fmt) { unsigned long value; @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau #endif if (fmt[1] == 'R') -@@ -1001,8 +1003,14 @@ char *symbol_string(char *buf, char *end +@@ -1003,8 +1005,14 @@ char *symbol_string(char *buf, char *end return string_nocheck(buf, end, sym, spec); #else diff --git a/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch b/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch index cc5ee92466..845441b425 100644 --- a/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch +++ b/target/linux/realtek/patches-5.10/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch @@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -14814,6 +14814,13 @@ S: Maintained +@@ -14816,6 +14816,13 @@ S: Maintained F: include/sound/rt*.h F: sound/soc/codecs/rt* From f800f8d6fc4f21ed87454aa657ebbf376dc3b6cf Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 6 Jun 2022 07:05:18 -0400 Subject: [PATCH 05/16] kernel: bump 5.10 to 5.10.120 All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800, x86/64 Signed-off-by: John Audia --- include/kernel-5.10 | 4 ++-- target/linux/ath25/patches-5.10/700-swconfig_mvswitch.patch | 4 ++-- ...netfilter-nftables-update-table-flags-from-the-commi.patch | 4 ++-- target/linux/generic/hack-5.10/251-kconfig.patch | 2 +- target/linux/generic/hack-5.10/253-ksmbd-config.patch | 2 +- target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch | 2 +- .../generic/pending-5.10/530-jffs2_make_lzma_available.patch | 2 +- .../patches-5.10/707-net-phy-Add-Qualcom-QCA807x-driver.patch | 2 +- target/linux/realtek/patches-5.10/705-add-rtl-phy.patch | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index f12a386aa5..168fc255e5 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .119 -LINUX_KERNEL_HASH-5.10.119 = 3e353e55a2b7074c905c7c517c6dae83eae440f98a12ffd471dc4df1d5172511 +LINUX_VERSION-5.10 = .120 +LINUX_KERNEL_HASH-5.10.120 = 5b7a756004158ece2f5e41795ba523ec201743a736e34ce41cbe09177f7d0e8b diff --git a/target/linux/ath25/patches-5.10/700-swconfig_mvswitch.patch b/target/linux/ath25/patches-5.10/700-swconfig_mvswitch.patch index 32f332189b..79a4d1c1a0 100644 --- a/target/linux/ath25/patches-5.10/700-swconfig_mvswitch.patch +++ b/target/linux/ath25/patches-5.10/700-swconfig_mvswitch.patch @@ -13,8 +13,8 @@ select SWCONFIG --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -29,6 +29,7 @@ obj-$(CONFIG_ADM6996_PHY) += adm6996.o - obj-$(CONFIG_AR8216_PHY) += ar8216.o ar8327.o +@@ -31,6 +31,7 @@ ar8xxx-y += ar8216.o + ar8xxx-y += ar8327.o obj-$(CONFIG_SWCONFIG_B53) += b53/ obj-$(CONFIG_IP17XX_PHY) += ip17xx.o +obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o diff --git a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch index fa6e0c4173..55c04ba4fd 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch @@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso nft_trans_table_update(trans) = true; list_add_tail(&trans->list, &ctx->net->nft.commit_list); return 0; -@@ -7908,11 +7912,10 @@ static int nf_tables_commit(struct net * +@@ -7918,11 +7922,10 @@ static int nf_tables_commit(struct net * switch (trans->msg_type) { case NFT_MSG_NEWTABLE: if (nft_trans_table_update(trans)) { @@ -86,7 +86,7 @@ Signed-off-by: Pablo Neira Ayuso } else { nft_clear(net, trans->ctx.table); } -@@ -8125,11 +8128,9 @@ static int __nf_tables_abort(struct net +@@ -8135,11 +8138,9 @@ static int __nf_tables_abort(struct net switch (trans->msg_type) { case NFT_MSG_NEWTABLE: if (nft_trans_table_update(trans)) { diff --git a/target/linux/generic/hack-5.10/251-kconfig.patch b/target/linux/generic/hack-5.10/251-kconfig.patch index 34a63eaa7c..4ada399fbf 100644 --- a/target/linux/generic/hack-5.10/251-kconfig.patch +++ b/target/linux/generic/hack-5.10/251-kconfig.patch @@ -92,7 +92,7 @@ Signed-off-by: John Crispin bool --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -418,16 +418,16 @@ config BCH_CONST_T +@@ -420,16 +420,16 @@ config BCH_CONST_T # Textsearch support is select'ed if needed # config TEXTSEARCH diff --git a/target/linux/generic/hack-5.10/253-ksmbd-config.patch b/target/linux/generic/hack-5.10/253-ksmbd-config.patch index c2b2a96b9c..adce3f5f15 100644 --- a/target/linux/generic/hack-5.10/253-ksmbd-config.patch +++ b/target/linux/generic/hack-5.10/253-ksmbd-config.patch @@ -11,7 +11,7 @@ that can be interpreted by the ASN.1 stream decoder and used to --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -589,7 +589,7 @@ config LIBFDT +@@ -591,7 +591,7 @@ config LIBFDT bool config OID_REGISTRY diff --git a/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch b/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch index dfba811f31..4ffd8cfa37 100644 --- a/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch +++ b/target/linux/generic/hack-5.10/261-lib-arc4-unhide.patch @@ -4,7 +4,7 @@ from backports. --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig -@@ -4,7 +4,7 @@ config CRYPTO_LIB_AES +@@ -6,7 +6,7 @@ config CRYPTO_LIB_AES tristate config CRYPTO_LIB_ARC4 diff --git a/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch index 20483a391d..d30d3b7560 100644 --- a/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch +++ b/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch @@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis #define JFFS2_NODE_ACCURATE 0x2000 --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -315,6 +315,12 @@ config ZSTD_DECOMPRESS +@@ -317,6 +317,12 @@ config ZSTD_DECOMPRESS source "lib/xz/Kconfig" diff --git a/target/linux/ipq40xx/patches-5.10/707-net-phy-Add-Qualcom-QCA807x-driver.patch b/target/linux/ipq40xx/patches-5.10/707-net-phy-Add-Qualcom-QCA807x-driver.patch index ba441022f3..12b21a803c 100644 --- a/target/linux/ipq40xx/patches-5.10/707-net-phy-Add-Qualcom-QCA807x-driver.patch +++ b/target/linux/ipq40xx/patches-5.10/707-net-phy-Add-Qualcom-QCA807x-driver.patch @@ -40,7 +40,7 @@ Signed-off-by: Robert Marko help --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -86,6 +86,7 @@ obj-$(CONFIG_MICROSEMI_PHY) += mscc/ +@@ -88,6 +88,7 @@ obj-$(CONFIG_MICROSEMI_PHY) += mscc/ obj-$(CONFIG_NATIONAL_PHY) += national.o obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o obj-$(CONFIG_QSEMI_PHY) += qsemi.o diff --git a/target/linux/realtek/patches-5.10/705-add-rtl-phy.patch b/target/linux/realtek/patches-5.10/705-add-rtl-phy.patch index 4f907e1d4b..e88c26b348 100644 --- a/target/linux/realtek/patches-5.10/705-add-rtl-phy.patch +++ b/target/linux/realtek/patches-5.10/705-add-rtl-phy.patch @@ -15,7 +15,7 @@ help --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -87,6 +87,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o +@@ -89,6 +89,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o obj-$(CONFIG_QSEMI_PHY) += qsemi.o obj-$(CONFIG_REALTEK_PHY) += realtek.o From ed1536e0b6b7f2aeea6881632b89b269d27ff7ce Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 18 May 2022 15:32:03 +0100 Subject: [PATCH 06/16] kernel: bump 5.15 to 5.15.41 Deleted (upstreamed): generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch [1] Other patches automatically rebased. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.41&id=99858114a3b2c8f5f8707d9bbd46c50f547c87c0 Signed-off-by: Rui Salvaterra --- include/kernel-5.15 | 4 +- .../910-unaligned_access_hacks.patch | 4 +- ...it-the-CEC-disable-enable-functions-.patch | 4 +- ...e-sure-the-device-is-powered-with-CE.patch | 4 +- ...ove-the-DDC-probing-for-status-detec.patch | 2 +- ...c4-hdmi-Raise-the-maximum-clock-rate.patch | 2 +- ...-drm-vc4-hdmi-Fix-HPD-GPIO-detection.patch | 2 +- ...-a-spinlock-to-protect-register-acce.patch | 116 +++++++++--------- ...-a-mutex-to-prevent-concurrent-frame.patch | 68 +++++----- ...vent-access-to-crtc-state-outside-of.patch | 18 +-- ...mi-Check-the-device-state-in-prepare.patch | 4 +- ...dmi-Introduce-an-output_enabled-flag.patch | 6 +- ...4-hdmi-Introduce-a-scdc_enabled-flag.patch | 6 +- ...ually-check-for-the-connector-status.patch | 2 +- ...Better-coalescing-parameter-defaults.patch | 2 +- ...et-bcmgenet-Reset-RBUF-on-first-open.patch | 2 +- ...resent-but-empty-dmas-disables-audio.patch | 2 +- ...the-HDMI-registers-into-the-debugfs-.patch | 6 +- ...dmi-Report-that-3d-stereo-is-allowed.patch | 2 +- ...nused-infoframe-packet-RAM-registers.patch | 4 +- ...rm-Avoid-full-hdmi-audio-fifo-writes.patch | 2 +- ...mplify-the-connector-state-retrieval.patch | 2 +- ...vc4-Fix-timings-for-interlaced-modes.patch | 4 +- ...vc4-Reset-HDMI-MISC_CONTROL-register.patch | 4 +- ...c4-Don-t-try-disabling-SCDC-on-Pi0-3.patch | 2 +- ...c4_hdmi-doesn-t-use-2711-HPD-registe.patch | 8 +- ...drm-vc4-Move-HDMI-reset-to-pm_resume.patch | 12 +- ...c4_hdmi-output_enabled-for-allowing-.patch | 10 +- ...4-Fix-build-without-DRM_VC4_HDMI_CEC.patch | 2 +- ...4-Skip-writes-to-disabled-packet-RAM.patch | 6 +- ...drm_hdmi_avi_infoframe_colorspace-to.patch | 2 +- ...m-vc4-hdmi-Add-full-range-RGB-helper.patch | 4 +- ...e-full-range-helper-in-csc-functions.patch | 14 +-- ...c4-hdmi-Move-XBAR-setup-to-csc_setup.patch | 4 +- ...lace-CSC_CTL-hardcoded-value-by-defi.patch | 2 +- ...-vc4-hdmi-Define-colorspace-matrices.patch | 4 +- ...4-hdmi-Change-CSC-callback-prototype.patch | 6 +- ...e-clock-validation-to-its-own-functi.patch | 6 +- ...e-clock-calculation-into-its-own-fun.patch | 6 +- ...e-the-sink-maximum-TMDS-clock-into-a.patch | 2 +- ...e-bpp-into-account-for-the-scrambler.patch | 8 +- ...i-Always-try-to-have-the-highest-bpc.patch | 12 +- ...drm-vc4-hdmi-Support-HDMI-YUV-output.patch | 30 ++--- ...-HDMI-monitor-detection-in-polled-mo.patch | 6 +- ...-Fix-no-video-output-on-DVI-monitors.patch | 2 +- ...-clock-value-used-for-validating-hdm.patch | 2 +- ...-Broadcast-RGB-property-to-allow-ove.patch | 16 +-- ...-CSC-for-BT601-709-2020-limited-and-.patch | 16 +-- ..._hdmi-Force-modeset-when-bpc-changes.patch | 4 +- ...VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWA.patch | 2 +- ...i-Rework-hdmi_enable_4kp60-detection.patch | 8 +- ...ce-a-modeset-when-Broadcast-RGB-sett.patch | 2 +- ...resolve_btfids-Build-with-host-flags.patch | 7 +- ...workaround-for-Huawei-MA5671A-SFP-ON.patch | 57 --------- ...-netfilter_optional_tcp_window_check.patch | 18 +-- ...ark-Fix-initialization-with-old-Marv.patch | 2 +- ...y-simplify-phy_link_change-arguments.patch | 2 +- .../721-NET-no-auto-carrier-off-support.patch | 2 +- 58 files changed, 248 insertions(+), 310 deletions(-) delete mode 100644 target/linux/generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index fed7f9dbfa..0a8c775a41 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .40 -LINUX_KERNEL_HASH-5.15.40 = c787f7eecbabbfca4dd3224827292a5fb98e3370c6e04b859714fba25bb8c33b +LINUX_VERSION-5.15 = .41 +LINUX_KERNEL_HASH-5.15.41 = 3c7cb1fc3b029b1b765a33af9608b6f18f734246050640def019ee4c4ad6591e diff --git a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch index 436d6e0907..4c69139eec 100644 --- a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch @@ -656,8 +656,8 @@ #include +#include - u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); - u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, + u64 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); + u64 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h @@ -88,7 +88,7 @@ enum { diff --git a/target/linux/bcm27xx/patches-5.15/950-0001-drm-vc4-hdmi-Split-the-CEC-disable-enable-functions-.patch b/target/linux/bcm27xx/patches-5.15/950-0001-drm-vc4-hdmi-Split-the-CEC-disable-enable-functions-.patch index 6f8ea4e9cc..379165238d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0001-drm-vc4-hdmi-Split-the-CEC-disable-enable-functions-.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0001-drm-vc4-hdmi-Split-the-CEC-disable-enable-functions-.patch @@ -17,7 +17,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20210819135931.895976-5-maxi --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1739,7 +1739,7 @@ static irqreturn_t vc4_cec_irq_handler(i +@@ -1740,7 +1740,7 @@ static irqreturn_t vc4_cec_irq_handler(i return ret; } @@ -26,7 +26,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20210819135931.895976-5-maxi { struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap); /* clock period in microseconds */ -@@ -1752,38 +1752,53 @@ static int vc4_hdmi_cec_adap_enable(stru +@@ -1753,38 +1753,53 @@ static int vc4_hdmi_cec_adap_enable(stru val |= ((4700 / usecs) << VC4_HDMI_CEC_CNT_TO_4700_US_SHIFT) | ((4500 / usecs) << VC4_HDMI_CEC_CNT_TO_4500_US_SHIFT); diff --git a/target/linux/bcm27xx/patches-5.15/950-0002-drm-vc4-hdmi-Make-sure-the-device-is-powered-with-CE.patch b/target/linux/bcm27xx/patches-5.15/950-0002-drm-vc4-hdmi-Make-sure-the-device-is-powered-with-CE.patch index a0ec38bada..d3f6659363 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0002-drm-vc4-hdmi-Make-sure-the-device-is-powered-with-CE.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0002-drm-vc4-hdmi-Make-sure-the-device-is-powered-with-CE.patch @@ -24,7 +24,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20210819135931.895976-6-maxi --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1744,8 +1744,14 @@ static int vc4_hdmi_cec_enable(struct ce +@@ -1745,8 +1745,14 @@ static int vc4_hdmi_cec_enable(struct ce struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap); /* clock period in microseconds */ const u32 usecs = 1000000 / CEC_CLOCK_FREQ; @@ -40,7 +40,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20210819135931.895976-6-maxi val &= ~(VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET | VC4_HDMI_CEC_CNT_TO_4700_US_MASK | VC4_HDMI_CEC_CNT_TO_4500_US_MASK); -@@ -1788,6 +1794,8 @@ static int vc4_hdmi_cec_disable(struct c +@@ -1789,6 +1795,8 @@ static int vc4_hdmi_cec_disable(struct c HDMI_WRITE(HDMI_CEC_CNTRL_5, HDMI_READ(HDMI_CEC_CNTRL_5) | VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET); diff --git a/target/linux/bcm27xx/patches-5.15/950-0004-drm-vc4-hdmi-Remove-the-DDC-probing-for-status-detec.patch b/target/linux/bcm27xx/patches-5.15/950-0004-drm-vc4-hdmi-Remove-the-DDC-probing-for-status-detec.patch index f4dd7878d4..4e6a109253 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0004-drm-vc4-hdmi-Remove-the-DDC-probing-for-status-detec.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0004-drm-vc4-hdmi-Remove-the-DDC-probing-for-status-detec.patch @@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20211025152903.1088803-2-maxime@cerno.tech --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -175,8 +175,6 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -176,8 +176,6 @@ vc4_hdmi_connector_detect(struct drm_con if (vc4_hdmi->hpd_gpio && gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) { connected = true; diff --git a/target/linux/bcm27xx/patches-5.15/950-0005-drm-vc4-hdmi-Raise-the-maximum-clock-rate.patch b/target/linux/bcm27xx/patches-5.15/950-0005-drm-vc4-hdmi-Raise-the-maximum-clock-rate.patch index dbefadc5d5..4838fe330c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0005-drm-vc4-hdmi-Raise-the-maximum-clock-rate.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0005-drm-vc4-hdmi-Raise-the-maximum-clock-rate.patch @@ -20,7 +20,7 @@ Link: https://lore.kernel.org/r/20211025152903.1088803-9-maxime@cerno.tech --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2377,7 +2377,7 @@ static const struct vc4_hdmi_variant bcm +@@ -2378,7 +2378,7 @@ static const struct vc4_hdmi_variant bcm .encoder_type = VC4_ENCODER_TYPE_HDMI0, .debugfs_name = "hdmi0_regs", .card_name = "vc4-hdmi-0", diff --git a/target/linux/bcm27xx/patches-5.15/950-0006-drm-vc4-hdmi-Fix-HPD-GPIO-detection.patch b/target/linux/bcm27xx/patches-5.15/950-0006-drm-vc4-hdmi-Fix-HPD-GPIO-detection.patch index bfc2ed4e8b..910f983bd1 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0006-drm-vc4-hdmi-Fix-HPD-GPIO-detection.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0006-drm-vc4-hdmi-Fix-HPD-GPIO-detection.patch @@ -25,7 +25,7 @@ Link: https://lore.kernel.org/r/20211025152903.1088803-3-maxime@cerno.tech --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -172,9 +172,9 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -173,9 +173,9 @@ vc4_hdmi_connector_detect(struct drm_con WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev)); diff --git a/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch b/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch index 64b97d8962..029fabd8e0 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch @@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -118,6 +118,10 @@ static int vc4_hdmi_debugfs_regs(struct +@@ -119,6 +119,10 @@ static int vc4_hdmi_debugfs_regs(struct static void vc4_hdmi_reset(struct vc4_hdmi *vc4_hdmi) { @@ -36,7 +36,7 @@ Signed-off-by: Maxime Ripard HDMI_WRITE(HDMI_M_CTL, VC4_HD_M_SW_RST); udelay(1); HDMI_WRITE(HDMI_M_CTL, 0); -@@ -129,24 +133,36 @@ static void vc4_hdmi_reset(struct vc4_hd +@@ -130,24 +134,36 @@ static void vc4_hdmi_reset(struct vc4_hd VC4_HDMI_SW_RESET_FORMAT_DETECT); HDMI_WRITE(HDMI_SW_RESET_CONTROL, 0); @@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard value = HDMI_READ(HDMI_CEC_CNTRL_1); value &= ~VC4_HDMI_CEC_DIV_CLK_CNT_MASK; -@@ -154,9 +170,11 @@ static void vc4_hdmi_cec_update_clk_div( +@@ -155,9 +171,11 @@ static void vc4_hdmi_cec_update_clk_div( * Set the clock divider: the hsm_clock rate and this divider * setting will give a 40 kHz CEC clock. */ @@ -86,7 +86,7 @@ Signed-off-by: Maxime Ripard } #else static void vc4_hdmi_cec_update_clk_div(struct vc4_hdmi *vc4_hdmi) {} -@@ -175,8 +193,16 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -176,8 +194,16 @@ vc4_hdmi_connector_detect(struct drm_con if (vc4_hdmi->hpd_gpio) { if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) connected = true; @@ -105,7 +105,7 @@ Signed-off-by: Maxime Ripard } if (connected) { -@@ -370,9 +396,12 @@ static int vc4_hdmi_stop_packet(struct d +@@ -371,9 +397,12 @@ static int vc4_hdmi_stop_packet(struct d { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); u32 packet_id = type - 0x80; @@ -118,7 +118,7 @@ Signed-off-by: Maxime Ripard if (!poll) return 0; -@@ -392,6 +421,7 @@ static void vc4_hdmi_write_infoframe(str +@@ -393,6 +422,7 @@ static void vc4_hdmi_write_infoframe(str void __iomem *base = __vc4_hdmi_get_field_base(vc4_hdmi, ram_packet_start->reg); uint8_t buffer[VC4_HDMI_PACKET_STRIDE]; @@ -126,7 +126,7 @@ Signed-off-by: Maxime Ripard ssize_t len, i; int ret; -@@ -409,6 +439,8 @@ static void vc4_hdmi_write_infoframe(str +@@ -410,6 +440,8 @@ static void vc4_hdmi_write_infoframe(str return; } @@ -135,7 +135,7 @@ Signed-off-by: Maxime Ripard for (i = 0; i < len; i += 7) { writel(buffer[i + 0] << 0 | buffer[i + 1] << 8 | -@@ -426,6 +458,9 @@ static void vc4_hdmi_write_infoframe(str +@@ -427,6 +459,9 @@ static void vc4_hdmi_write_infoframe(str HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, HDMI_READ(HDMI_RAM_PACKET_CONFIG) | BIT(packet_id)); @@ -145,7 +145,7 @@ Signed-off-by: Maxime Ripard ret = wait_for((HDMI_READ(HDMI_RAM_PACKET_STATUS) & BIT(packet_id)), 100); if (ret) -@@ -545,6 +580,7 @@ static void vc4_hdmi_enable_scrambling(s +@@ -546,6 +581,7 @@ static void vc4_hdmi_enable_scrambling(s { struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode; struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -153,7 +153,7 @@ Signed-off-by: Maxime Ripard if (!vc4_hdmi_supports_scrambling(encoder, mode)) return; -@@ -555,8 +591,10 @@ static void vc4_hdmi_enable_scrambling(s +@@ -556,8 +592,10 @@ static void vc4_hdmi_enable_scrambling(s drm_scdc_set_high_tmds_clock_ratio(vc4_hdmi->ddc, true); drm_scdc_set_scrambling(vc4_hdmi->ddc, true); @@ -164,7 +164,7 @@ Signed-off-by: Maxime Ripard queue_delayed_work(system_wq, &vc4_hdmi->scrambling_work, msecs_to_jiffies(SCRAMBLING_POLLING_DELAY_MS)); -@@ -566,6 +604,7 @@ static void vc4_hdmi_disable_scrambling( +@@ -567,6 +605,7 @@ static void vc4_hdmi_disable_scrambling( { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); struct drm_crtc *crtc = encoder->crtc; @@ -172,7 +172,7 @@ Signed-off-by: Maxime Ripard /* * At boot, encoder->crtc will be NULL. Since we don't know the -@@ -581,8 +620,10 @@ static void vc4_hdmi_disable_scrambling( +@@ -582,8 +621,10 @@ static void vc4_hdmi_disable_scrambling( if (delayed_work_pending(&vc4_hdmi->scrambling_work)) cancel_delayed_work_sync(&vc4_hdmi->scrambling_work); @@ -183,7 +183,7 @@ Signed-off-by: Maxime Ripard drm_scdc_set_scrambling(vc4_hdmi->ddc, false); drm_scdc_set_high_tmds_clock_ratio(vc4_hdmi->ddc, false); -@@ -608,15 +649,23 @@ static void vc4_hdmi_encoder_post_crtc_d +@@ -609,15 +650,23 @@ static void vc4_hdmi_encoder_post_crtc_d struct drm_atomic_state *state) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -207,7 +207,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi_disable_scrambling(encoder); } -@@ -624,10 +673,13 @@ static void vc4_hdmi_encoder_post_crtc_p +@@ -625,10 +674,13 @@ static void vc4_hdmi_encoder_post_crtc_p struct drm_atomic_state *state) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -221,7 +221,7 @@ Signed-off-by: Maxime Ripard if (vc4_hdmi->variant->phy_disable) vc4_hdmi->variant->phy_disable(vc4_hdmi); -@@ -646,8 +698,11 @@ static void vc4_hdmi_encoder_disable(str +@@ -647,8 +699,11 @@ static void vc4_hdmi_encoder_disable(str static void vc4_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi, bool enable) { @@ -233,7 +233,7 @@ Signed-off-by: Maxime Ripard csc_ctl = VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR, VC4_HD_CSC_CTL_ORDER); -@@ -677,14 +732,19 @@ static void vc4_hdmi_csc_setup(struct vc +@@ -678,14 +733,19 @@ static void vc4_hdmi_csc_setup(struct vc /* The RGB order applies even when CSC is disabled. */ HDMI_WRITE(HDMI_CSC_CTL, csc_ctl); @@ -253,7 +253,7 @@ Signed-off-by: Maxime Ripard if (enable) { /* CEA VICs other than #1 requre limited range RGB * output unless overridden by an AVI infoframe. -@@ -716,6 +776,8 @@ static void vc5_hdmi_csc_setup(struct vc +@@ -717,6 +777,8 @@ static void vc5_hdmi_csc_setup(struct vc } HDMI_WRITE(HDMI_CSC_CTL, csc_ctl); @@ -262,7 +262,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_set_timings(struct vc4_hdmi *vc4_hdmi, -@@ -739,6 +801,9 @@ static void vc4_hdmi_set_timings(struct +@@ -740,6 +802,9 @@ static void vc4_hdmi_set_timings(struct mode->crtc_vsync_end - interlaced, VC4_HDMI_VERTB_VBP)); @@ -272,7 +272,7 @@ Signed-off-by: Maxime Ripard HDMI_WRITE(HDMI_HORZA, (vsync_pos ? VC4_HDMI_HORZA_VPOS : 0) | -@@ -762,6 +827,8 @@ static void vc4_hdmi_set_timings(struct +@@ -763,6 +828,8 @@ static void vc4_hdmi_set_timings(struct HDMI_WRITE(HDMI_VERTB0, vertb_even); HDMI_WRITE(HDMI_VERTB1, vertb); @@ -281,7 +281,7 @@ Signed-off-by: Maxime Ripard } static void vc5_hdmi_set_timings(struct vc4_hdmi *vc4_hdmi, -@@ -785,10 +852,13 @@ static void vc5_hdmi_set_timings(struct +@@ -786,10 +853,13 @@ static void vc5_hdmi_set_timings(struct mode->crtc_vsync_end - interlaced, VC4_HDMI_VERTB_VBP)); @@ -295,7 +295,7 @@ Signed-off-by: Maxime Ripard HDMI_WRITE(HDMI_VEC_INTERFACE_XBAR, 0x354021); HDMI_WRITE(HDMI_HORZA, (vsync_pos ? VC5_HDMI_HORZA_VPOS : 0) | -@@ -847,13 +917,18 @@ static void vc5_hdmi_set_timings(struct +@@ -848,13 +918,18 @@ static void vc5_hdmi_set_timings(struct HDMI_WRITE(HDMI_GCP_CONFIG, reg); HDMI_WRITE(HDMI_CLOCK_STOP, 0); @@ -314,7 +314,7 @@ Signed-off-by: Maxime Ripard drift = HDMI_READ(HDMI_FIFO_CTL); drift &= VC4_HDMI_FIFO_VALID_WRITE_MASK; -@@ -861,12 +936,20 @@ static void vc4_hdmi_recenter_fifo(struc +@@ -862,12 +937,20 @@ static void vc4_hdmi_recenter_fifo(struc drift & ~VC4_HDMI_FIFO_CTL_RECENTER); HDMI_WRITE(HDMI_FIFO_CTL, drift | VC4_HDMI_FIFO_CTL_RECENTER); @@ -335,7 +335,7 @@ Signed-off-by: Maxime Ripard ret = wait_for(HDMI_READ(HDMI_FIFO_CTL) & VC4_HDMI_FIFO_CTL_RECENTER_DONE, 1); WARN_ONCE(ret, "Timeout waiting for " -@@ -900,6 +983,7 @@ static void vc4_hdmi_encoder_pre_crtc_co +@@ -901,6 +984,7 @@ static void vc4_hdmi_encoder_pre_crtc_co struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); unsigned long pixel_rate = vc4_conn_state->pixel_rate; unsigned long bvb_rate, hsm_rate; @@ -343,7 +343,7 @@ Signed-off-by: Maxime Ripard int ret; /* -@@ -968,11 +1052,15 @@ static void vc4_hdmi_encoder_pre_crtc_co +@@ -969,11 +1053,15 @@ static void vc4_hdmi_encoder_pre_crtc_co if (vc4_hdmi->variant->phy_init) vc4_hdmi->variant->phy_init(vc4_hdmi, vc4_conn_state); @@ -359,7 +359,7 @@ Signed-off-by: Maxime Ripard if (vc4_hdmi->variant->set_timings) vc4_hdmi->variant->set_timings(vc4_hdmi, conn_state, mode); -@@ -992,6 +1080,7 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -993,6 +1081,7 @@ static void vc4_hdmi_encoder_pre_crtc_en struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode; struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder); struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -367,7 +367,7 @@ Signed-off-by: Maxime Ripard if (vc4_encoder->hdmi_monitor && drm_default_rgb_quant_range(mode) == HDMI_QUANTIZATION_RANGE_LIMITED) { -@@ -1006,7 +1095,9 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -1007,7 +1096,9 @@ static void vc4_hdmi_encoder_pre_crtc_en vc4_encoder->limited_rgb_range = false; } @@ -377,7 +377,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder, -@@ -1017,8 +1108,11 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1018,8 +1109,11 @@ static void vc4_hdmi_encoder_post_crtc_e struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder); bool hsync_pos = mode->flags & DRM_MODE_FLAG_PHSYNC; bool vsync_pos = mode->flags & DRM_MODE_FLAG_PVSYNC; @@ -389,7 +389,7 @@ Signed-off-by: Maxime Ripard HDMI_WRITE(HDMI_VID_CTL, VC4_HD_VID_CTL_ENABLE | VC4_HD_VID_CTL_CLRRGB | -@@ -1035,6 +1129,8 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1036,6 +1130,8 @@ static void vc4_hdmi_encoder_post_crtc_e HDMI_READ(HDMI_SCHEDULER_CONTROL) | VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI); @@ -398,7 +398,7 @@ Signed-off-by: Maxime Ripard ret = wait_for(HDMI_READ(HDMI_SCHEDULER_CONTROL) & VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE, 1000); WARN_ONCE(ret, "Timeout waiting for " -@@ -1047,6 +1143,8 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1048,6 +1144,8 @@ static void vc4_hdmi_encoder_post_crtc_e HDMI_READ(HDMI_SCHEDULER_CONTROL) & ~VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI); @@ -407,7 +407,7 @@ Signed-off-by: Maxime Ripard ret = wait_for(!(HDMI_READ(HDMI_SCHEDULER_CONTROL) & VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE), 1000); WARN_ONCE(ret, "Timeout waiting for " -@@ -1054,6 +1152,8 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1055,6 +1153,8 @@ static void vc4_hdmi_encoder_post_crtc_e } if (vc4_encoder->hdmi_monitor) { @@ -416,7 +416,7 @@ Signed-off-by: Maxime Ripard WARN_ON(!(HDMI_READ(HDMI_SCHEDULER_CONTROL) & VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE)); HDMI_WRITE(HDMI_SCHEDULER_CONTROL, -@@ -1063,6 +1163,8 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1064,6 +1164,8 @@ static void vc4_hdmi_encoder_post_crtc_e HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, VC4_HDMI_RAM_PACKET_ENABLE); @@ -425,7 +425,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi_set_infoframes(encoder); } -@@ -1186,6 +1288,7 @@ static void vc4_hdmi_audio_set_mai_clock +@@ -1187,6 +1289,7 @@ static void vc4_hdmi_audio_set_mai_clock unsigned int samplerate) { u32 hsm_clock = clk_get_rate(vc4_hdmi->audio_clock); @@ -433,7 +433,7 @@ Signed-off-by: Maxime Ripard unsigned long n, m; rational_best_approximation(hsm_clock, samplerate, -@@ -1195,9 +1298,11 @@ static void vc4_hdmi_audio_set_mai_clock +@@ -1196,9 +1299,11 @@ static void vc4_hdmi_audio_set_mai_clock VC4_HD_MAI_SMP_M_SHIFT) + 1, &n, &m); @@ -445,7 +445,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_set_n_cts(struct vc4_hdmi *vc4_hdmi, unsigned int samplerate) -@@ -1208,6 +1313,8 @@ static void vc4_hdmi_set_n_cts(struct vc +@@ -1209,6 +1314,8 @@ static void vc4_hdmi_set_n_cts(struct vc u32 n, cts; u64 tmp; @@ -454,7 +454,7 @@ Signed-off-by: Maxime Ripard n = 128 * samplerate / 1000; tmp = (u64)(mode->clock * 1000) * n; do_div(tmp, 128 * samplerate); -@@ -1237,6 +1344,7 @@ static int vc4_hdmi_audio_startup(struct +@@ -1238,6 +1345,7 @@ static int vc4_hdmi_audio_startup(struct { struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); struct drm_encoder *encoder = &vc4_hdmi->encoder.base.base; @@ -462,7 +462,7 @@ Signed-off-by: Maxime Ripard /* * If the HDMI encoder hasn't probed, or the encoder is -@@ -1248,12 +1356,14 @@ static int vc4_hdmi_audio_startup(struct +@@ -1249,12 +1357,14 @@ static int vc4_hdmi_audio_startup(struct vc4_hdmi->audio.streaming = true; @@ -477,7 +477,7 @@ Signed-off-by: Maxime Ripard if (vc4_hdmi->variant->phy_rng_enable) vc4_hdmi->variant->phy_rng_enable(vc4_hdmi); -@@ -1265,6 +1375,7 @@ static void vc4_hdmi_audio_reset(struct +@@ -1266,6 +1376,7 @@ static void vc4_hdmi_audio_reset(struct { struct drm_encoder *encoder = &vc4_hdmi->encoder.base.base; struct device *dev = &vc4_hdmi->pdev->dev; @@ -485,7 +485,7 @@ Signed-off-by: Maxime Ripard int ret; vc4_hdmi->audio.streaming = false; -@@ -1272,20 +1383,29 @@ static void vc4_hdmi_audio_reset(struct +@@ -1273,20 +1384,29 @@ static void vc4_hdmi_audio_reset(struct if (ret) dev_err(dev, "Failed to stop audio infoframe: %d\n", ret); @@ -515,7 +515,7 @@ Signed-off-by: Maxime Ripard if (vc4_hdmi->variant->phy_rng_disable) vc4_hdmi->variant->phy_rng_disable(vc4_hdmi); -@@ -1340,6 +1460,7 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1341,6 +1461,7 @@ static int vc4_hdmi_audio_prepare(struct struct drm_encoder *encoder = &vc4_hdmi->encoder.base.base; unsigned int sample_rate = params->sample_rate; unsigned int channels = params->channels; @@ -523,7 +523,7 @@ Signed-off-by: Maxime Ripard u32 audio_packet_config, channel_mask; u32 channel_map; u32 mai_audio_format; -@@ -1348,14 +1469,15 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1349,14 +1470,15 @@ static int vc4_hdmi_audio_prepare(struct dev_dbg(dev, "%s: %u Hz, %d bit, %d channels\n", __func__, sample_rate, params->sample_width, channels); @@ -541,7 +541,7 @@ Signed-off-by: Maxime Ripard mai_sample_rate = sample_rate_to_mai_fmt(sample_rate); if (params->iec.status[0] & IEC958_AES0_NONAUDIO && params->channels == 8) -@@ -1393,8 +1515,11 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1394,8 +1516,11 @@ static int vc4_hdmi_audio_prepare(struct channel_map = vc4_hdmi->variant->channel_map(vc4_hdmi, channel_mask); HDMI_WRITE(HDMI_MAI_CHANNEL_MAP, channel_map); HDMI_WRITE(HDMI_AUDIO_PACKET_CONFIG, audio_packet_config); @@ -553,7 +553,7 @@ Signed-off-by: Maxime Ripard memcpy(&vc4_hdmi->audio.infoframe, ¶ms->cea, sizeof(params->cea)); vc4_hdmi_set_audio_infoframe(encoder); -@@ -1668,6 +1793,8 @@ static void vc4_cec_read_msg(struct vc4_ +@@ -1669,6 +1794,8 @@ static void vc4_cec_read_msg(struct vc4_ struct cec_msg *msg = &vc4_hdmi->cec_rx_msg; unsigned int i; @@ -562,7 +562,7 @@ Signed-off-by: Maxime Ripard msg->len = 1 + ((cntrl1 & VC4_HDMI_CEC_REC_WRD_CNT_MASK) >> VC4_HDMI_CEC_REC_WRD_CNT_SHIFT); -@@ -1686,11 +1813,12 @@ static void vc4_cec_read_msg(struct vc4_ +@@ -1687,11 +1814,12 @@ static void vc4_cec_read_msg(struct vc4_ } } @@ -577,7 +577,7 @@ Signed-off-by: Maxime Ripard cntrl1 = HDMI_READ(HDMI_CEC_CNTRL_1); vc4_hdmi->cec_tx_ok = cntrl1 & VC4_HDMI_CEC_TX_STATUS_GOOD; cntrl1 &= ~VC4_HDMI_CEC_START_XMIT_BEGIN; -@@ -1699,11 +1827,24 @@ static irqreturn_t vc4_cec_irq_handler_t +@@ -1700,11 +1828,24 @@ static irqreturn_t vc4_cec_irq_handler_t return IRQ_WAKE_THREAD; } @@ -603,7 +603,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi->cec_rx_msg.len = 0; cntrl1 = HDMI_READ(HDMI_CEC_CNTRL_1); vc4_cec_read_msg(vc4_hdmi, cntrl1); -@@ -1716,6 +1857,18 @@ static irqreturn_t vc4_cec_irq_handler_r +@@ -1717,6 +1858,18 @@ static irqreturn_t vc4_cec_irq_handler_r return IRQ_WAKE_THREAD; } @@ -622,7 +622,7 @@ Signed-off-by: Maxime Ripard static irqreturn_t vc4_cec_irq_handler(int irq, void *priv) { struct vc4_hdmi *vc4_hdmi = priv; -@@ -1726,14 +1879,17 @@ static irqreturn_t vc4_cec_irq_handler(i +@@ -1727,14 +1880,17 @@ static irqreturn_t vc4_cec_irq_handler(i if (!(stat & VC4_HDMI_CPU_CEC)) return IRQ_NONE; @@ -642,7 +642,7 @@ Signed-off-by: Maxime Ripard return ret; } -@@ -1742,6 +1898,7 @@ static int vc4_hdmi_cec_enable(struct ce +@@ -1743,6 +1899,7 @@ static int vc4_hdmi_cec_enable(struct ce struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap); /* clock period in microseconds */ const u32 usecs = 1000000 / CEC_CLOCK_FREQ; @@ -650,7 +650,7 @@ Signed-off-by: Maxime Ripard u32 val; int ret; -@@ -1749,6 +1906,8 @@ static int vc4_hdmi_cec_enable(struct ce +@@ -1750,6 +1907,8 @@ static int vc4_hdmi_cec_enable(struct ce if (ret) return ret; @@ -659,7 +659,7 @@ Signed-off-by: Maxime Ripard val = HDMI_READ(HDMI_CEC_CNTRL_5); val &= ~(VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET | VC4_HDMI_CEC_CNT_TO_4700_US_MASK | -@@ -1779,12 +1938,17 @@ static int vc4_hdmi_cec_enable(struct ce +@@ -1780,12 +1939,17 @@ static int vc4_hdmi_cec_enable(struct ce if (!vc4_hdmi->variant->external_irq_controller) HDMI_WRITE(HDMI_CEC_CPU_MASK_CLEAR, VC4_HDMI_CPU_CEC); @@ -677,7 +677,7 @@ Signed-off-by: Maxime Ripard if (!vc4_hdmi->variant->external_irq_controller) HDMI_WRITE(HDMI_CEC_CPU_MASK_SET, VC4_HDMI_CPU_CEC); -@@ -1792,6 +1956,8 @@ static int vc4_hdmi_cec_disable(struct c +@@ -1793,6 +1957,8 @@ static int vc4_hdmi_cec_disable(struct c HDMI_WRITE(HDMI_CEC_CNTRL_5, HDMI_READ(HDMI_CEC_CNTRL_5) | VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET); @@ -686,7 +686,7 @@ Signed-off-by: Maxime Ripard pm_runtime_put(&vc4_hdmi->pdev->dev); return 0; -@@ -1808,10 +1974,14 @@ static int vc4_hdmi_cec_adap_enable(stru +@@ -1809,10 +1975,14 @@ static int vc4_hdmi_cec_adap_enable(stru static int vc4_hdmi_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) { struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap); @@ -701,7 +701,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1820,6 +1990,7 @@ static int vc4_hdmi_cec_adap_transmit(st +@@ -1821,6 +1991,7 @@ static int vc4_hdmi_cec_adap_transmit(st { struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap); struct drm_device *dev = vc4_hdmi->connector.dev; @@ -709,7 +709,7 @@ Signed-off-by: Maxime Ripard u32 val; unsigned int i; -@@ -1828,6 +1999,8 @@ static int vc4_hdmi_cec_adap_transmit(st +@@ -1829,6 +2000,8 @@ static int vc4_hdmi_cec_adap_transmit(st return -ENOMEM; } @@ -718,7 +718,7 @@ Signed-off-by: Maxime Ripard for (i = 0; i < msg->len; i += 4) HDMI_WRITE(HDMI_CEC_TX_DATA_1 + (i >> 2), (msg->msg[i]) | -@@ -1843,6 +2016,9 @@ static int vc4_hdmi_cec_adap_transmit(st +@@ -1844,6 +2017,9 @@ static int vc4_hdmi_cec_adap_transmit(st val |= VC4_HDMI_CEC_START_XMIT_BEGIN; HDMI_WRITE(HDMI_CEC_CNTRL_1, val); @@ -728,7 +728,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1857,6 +2033,7 @@ static int vc4_hdmi_cec_init(struct vc4_ +@@ -1858,6 +2034,7 @@ static int vc4_hdmi_cec_init(struct vc4_ struct cec_connector_info conn_info; struct platform_device *pdev = vc4_hdmi->pdev; struct device *dev = &pdev->dev; @@ -736,7 +736,7 @@ Signed-off-by: Maxime Ripard u32 value; int ret; -@@ -1876,10 +2053,12 @@ static int vc4_hdmi_cec_init(struct vc4_ +@@ -1877,10 +2054,12 @@ static int vc4_hdmi_cec_init(struct vc4_ cec_fill_conn_info_from_drm(&conn_info, &vc4_hdmi->connector); cec_s_conn_info(vc4_hdmi->cec_adap, &conn_info); @@ -749,7 +749,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi_cec_update_clk_div(vc4_hdmi); -@@ -1898,7 +2077,9 @@ static int vc4_hdmi_cec_init(struct vc4_ +@@ -1899,7 +2078,9 @@ static int vc4_hdmi_cec_init(struct vc4_ if (ret) goto err_remove_cec_rx_handler; } else { @@ -759,7 +759,7 @@ Signed-off-by: Maxime Ripard ret = request_threaded_irq(platform_get_irq(pdev, 0), vc4_cec_irq_handler, -@@ -2168,6 +2349,7 @@ static int vc4_hdmi_bind(struct device * +@@ -2169,6 +2350,7 @@ static int vc4_hdmi_bind(struct device * vc4_hdmi = devm_kzalloc(dev, sizeof(*vc4_hdmi), GFP_KERNEL); if (!vc4_hdmi) return -ENOMEM; diff --git a/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch b/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch index 2298c0d812..f3f4e14903 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch @@ -38,7 +38,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -188,6 +188,8 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -189,6 +189,8 @@ vc4_hdmi_connector_detect(struct drm_con struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector); bool connected = false; @@ -47,7 +47,7 @@ Signed-off-by: Maxime Ripard WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev)); if (vc4_hdmi->hpd_gpio) { -@@ -218,11 +220,13 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -219,11 +221,13 @@ vc4_hdmi_connector_detect(struct drm_con vc4_hdmi_enable_scrambling(&vc4_hdmi->encoder.base.base); pm_runtime_put(&vc4_hdmi->pdev->dev); @@ -61,7 +61,7 @@ Signed-off-by: Maxime Ripard return connector_status_disconnected; } -@@ -239,10 +243,14 @@ static int vc4_hdmi_connector_get_modes( +@@ -240,10 +244,14 @@ static int vc4_hdmi_connector_get_modes( int ret = 0; struct edid *edid; @@ -78,7 +78,7 @@ Signed-off-by: Maxime Ripard vc4_encoder->hdmi_monitor = drm_detect_hdmi_monitor(edid); -@@ -262,6 +270,9 @@ static int vc4_hdmi_connector_get_modes( +@@ -263,6 +271,9 @@ static int vc4_hdmi_connector_get_modes( } } @@ -88,7 +88,7 @@ Signed-off-by: Maxime Ripard return ret; } -@@ -478,6 +489,8 @@ static void vc4_hdmi_set_avi_infoframe(s +@@ -479,6 +490,8 @@ static void vc4_hdmi_set_avi_infoframe(s union hdmi_infoframe frame; int ret; @@ -97,7 +97,7 @@ Signed-off-by: Maxime Ripard ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, connector, mode); if (ret < 0) { -@@ -529,6 +542,8 @@ static void vc4_hdmi_set_hdr_infoframe(s +@@ -530,6 +543,8 @@ static void vc4_hdmi_set_hdr_infoframe(s struct drm_connector_state *conn_state = connector->state; union hdmi_infoframe frame; @@ -106,7 +106,7 @@ Signed-off-by: Maxime Ripard if (!vc4_hdmi->variant->supports_hdr) return; -@@ -545,6 +560,8 @@ static void vc4_hdmi_set_infoframes(stru +@@ -546,6 +561,8 @@ static void vc4_hdmi_set_infoframes(stru { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -115,7 +115,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi_set_avi_infoframe(encoder); vc4_hdmi_set_spd_infoframe(encoder); /* -@@ -564,6 +581,8 @@ static bool vc4_hdmi_supports_scrambling +@@ -565,6 +582,8 @@ static bool vc4_hdmi_supports_scrambling struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); struct drm_display_info *display = &vc4_hdmi->connector.display_info; @@ -124,7 +124,7 @@ Signed-off-by: Maxime Ripard if (!vc4_encoder->hdmi_monitor) return false; -@@ -582,6 +601,8 @@ static void vc4_hdmi_enable_scrambling(s +@@ -583,6 +602,8 @@ static void vc4_hdmi_enable_scrambling(s struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); unsigned long flags; @@ -133,7 +133,7 @@ Signed-off-by: Maxime Ripard if (!vc4_hdmi_supports_scrambling(encoder, mode)) return; -@@ -651,6 +672,8 @@ static void vc4_hdmi_encoder_post_crtc_d +@@ -652,6 +673,8 @@ static void vc4_hdmi_encoder_post_crtc_d struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); unsigned long flags; @@ -142,7 +142,7 @@ Signed-off-by: Maxime Ripard spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, 0); -@@ -667,6 +690,8 @@ static void vc4_hdmi_encoder_post_crtc_d +@@ -668,6 +691,8 @@ static void vc4_hdmi_encoder_post_crtc_d spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); vc4_hdmi_disable_scrambling(encoder); @@ -151,7 +151,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder, -@@ -676,6 +701,8 @@ static void vc4_hdmi_encoder_post_crtc_p +@@ -677,6 +702,8 @@ static void vc4_hdmi_encoder_post_crtc_p unsigned long flags; int ret; @@ -160,7 +160,7 @@ Signed-off-by: Maxime Ripard spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_VID_CTL, HDMI_READ(HDMI_VID_CTL) | VC4_HD_VID_CTL_BLANKPIX); -@@ -690,6 +717,8 @@ static void vc4_hdmi_encoder_post_crtc_p +@@ -691,6 +718,8 @@ static void vc4_hdmi_encoder_post_crtc_p ret = pm_runtime_put(&vc4_hdmi->pdev->dev); if (ret < 0) DRM_ERROR("Failed to release power domain: %d\n", ret); @@ -169,7 +169,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder) -@@ -986,6 +1015,8 @@ static void vc4_hdmi_encoder_pre_crtc_co +@@ -987,6 +1016,8 @@ static void vc4_hdmi_encoder_pre_crtc_co unsigned long flags; int ret; @@ -178,7 +178,7 @@ Signed-off-by: Maxime Ripard /* * As stated in RPi's vc4 firmware "HDMI state machine (HSM) clock must * be faster than pixel clock, infinitesimally faster, tested in -@@ -1006,13 +1037,13 @@ static void vc4_hdmi_encoder_pre_crtc_co +@@ -1007,13 +1038,13 @@ static void vc4_hdmi_encoder_pre_crtc_co ret = clk_set_min_rate(vc4_hdmi->hsm_clock, hsm_rate); if (ret) { DRM_ERROR("Failed to set HSM clock rate: %d\n", ret); @@ -194,7 +194,7 @@ Signed-off-by: Maxime Ripard } ret = clk_set_rate(vc4_hdmi->pixel_clock, pixel_rate); -@@ -1064,13 +1095,16 @@ static void vc4_hdmi_encoder_pre_crtc_co +@@ -1065,13 +1096,16 @@ static void vc4_hdmi_encoder_pre_crtc_co if (vc4_hdmi->variant->set_timings) vc4_hdmi->variant->set_timings(vc4_hdmi, conn_state, mode); @@ -212,7 +212,7 @@ Signed-off-by: Maxime Ripard return; } -@@ -1082,6 +1116,8 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -1083,6 +1117,8 @@ static void vc4_hdmi_encoder_pre_crtc_en struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); unsigned long flags; @@ -221,7 +221,7 @@ Signed-off-by: Maxime Ripard if (vc4_encoder->hdmi_monitor && drm_default_rgb_quant_range(mode) == HDMI_QUANTIZATION_RANGE_LIMITED) { if (vc4_hdmi->variant->csc_setup) -@@ -1098,6 +1134,8 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -1099,6 +1135,8 @@ static void vc4_hdmi_encoder_pre_crtc_en spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_FIFO_CTL, VC4_HDMI_FIFO_CTL_MASTER_SLAVE_N); spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); @@ -230,7 +230,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder, -@@ -1111,6 +1149,8 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1112,6 +1150,8 @@ static void vc4_hdmi_encoder_post_crtc_e unsigned long flags; int ret; @@ -239,7 +239,7 @@ Signed-off-by: Maxime Ripard spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_VID_CTL, -@@ -1170,6 +1210,8 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1171,6 +1211,8 @@ static void vc4_hdmi_encoder_post_crtc_e vc4_hdmi_recenter_fifo(vc4_hdmi); vc4_hdmi_enable_scrambling(encoder); @@ -248,7 +248,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder) -@@ -1313,6 +1355,7 @@ static void vc4_hdmi_set_n_cts(struct vc +@@ -1314,6 +1356,7 @@ static void vc4_hdmi_set_n_cts(struct vc u32 n, cts; u64 tmp; @@ -256,7 +256,7 @@ Signed-off-by: Maxime Ripard lockdep_assert_held(&vc4_hdmi->hw_lock); n = 128 * samplerate / 1000; -@@ -1346,13 +1389,17 @@ static int vc4_hdmi_audio_startup(struct +@@ -1347,13 +1390,17 @@ static int vc4_hdmi_audio_startup(struct struct drm_encoder *encoder = &vc4_hdmi->encoder.base.base; unsigned long flags; @@ -275,7 +275,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi->audio.streaming = true; -@@ -1368,6 +1415,8 @@ static int vc4_hdmi_audio_startup(struct +@@ -1369,6 +1416,8 @@ static int vc4_hdmi_audio_startup(struct if (vc4_hdmi->variant->phy_rng_enable) vc4_hdmi->variant->phy_rng_enable(vc4_hdmi); @@ -284,7 +284,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1378,6 +1427,8 @@ static void vc4_hdmi_audio_reset(struct +@@ -1379,6 +1428,8 @@ static void vc4_hdmi_audio_reset(struct unsigned long flags; int ret; @@ -293,7 +293,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi->audio.streaming = false; ret = vc4_hdmi_stop_packet(encoder, HDMI_INFOFRAME_TYPE_AUDIO, false); if (ret) -@@ -1397,6 +1448,8 @@ static void vc4_hdmi_audio_shutdown(stru +@@ -1398,6 +1449,8 @@ static void vc4_hdmi_audio_shutdown(stru struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); unsigned long flags; @@ -302,7 +302,7 @@ Signed-off-by: Maxime Ripard spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_MAI_CTL, -@@ -1411,6 +1464,8 @@ static void vc4_hdmi_audio_shutdown(stru +@@ -1412,6 +1465,8 @@ static void vc4_hdmi_audio_shutdown(stru vc4_hdmi->audio.streaming = false; vc4_hdmi_audio_reset(vc4_hdmi); @@ -311,7 +311,7 @@ Signed-off-by: Maxime Ripard } static int sample_rate_to_mai_fmt(int samplerate) -@@ -1469,6 +1524,8 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1470,6 +1525,8 @@ static int vc4_hdmi_audio_prepare(struct dev_dbg(dev, "%s: %u Hz, %d bit, %d channels\n", __func__, sample_rate, params->sample_width, channels); @@ -320,7 +320,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi_audio_set_mai_clock(vc4_hdmi, sample_rate); spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); -@@ -1523,6 +1580,8 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1524,6 +1581,8 @@ static int vc4_hdmi_audio_prepare(struct memcpy(&vc4_hdmi->audio.infoframe, ¶ms->cea, sizeof(params->cea)); vc4_hdmi_set_audio_infoframe(encoder); @@ -329,7 +329,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1565,7 +1624,9 @@ static int vc4_hdmi_audio_get_eld(struct +@@ -1566,7 +1625,9 @@ static int vc4_hdmi_audio_get_eld(struct struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); struct drm_connector *connector = &vc4_hdmi->connector; @@ -339,7 +339,7 @@ Signed-off-by: Maxime Ripard return 0; } -@@ -1902,6 +1963,17 @@ static int vc4_hdmi_cec_enable(struct ce +@@ -1903,6 +1964,17 @@ static int vc4_hdmi_cec_enable(struct ce u32 val; int ret; @@ -357,7 +357,7 @@ Signed-off-by: Maxime Ripard ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev); if (ret) return ret; -@@ -1948,6 +2020,17 @@ static int vc4_hdmi_cec_disable(struct c +@@ -1949,6 +2021,17 @@ static int vc4_hdmi_cec_disable(struct c struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap); unsigned long flags; @@ -375,7 +375,7 @@ Signed-off-by: Maxime Ripard spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); if (!vc4_hdmi->variant->external_irq_controller) -@@ -1976,6 +2059,17 @@ static int vc4_hdmi_cec_adap_log_addr(st +@@ -1977,6 +2060,17 @@ static int vc4_hdmi_cec_adap_log_addr(st struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap); unsigned long flags; @@ -393,7 +393,7 @@ Signed-off-by: Maxime Ripard spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_CEC_CNTRL_1, (HDMI_READ(HDMI_CEC_CNTRL_1) & ~VC4_HDMI_CEC_ADDR_MASK) | -@@ -1994,6 +2088,17 @@ static int vc4_hdmi_cec_adap_transmit(st +@@ -1995,6 +2089,17 @@ static int vc4_hdmi_cec_adap_transmit(st u32 val; unsigned int i; @@ -411,7 +411,7 @@ Signed-off-by: Maxime Ripard if (msg->len > 16) { drm_err(dev, "Attempting to transmit too much data (%d)\n", msg->len); return -ENOMEM; -@@ -2349,6 +2454,7 @@ static int vc4_hdmi_bind(struct device * +@@ -2350,6 +2455,7 @@ static int vc4_hdmi_bind(struct device * vc4_hdmi = devm_kzalloc(dev, sizeof(*vc4_hdmi), GFP_KERNEL); if (!vc4_hdmi) return -ENOMEM; diff --git a/target/linux/bcm27xx/patches-5.15/950-0009-drm-vc4-hdmi-Prevent-access-to-crtc-state-outside-of.patch b/target/linux/bcm27xx/patches-5.15/950-0009-drm-vc4-hdmi-Prevent-access-to-crtc-state-outside-of.patch index 7d29e95514..db65832d9b 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0009-drm-vc4-hdmi-Prevent-access-to-crtc-state-outside-of.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0009-drm-vc4-hdmi-Prevent-access-to-crtc-state-outside-of.patch @@ -29,7 +29,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -484,8 +484,7 @@ static void vc4_hdmi_set_avi_infoframe(s +@@ -485,8 +485,7 @@ static void vc4_hdmi_set_avi_infoframe(s struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder); struct drm_connector *connector = &vc4_hdmi->connector; struct drm_connector_state *cstate = connector->state; @@ -39,7 +39,7 @@ Signed-off-by: Maxime Ripard union hdmi_infoframe frame; int ret; -@@ -597,8 +596,8 @@ static bool vc4_hdmi_supports_scrambling +@@ -598,8 +597,8 @@ static bool vc4_hdmi_supports_scrambling static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder) { @@ -49,7 +49,7 @@ Signed-off-by: Maxime Ripard unsigned long flags; lockdep_assert_held(&vc4_hdmi->mutex); -@@ -624,18 +623,21 @@ static void vc4_hdmi_enable_scrambling(s +@@ -625,18 +624,21 @@ static void vc4_hdmi_enable_scrambling(s static void vc4_hdmi_disable_scrambling(struct drm_encoder *encoder) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard return; if (delayed_work_pending(&vc4_hdmi->scrambling_work)) -@@ -1008,8 +1010,8 @@ static void vc4_hdmi_encoder_pre_crtc_co +@@ -1009,8 +1011,8 @@ static void vc4_hdmi_encoder_pre_crtc_co vc4_hdmi_encoder_get_connector_state(encoder, state); struct vc4_hdmi_connector_state *vc4_conn_state = conn_state_to_vc4_hdmi_conn_state(conn_state); @@ -83,7 +83,7 @@ Signed-off-by: Maxime Ripard unsigned long pixel_rate = vc4_conn_state->pixel_rate; unsigned long bvb_rate, hsm_rate; unsigned long flags; -@@ -1111,9 +1113,9 @@ out: +@@ -1112,9 +1114,9 @@ out: static void vc4_hdmi_encoder_pre_crtc_enable(struct drm_encoder *encoder, struct drm_atomic_state *state) { @@ -95,7 +95,7 @@ Signed-off-by: Maxime Ripard unsigned long flags; mutex_lock(&vc4_hdmi->mutex); -@@ -1141,8 +1143,8 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -1142,8 +1144,8 @@ static void vc4_hdmi_encoder_pre_crtc_en static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder, struct drm_atomic_state *state) { @@ -105,7 +105,7 @@ Signed-off-by: Maxime Ripard struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder); bool hsync_pos = mode->flags & DRM_MODE_FLAG_PHSYNC; bool vsync_pos = mode->flags & DRM_MODE_FLAG_PVSYNC; -@@ -1218,6 +1220,19 @@ static void vc4_hdmi_encoder_enable(stru +@@ -1219,6 +1221,19 @@ static void vc4_hdmi_encoder_enable(stru { } @@ -125,7 +125,7 @@ Signed-off-by: Maxime Ripard #define WIFI_2_4GHz_CH1_MIN_FREQ 2400000000ULL #define WIFI_2_4GHz_CH1_MAX_FREQ 2422000000ULL -@@ -1296,6 +1311,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_e +@@ -1297,6 +1312,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_e static const struct drm_encoder_helper_funcs vc4_hdmi_encoder_helper_funcs = { .atomic_check = vc4_hdmi_encoder_atomic_check, @@ -133,7 +133,7 @@ Signed-off-by: Maxime Ripard .mode_valid = vc4_hdmi_encoder_mode_valid, .disable = vc4_hdmi_encoder_disable, .enable = vc4_hdmi_encoder_enable, -@@ -1349,9 +1365,7 @@ static void vc4_hdmi_audio_set_mai_clock +@@ -1350,9 +1366,7 @@ static void vc4_hdmi_audio_set_mai_clock static void vc4_hdmi_set_n_cts(struct vc4_hdmi *vc4_hdmi, unsigned int samplerate) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0010-drm-vc4-hdmi-Check-the-device-state-in-prepare.patch b/target/linux/bcm27xx/patches-5.15/950-0010-drm-vc4-hdmi-Check-the-device-state-in-prepare.patch index dac66f902b..1361850d00 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0010-drm-vc4-hdmi-Check-the-device-state-in-prepare.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0010-drm-vc4-hdmi-Check-the-device-state-in-prepare.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1397,20 +1397,36 @@ static inline struct vc4_hdmi *dai_to_hd +@@ -1398,20 +1398,36 @@ static inline struct vc4_hdmi *dai_to_hd return snd_soc_card_get_drvdata(card); } @@ -63,7 +63,7 @@ Signed-off-by: Maxime Ripard mutex_unlock(&vc4_hdmi->mutex); return -ENODEV; } -@@ -1540,6 +1556,11 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1541,6 +1557,11 @@ static int vc4_hdmi_audio_prepare(struct mutex_lock(&vc4_hdmi->mutex); diff --git a/target/linux/bcm27xx/patches-5.15/950-0011-drm-vc4-hdmi-Introduce-an-output_enabled-flag.patch b/target/linux/bcm27xx/patches-5.15/950-0011-drm-vc4-hdmi-Introduce-an-output_enabled-flag.patch index 616cfd54d1..0e04ba7924 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0011-drm-vc4-hdmi-Introduce-an-output_enabled-flag.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0011-drm-vc4-hdmi-Introduce-an-output_enabled-flag.patch @@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -725,6 +725,11 @@ static void vc4_hdmi_encoder_post_crtc_p +@@ -726,6 +726,11 @@ static void vc4_hdmi_encoder_post_crtc_p static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder) { @@ -32,7 +32,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi, bool enable) -@@ -1218,6 +1223,11 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1219,6 +1224,11 @@ static void vc4_hdmi_encoder_post_crtc_e static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder) { @@ -44,7 +44,7 @@ Signed-off-by: Maxime Ripard } static void vc4_hdmi_encoder_atomic_mode_set(struct drm_encoder *encoder, -@@ -1399,14 +1409,12 @@ static inline struct vc4_hdmi *dai_to_hd +@@ -1400,14 +1410,12 @@ static inline struct vc4_hdmi *dai_to_hd static bool vc4_hdmi_audio_can_stream(struct vc4_hdmi *vc4_hdmi) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0012-drm-vc4-hdmi-Introduce-a-scdc_enabled-flag.patch b/target/linux/bcm27xx/patches-5.15/950-0012-drm-vc4-hdmi-Introduce-a-scdc_enabled-flag.patch index 888de174e2..13601ede9a 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0012-drm-vc4-hdmi-Introduce-a-scdc_enabled-flag.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0012-drm-vc4-hdmi-Introduce-a-scdc_enabled-flag.patch @@ -35,7 +35,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -616,6 +616,8 @@ static void vc4_hdmi_enable_scrambling(s +@@ -617,6 +617,8 @@ static void vc4_hdmi_enable_scrambling(s VC5_HDMI_SCRAMBLER_CTL_ENABLE); spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); @@ -44,7 +44,7 @@ Signed-off-by: Maxime Ripard queue_delayed_work(system_wq, &vc4_hdmi->scrambling_work, msecs_to_jiffies(SCRAMBLING_POLLING_DELAY_MS)); } -@@ -623,22 +625,14 @@ static void vc4_hdmi_enable_scrambling(s +@@ -624,22 +626,14 @@ static void vc4_hdmi_enable_scrambling(s static void vc4_hdmi_disable_scrambling(struct drm_encoder *encoder) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -69,7 +69,7 @@ Signed-off-by: Maxime Ripard if (delayed_work_pending(&vc4_hdmi->scrambling_work)) cancel_delayed_work_sync(&vc4_hdmi->scrambling_work); -@@ -2512,6 +2506,14 @@ static int vc4_hdmi_bind(struct device * +@@ -2513,6 +2507,14 @@ static int vc4_hdmi_bind(struct device * vc4_hdmi->pdev = pdev; vc4_hdmi->variant = variant; diff --git a/target/linux/bcm27xx/patches-5.15/950-0021-drm-vc4-hdmi-Actually-check-for-the-connector-status.patch b/target/linux/bcm27xx/patches-5.15/950-0021-drm-vc4-hdmi-Actually-check-for-the-connector-status.patch index 44e4d66cc3..d7d207f7db 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0021-drm-vc4-hdmi-Actually-check-for-the-connector-status.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0021-drm-vc4-hdmi-Actually-check-for-the-connector-status.patch @@ -44,7 +44,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1792,10 +1792,11 @@ static void vc4_hdmi_audio_exit(struct v +@@ -1793,10 +1793,11 @@ static void vc4_hdmi_audio_exit(struct v static irqreturn_t vc4_hdmi_hpd_irq_thread(int irq, void *priv) { struct vc4_hdmi *vc4_hdmi = priv; diff --git a/target/linux/bcm27xx/patches-5.15/950-0144-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.15/950-0144-bcmgenet-Better-coalescing-parameter-defaults.patch index 462f8a8e5a..17512cfcc2 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0144-bcmgenet-Better-coalescing-parameter-defaults.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0144-bcmgenet-Better-coalescing-parameter-defaults.patch @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell /* Disable rate control for now */ bcmgenet_tdma_ring_writel(priv, index, flow_period_val, TDMA_FLOW_PERIOD); -@@ -4071,9 +4071,12 @@ static int bcmgenet_probe(struct platfor +@@ -4075,9 +4075,12 @@ static int bcmgenet_probe(struct platfor netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1); /* Set default coalescing parameters */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0292-net-bcmgenet-Reset-RBUF-on-first-open.patch b/target/linux/bcm27xx/patches-5.15/950-0292-net-bcmgenet-Reset-RBUF-on-first-open.patch index 06f757ad9d..42df30457b 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0292-net-bcmgenet-Reset-RBUF-on-first-open.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0292-net-bcmgenet-Reset-RBUF-on-first-open.patch @@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell /* Reinitialize TDMA and RDMA and SW housekeeping */ ret = bcmgenet_init_dma(priv); -@@ -4200,7 +4208,7 @@ static int bcmgenet_resume(struct device +@@ -4204,7 +4212,7 @@ static int bcmgenet_resume(struct device bcmgenet_hfb_create_rxnfc_filter(priv, rule); /* Disable RX/TX DMA and flush TX queues */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0425-drm-vc4-A-present-but-empty-dmas-disables-audio.patch b/target/linux/bcm27xx/patches-5.15/950-0425-drm-vc4-A-present-but-empty-dmas-disables-audio.patch index eb3528cf66..261035d4b4 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0425-drm-vc4-A-present-but-empty-dmas-disables-audio.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0425-drm-vc4-A-present-but-empty-dmas-disables-audio.patch @@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1692,10 +1692,12 @@ static int vc4_hdmi_audio_init(struct vc +@@ -1693,10 +1693,12 @@ static int vc4_hdmi_audio_init(struct vc const __be32 *addr; int index; int ret; diff --git a/target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch b/target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch index feedea8f43..fdc2139c5e 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch @@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -112,6 +112,12 @@ static int vc4_hdmi_debugfs_regs(struct +@@ -113,6 +113,12 @@ static int vc4_hdmi_debugfs_regs(struct drm_print_regset32(&p, &vc4_hdmi->hdmi_regset); drm_print_regset32(&p, &vc4_hdmi->hd_regset); @@ -29,7 +29,7 @@ Signed-off-by: Dave Stevenson return 0; } -@@ -2361,6 +2367,7 @@ static int vc5_hdmi_init_resources(struc +@@ -2362,6 +2368,7 @@ static int vc5_hdmi_init_resources(struc struct platform_device *pdev = vc4_hdmi->pdev; struct device *dev = &pdev->dev; struct resource *res; @@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hdmi"); if (!res) -@@ -2457,6 +2464,38 @@ static int vc5_hdmi_init_resources(struc +@@ -2458,6 +2465,38 @@ static int vc5_hdmi_init_resources(struc return PTR_ERR(vc4_hdmi->reset); } diff --git a/target/linux/bcm27xx/patches-5.15/950-0429-vc4_hdmi-Report-that-3d-stereo-is-allowed.patch b/target/linux/bcm27xx/patches-5.15/950-0429-vc4_hdmi-Report-that-3d-stereo-is-allowed.patch index 6ff1ed9d3e..b823897c64 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0429-vc4_hdmi-Report-that-3d-stereo-is-allowed.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0429-vc4_hdmi-Report-that-3d-stereo-is-allowed.patch @@ -10,7 +10,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -398,6 +398,7 @@ static int vc4_hdmi_connector_init(struc +@@ -399,6 +399,7 @@ static int vc4_hdmi_connector_init(struc connector->interlace_allowed = 1; connector->doublescan_allowed = 0; diff --git a/target/linux/bcm27xx/patches-5.15/950-0430-vc4-Clear-unused-infoframe-packet-RAM-registers.patch b/target/linux/bcm27xx/patches-5.15/950-0430-vc4-Clear-unused-infoframe-packet-RAM-registers.patch index df693920dc..ac08e34af3 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0430-vc4-Clear-unused-infoframe-packet-RAM-registers.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0430-vc4-Clear-unused-infoframe-packet-RAM-registers.patch @@ -16,7 +16,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -436,9 +436,11 @@ static void vc4_hdmi_write_infoframe(str +@@ -437,9 +437,11 @@ static void vc4_hdmi_write_infoframe(str const struct vc4_hdmi_register *ram_packet_start = &vc4_hdmi->variant->registers[HDMI_RAM_PACKET_START]; u32 packet_reg = ram_packet_start->offset + VC4_HDMI_PACKET_STRIDE * packet_id; @@ -29,7 +29,7 @@ Signed-off-by: Dom Cobley unsigned long flags; ssize_t len, i; int ret; -@@ -474,6 +476,13 @@ static void vc4_hdmi_write_infoframe(str +@@ -475,6 +477,13 @@ static void vc4_hdmi_write_infoframe(str packet_reg += 4; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0432-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch b/target/linux/bcm27xx/patches-5.15/950-0432-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch index 477ad923e7..4c0e8c2d6c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0432-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0432-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch @@ -15,7 +15,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1612,10 +1612,10 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1613,10 +1613,10 @@ static int vc4_hdmi_audio_prepare(struct /* Set the MAI threshold */ HDMI_WRITE(HDMI_MAI_THR, diff --git a/target/linux/bcm27xx/patches-5.15/950-0442-drm-vc4-hdmi-Simplify-the-connector-state-retrieval.patch b/target/linux/bcm27xx/patches-5.15/950-0442-drm-vc4-hdmi-Simplify-the-connector-state-retrieval.patch index b84a607ea0..93b8a3971a 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0442-drm-vc4-hdmi-Simplify-the-connector-state-retrieval.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0442-drm-vc4-hdmi-Simplify-the-connector-state-retrieval.patch @@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1002,30 +1002,15 @@ static void vc4_hdmi_recenter_fifo(struc +@@ -1003,30 +1003,15 @@ static void vc4_hdmi_recenter_fifo(struc "VC4_HDMI_FIFO_CTL_RECENTER_DONE"); } diff --git a/target/linux/bcm27xx/patches-5.15/950-0443-drm-vc4-Fix-timings-for-interlaced-modes.patch b/target/linux/bcm27xx/patches-5.15/950-0443-drm-vc4-Fix-timings-for-interlaced-modes.patch index 20cb8d3ad7..a6d88d1ec1 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0443-drm-vc4-Fix-timings-for-interlaced-modes.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0443-drm-vc4-Fix-timings-for-interlaced-modes.patch @@ -49,7 +49,7 @@ Signed-off-by: Mateusz Kwiatkowski } else { --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -840,12 +840,12 @@ static void vc4_hdmi_set_timings(struct +@@ -841,12 +841,12 @@ static void vc4_hdmi_set_timings(struct VC4_HDMI_VERTA_VFP) | VC4_SET_FIELD(mode->crtc_vdisplay, VC4_HDMI_VERTA_VAL)); u32 vertb = (VC4_SET_FIELD(0, VC4_HDMI_VERTB_VSPO) | @@ -65,7 +65,7 @@ Signed-off-by: Mateusz Kwiatkowski VC4_HDMI_VERTB_VBP)); unsigned long flags; -@@ -891,12 +891,12 @@ static void vc5_hdmi_set_timings(struct +@@ -892,12 +892,12 @@ static void vc5_hdmi_set_timings(struct VC5_HDMI_VERTA_VFP) | VC4_SET_FIELD(mode->crtc_vdisplay, VC5_HDMI_VERTA_VAL)); u32 vertb = (VC4_SET_FIELD(0, VC5_HDMI_VERTB_VSPO) | diff --git a/target/linux/bcm27xx/patches-5.15/950-0475-drm-vc4-Reset-HDMI-MISC_CONTROL-register.patch b/target/linux/bcm27xx/patches-5.15/950-0475-drm-vc4-Reset-HDMI-MISC_CONTROL-register.patch index 64f4e9bd5b..9032f11794 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0475-drm-vc4-Reset-HDMI-MISC_CONTROL-register.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0475-drm-vc4-Reset-HDMI-MISC_CONTROL-register.patch @@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -78,6 +78,9 @@ +@@ -79,6 +79,9 @@ #define VC5_HDMI_VERTB_VSPO_SHIFT 16 #define VC5_HDMI_VERTB_VSPO_MASK VC4_MASK(29, 16) @@ -29,7 +29,7 @@ Signed-off-by: Dave Stevenson #define VC5_HDMI_SCRAMBLER_CTL_ENABLE BIT(0) #define VC5_HDMI_DEEP_COLOR_CONFIG_1_INIT_PACK_PHASE_SHIFT 8 -@@ -962,6 +965,11 @@ static void vc5_hdmi_set_timings(struct +@@ -963,6 +966,11 @@ static void vc5_hdmi_set_timings(struct reg |= gcp_en ? VC5_HDMI_GCP_CONFIG_GCP_ENABLE : 0; HDMI_WRITE(HDMI_GCP_CONFIG, reg); diff --git a/target/linux/bcm27xx/patches-5.15/950-0572-drm-vc4-Don-t-try-disabling-SCDC-on-Pi0-3.patch b/target/linux/bcm27xx/patches-5.15/950-0572-drm-vc4-Don-t-try-disabling-SCDC-on-Pi0-3.patch index 6b7acd8e4a..3bb136f3c0 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0572-drm-vc4-Don-t-try-disabling-SCDC-on-Pi0-3.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0572-drm-vc4-Don-t-try-disabling-SCDC-on-Pi0-3.patch @@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2557,7 +2557,8 @@ static int vc4_hdmi_bind(struct device * +@@ -2558,7 +2558,8 @@ static int vc4_hdmi_bind(struct device * * vc4_hdmi_disable_scrambling() will thus run at boot, make * sure it's disabled, and avoid any inconsistency. */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0580-drm-vc4-Ensure-vc4_hdmi-doesn-t-use-2711-HPD-registe.patch b/target/linux/bcm27xx/patches-5.15/950-0580-drm-vc4-Ensure-vc4_hdmi-doesn-t-use-2711-HPD-registe.patch index c542d240a4..fb4258ca79 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0580-drm-vc4-Ensure-vc4_hdmi-doesn-t-use-2711-HPD-registe.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0580-drm-vc4-Ensure-vc4_hdmi-doesn-t-use-2711-HPD-registe.patch @@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -205,14 +205,8 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -206,14 +206,8 @@ vc4_hdmi_connector_detect(struct drm_con if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) connected = true; } else { @@ -36,7 +36,7 @@ Signed-off-by: Dave Stevenson connected = true; } -@@ -1354,6 +1348,18 @@ static u32 vc5_hdmi_channel_map(struct v +@@ -1355,6 +1349,18 @@ static u32 vc5_hdmi_channel_map(struct v return channel_map; } @@ -55,7 +55,7 @@ Signed-off-by: Dave Stevenson /* HDMI audio codec callbacks */ static void vc4_hdmi_audio_set_mai_clock(struct vc4_hdmi *vc4_hdmi, unsigned int samplerate) -@@ -2778,6 +2784,7 @@ static const struct vc4_hdmi_variant bcm +@@ -2779,6 +2785,7 @@ static const struct vc4_hdmi_variant bcm .phy_rng_disable = vc5_hdmi_phy_rng_disable, .channel_map = vc5_hdmi_channel_map, .supports_hdr = true, @@ -63,7 +63,7 @@ Signed-off-by: Dave Stevenson }; static const struct vc4_hdmi_variant bcm2711_hdmi1_variant = { -@@ -2806,6 +2813,7 @@ static const struct vc4_hdmi_variant bcm +@@ -2807,6 +2814,7 @@ static const struct vc4_hdmi_variant bcm .phy_rng_disable = vc5_hdmi_phy_rng_disable, .channel_map = vc5_hdmi_channel_map, .supports_hdr = true, diff --git a/target/linux/bcm27xx/patches-5.15/950-0590-drm-vc4-Move-HDMI-reset-to-pm_resume.patch b/target/linux/bcm27xx/patches-5.15/950-0590-drm-vc4-Move-HDMI-reset-to-pm_resume.patch index c8bd69cae2..581279ac1b 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0590-drm-vc4-Move-HDMI-reset-to-pm_resume.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0590-drm-vc4-Move-HDMI-reset-to-pm_resume.patch @@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2194,7 +2194,6 @@ static int vc4_hdmi_cec_init(struct vc4_ +@@ -2195,7 +2195,6 @@ static int vc4_hdmi_cec_init(struct vc4_ struct platform_device *pdev = vc4_hdmi->pdev; struct device *dev = &pdev->dev; unsigned long flags; @@ -30,7 +30,7 @@ Signed-off-by: Dave Stevenson int ret; if (!of_find_property(dev->of_node, "interrupts", NULL)) { -@@ -2213,15 +2212,6 @@ static int vc4_hdmi_cec_init(struct vc4_ +@@ -2214,15 +2213,6 @@ static int vc4_hdmi_cec_init(struct vc4_ cec_fill_conn_info_from_drm(&conn_info, &vc4_hdmi->connector); cec_s_conn_info(vc4_hdmi->cec_adap, &conn_info); @@ -46,7 +46,7 @@ Signed-off-by: Dave Stevenson if (vc4_hdmi->variant->external_irq_controller) { ret = request_threaded_irq(platform_get_irq_byname(pdev, "cec-rx"), vc4_cec_irq_handler_rx_bare, -@@ -2284,6 +2274,29 @@ static void vc4_hdmi_cec_exit(struct vc4 +@@ -2285,6 +2275,29 @@ static void vc4_hdmi_cec_exit(struct vc4 cec_unregister_adapter(vc4_hdmi->cec_adap); } @@ -76,7 +76,7 @@ Signed-off-by: Dave Stevenson #else static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi) { -@@ -2292,6 +2305,10 @@ static int vc4_hdmi_cec_init(struct vc4_ +@@ -2293,6 +2306,10 @@ static int vc4_hdmi_cec_init(struct vc4_ static void vc4_hdmi_cec_exit(struct vc4_hdmi *vc4_hdmi) {}; @@ -87,7 +87,7 @@ Signed-off-by: Dave Stevenson #endif static int vc4_hdmi_build_regset(struct vc4_hdmi *vc4_hdmi, -@@ -2526,6 +2543,15 @@ static int vc4_hdmi_runtime_resume(struc +@@ -2527,6 +2544,15 @@ static int vc4_hdmi_runtime_resume(struc if (ret) return ret; @@ -103,7 +103,7 @@ Signed-off-by: Dave Stevenson return 0; } -@@ -2616,20 +2642,11 @@ static int vc4_hdmi_bind(struct device * +@@ -2617,20 +2643,11 @@ static int vc4_hdmi_bind(struct device * if (ret) goto err_put_ddc; diff --git a/target/linux/bcm27xx/patches-5.15/950-0603-vc4-drm-Ignore-vc4_hdmi-output_enabled-for-allowing-.patch b/target/linux/bcm27xx/patches-5.15/950-0603-vc4-drm-Ignore-vc4_hdmi-output_enabled-for-allowing-.patch index 9d0361c426..9ecf5db11d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0603-vc4-drm-Ignore-vc4_hdmi-output_enabled-for-allowing-.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0603-vc4-drm-Ignore-vc4_hdmi-output_enabled-for-allowing-.patch @@ -14,7 +14,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -210,6 +210,7 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -211,6 +211,7 @@ vc4_hdmi_connector_detect(struct drm_con connected = true; } @@ -22,7 +22,7 @@ Signed-off-by: Dom Cobley if (connected) { if (connector->status != connector_status_connected) { struct edid *edid = drm_get_edid(connector, vc4_hdmi->ddc); -@@ -730,15 +731,6 @@ static void vc4_hdmi_encoder_post_crtc_p +@@ -731,15 +732,6 @@ static void vc4_hdmi_encoder_post_crtc_p mutex_unlock(&vc4_hdmi->mutex); } @@ -38,7 +38,7 @@ Signed-off-by: Dom Cobley static void vc4_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi, bool enable) { unsigned long flags; -@@ -1218,15 +1210,6 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1219,15 +1211,6 @@ static void vc4_hdmi_encoder_post_crtc_e mutex_unlock(&vc4_hdmi->mutex); } @@ -54,7 +54,7 @@ Signed-off-by: Dom Cobley static void vc4_hdmi_encoder_atomic_mode_set(struct drm_encoder *encoder, struct drm_crtc_state *crtc_state, struct drm_connector_state *conn_state) -@@ -1320,8 +1303,6 @@ static const struct drm_encoder_helper_f +@@ -1321,8 +1304,6 @@ static const struct drm_encoder_helper_f .atomic_check = vc4_hdmi_encoder_atomic_check, .atomic_mode_set = vc4_hdmi_encoder_atomic_mode_set, .mode_valid = vc4_hdmi_encoder_mode_valid, @@ -63,7 +63,7 @@ Signed-off-by: Dom Cobley }; static u32 vc4_hdmi_channel_map(struct vc4_hdmi *vc4_hdmi, u32 channel_mask) -@@ -1421,16 +1402,10 @@ static bool vc4_hdmi_audio_can_stream(st +@@ -1422,16 +1403,10 @@ static bool vc4_hdmi_audio_can_stream(st lockdep_assert_held(&vc4_hdmi->mutex); /* diff --git a/target/linux/bcm27xx/patches-5.15/950-0607-drm-vc4-Fix-build-without-DRM_VC4_HDMI_CEC.patch b/target/linux/bcm27xx/patches-5.15/950-0607-drm-vc4-Fix-build-without-DRM_VC4_HDMI_CEC.patch index ac2e8e9839..777cdda54f 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0607-drm-vc4-Fix-build-without-DRM_VC4_HDMI_CEC.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0607-drm-vc4-Fix-build-without-DRM_VC4_HDMI_CEC.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2280,7 +2280,7 @@ static int vc4_hdmi_cec_init(struct vc4_ +@@ -2281,7 +2281,7 @@ static int vc4_hdmi_cec_init(struct vc4_ static void vc4_hdmi_cec_exit(struct vc4_hdmi *vc4_hdmi) {}; diff --git a/target/linux/bcm27xx/patches-5.15/950-0622-drm-vc4-Skip-writes-to-disabled-packet-RAM.patch b/target/linux/bcm27xx/patches-5.15/950-0622-drm-vc4-Skip-writes-to-disabled-packet-RAM.patch index 565fad9bd6..fd1c51dd48 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0622-drm-vc4-Skip-writes-to-disabled-packet-RAM.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0622-drm-vc4-Skip-writes-to-disabled-packet-RAM.patch @@ -15,7 +15,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -684,6 +684,7 @@ static void vc4_hdmi_encoder_post_crtc_d +@@ -685,6 +685,7 @@ static void vc4_hdmi_encoder_post_crtc_d mutex_lock(&vc4_hdmi->mutex); @@ -23,7 +23,7 @@ Signed-off-by: Dom Cobley spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, 0); -@@ -1200,6 +1201,7 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1201,6 +1202,7 @@ static void vc4_hdmi_encoder_post_crtc_e VC4_HDMI_RAM_PACKET_ENABLE); spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); @@ -31,7 +31,7 @@ Signed-off-by: Dom Cobley vc4_hdmi_set_infoframes(encoder); } -@@ -1605,7 +1607,8 @@ static int vc4_hdmi_audio_prepare(struct +@@ -1606,7 +1608,8 @@ static int vc4_hdmi_audio_prepare(struct spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); memcpy(&vc4_hdmi->audio.infoframe, ¶ms->cea, sizeof(params->cea)); diff --git a/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch b/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch index 8dce12c8db..a0f4963c41 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch @@ -76,7 +76,7 @@ Signed-off-by: Maxime Ripard drm_WARN_ON(encoder->base.dev, crtc_state->limited_color_range && --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -516,7 +516,7 @@ static void vc4_hdmi_set_avi_infoframe(s +@@ -517,7 +517,7 @@ static void vc4_hdmi_set_avi_infoframe(s vc4_encoder->limited_rgb_range ? HDMI_QUANTIZATION_RANGE_LIMITED : HDMI_QUANTIZATION_RANGE_FULL); diff --git a/target/linux/bcm27xx/patches-5.15/950-0624-drm-vc4-hdmi-Add-full-range-RGB-helper.patch b/target/linux/bcm27xx/patches-5.15/950-0624-drm-vc4-hdmi-Add-full-range-RGB-helper.patch index 5f606d39b2..75d96d74e3 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0624-drm-vc4-hdmi-Add-full-range-RGB-helper.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0624-drm-vc4-hdmi-Add-full-range-RGB-helper.patch @@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -107,6 +107,15 @@ static bool vc4_hdmi_mode_needs_scrambli +@@ -108,6 +108,15 @@ static bool vc4_hdmi_mode_needs_scrambli return (mode->clock * 1000) > HDMI_14_MAX_TMDS_CLK; } @@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard static int vc4_hdmi_debugfs_regs(struct seq_file *m, void *unused) { struct drm_info_node *node = (struct drm_info_node *)m->private; -@@ -1115,8 +1124,7 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -1116,8 +1125,7 @@ static void vc4_hdmi_encoder_pre_crtc_en mutex_lock(&vc4_hdmi->mutex); diff --git a/target/linux/bcm27xx/patches-5.15/950-0625-drm-vc4-hdmi-Use-full-range-helper-in-csc-functions.patch b/target/linux/bcm27xx/patches-5.15/950-0625-drm-vc4-hdmi-Use-full-range-helper-in-csc-functions.patch index f6d45b1c33..5ec3643a50 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0625-drm-vc4-hdmi-Use-full-range-helper-in-csc-functions.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0625-drm-vc4-hdmi-Use-full-range-helper-in-csc-functions.patch @@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -504,7 +504,6 @@ static void vc4_hdmi_write_infoframe(str +@@ -505,7 +505,6 @@ static void vc4_hdmi_write_infoframe(str static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -28,7 +28,7 @@ Signed-off-by: Maxime Ripard struct drm_connector *connector = &vc4_hdmi->connector; struct drm_connector_state *cstate = connector->state; const struct drm_display_mode *mode = &vc4_hdmi->saved_adjusted_mode; -@@ -522,9 +521,9 @@ static void vc4_hdmi_set_avi_infoframe(s +@@ -523,9 +522,9 @@ static void vc4_hdmi_set_avi_infoframe(s drm_hdmi_avi_infoframe_quant_range(&frame.avi, connector, mode, @@ -41,7 +41,7 @@ Signed-off-by: Maxime Ripard drm_hdmi_avi_infoframe_colorimetry(&frame.avi, cstate); drm_hdmi_avi_infoframe_bars(&frame.avi, cstate); -@@ -741,7 +740,8 @@ static void vc4_hdmi_encoder_post_crtc_p +@@ -742,7 +741,8 @@ static void vc4_hdmi_encoder_post_crtc_p mutex_unlock(&vc4_hdmi->mutex); } @@ -51,7 +51,7 @@ Signed-off-by: Maxime Ripard { unsigned long flags; u32 csc_ctl; -@@ -751,7 +751,7 @@ static void vc4_hdmi_csc_setup(struct vc +@@ -752,7 +752,7 @@ static void vc4_hdmi_csc_setup(struct vc csc_ctl = VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR, VC4_HD_CSC_CTL_ORDER); @@ -60,7 +60,7 @@ Signed-off-by: Maxime Ripard /* CEA VICs other than #1 requre limited range RGB * output unless overridden by an AVI infoframe. * Apply a colorspace conversion to squash 0-255 down -@@ -781,7 +781,8 @@ static void vc4_hdmi_csc_setup(struct vc +@@ -782,7 +782,8 @@ static void vc4_hdmi_csc_setup(struct vc spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); } @@ -70,7 +70,7 @@ Signed-off-by: Maxime Ripard { unsigned long flags; u32 csc_ctl; -@@ -790,7 +791,7 @@ static void vc5_hdmi_csc_setup(struct vc +@@ -791,7 +792,7 @@ static void vc5_hdmi_csc_setup(struct vc spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); @@ -79,7 +79,7 @@ Signed-off-by: Maxime Ripard /* CEA VICs other than #1 requre limited range RGB * output unless overridden by an AVI infoframe. * Apply a colorspace conversion to squash 0-255 down -@@ -1119,22 +1120,12 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -1120,22 +1121,12 @@ static void vc4_hdmi_encoder_pre_crtc_en { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); struct drm_display_mode *mode = &vc4_hdmi->saved_adjusted_mode; diff --git a/target/linux/bcm27xx/patches-5.15/950-0626-drm-vc4-hdmi-Move-XBAR-setup-to-csc_setup.patch b/target/linux/bcm27xx/patches-5.15/950-0626-drm-vc4-hdmi-Move-XBAR-setup-to-csc_setup.patch index 6db6ff62bb..879be397b9 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0626-drm-vc4-hdmi-Move-XBAR-setup-to-csc_setup.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0626-drm-vc4-hdmi-Move-XBAR-setup-to-csc_setup.patch @@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -791,6 +791,8 @@ static void vc5_hdmi_csc_setup(struct vc +@@ -792,6 +792,8 @@ static void vc5_hdmi_csc_setup(struct vc spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); @@ -24,7 +24,7 @@ Signed-off-by: Maxime Ripard if (!vc4_hdmi_is_full_range_rgb(vc4_hdmi, mode)) { /* CEA VICs other than #1 requre limited range RGB * output unless overridden by an AVI infoframe. -@@ -905,7 +907,6 @@ static void vc5_hdmi_set_timings(struct +@@ -906,7 +908,6 @@ static void vc5_hdmi_set_timings(struct spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); diff --git a/target/linux/bcm27xx/patches-5.15/950-0627-drm-vc4-hdmi-Replace-CSC_CTL-hardcoded-value-by-defi.patch b/target/linux/bcm27xx/patches-5.15/950-0627-drm-vc4-hdmi-Replace-CSC_CTL-hardcoded-value-by-defi.patch index 8a9630c569..6d03449024 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0627-drm-vc4-hdmi-Replace-CSC_CTL-hardcoded-value-by-defi.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0627-drm-vc4-hdmi-Replace-CSC_CTL-hardcoded-value-by-defi.patch @@ -16,7 +16,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -785,9 +785,8 @@ static void vc5_hdmi_csc_setup(struct vc +@@ -786,9 +786,8 @@ static void vc5_hdmi_csc_setup(struct vc const struct drm_display_mode *mode) { unsigned long flags; diff --git a/target/linux/bcm27xx/patches-5.15/950-0628-drm-vc4-hdmi-Define-colorspace-matrices.patch b/target/linux/bcm27xx/patches-5.15/950-0628-drm-vc4-hdmi-Define-colorspace-matrices.patch index ae2faca5f1..20c8b9874c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0628-drm-vc4-hdmi-Define-colorspace-matrices.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0628-drm-vc4-hdmi-Define-colorspace-matrices.patch @@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -781,6 +781,52 @@ static void vc4_hdmi_csc_setup(struct vc +@@ -782,6 +782,52 @@ static void vc4_hdmi_csc_setup(struct vc spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); } @@ -73,7 +73,7 @@ Signed-off-by: Maxime Ripard static void vc5_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi, const struct drm_display_mode *mode) { -@@ -792,35 +838,10 @@ static void vc5_hdmi_csc_setup(struct vc +@@ -793,35 +839,10 @@ static void vc5_hdmi_csc_setup(struct vc HDMI_WRITE(HDMI_VEC_INTERFACE_XBAR, 0x354021); diff --git a/target/linux/bcm27xx/patches-5.15/950-0629-drm-vc4-hdmi-Change-CSC-callback-prototype.patch b/target/linux/bcm27xx/patches-5.15/950-0629-drm-vc4-hdmi-Change-CSC-callback-prototype.patch index 6dd476ae5e..61911b4825 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0629-drm-vc4-hdmi-Change-CSC-callback-prototype.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0629-drm-vc4-hdmi-Change-CSC-callback-prototype.patch @@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -741,6 +741,7 @@ static void vc4_hdmi_encoder_post_crtc_p +@@ -742,6 +742,7 @@ static void vc4_hdmi_encoder_post_crtc_p } static void vc4_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi, @@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard const struct drm_display_mode *mode) { unsigned long flags; -@@ -828,6 +829,7 @@ static void vc5_hdmi_set_csc_coeffs(stru +@@ -829,6 +830,7 @@ static void vc5_hdmi_set_csc_coeffs(stru } static void vc5_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi, @@ -33,7 +33,7 @@ Signed-off-by: Maxime Ripard const struct drm_display_mode *mode) { unsigned long flags; -@@ -1140,13 +1142,16 @@ static void vc4_hdmi_encoder_pre_crtc_en +@@ -1141,13 +1143,16 @@ static void vc4_hdmi_encoder_pre_crtc_en struct drm_atomic_state *state) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); diff --git a/target/linux/bcm27xx/patches-5.15/950-0630-drm-vc4-hdmi-Move-clock-validation-to-its-own-functi.patch b/target/linux/bcm27xx/patches-5.15/950-0630-drm-vc4-hdmi-Move-clock-validation-to-its-own-functi.patch index c3222e51a4..f0b5b48149 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0630-drm-vc4-hdmi-Move-clock-validation-to-its-own-functi.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0630-drm-vc4-hdmi-Move-clock-validation-to-its-own-functi.patch @@ -14,7 +14,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1250,6 +1250,19 @@ static void vc4_hdmi_encoder_atomic_mode +@@ -1251,6 +1251,19 @@ static void vc4_hdmi_encoder_atomic_mode mutex_unlock(&vc4_hdmi->mutex); } @@ -34,7 +34,7 @@ Signed-off-by: Maxime Ripard #define WIFI_2_4GHz_CH1_MIN_FREQ 2400000000ULL #define WIFI_2_4GHz_CH1_MAX_FREQ 2422000000ULL -@@ -1294,10 +1307,7 @@ static int vc4_hdmi_encoder_atomic_check +@@ -1295,10 +1308,7 @@ static int vc4_hdmi_encoder_atomic_check if (mode->flags & DRM_MODE_FLAG_DBLCLK) pixel_rate = pixel_rate * 2; @@ -46,7 +46,7 @@ Signed-off-by: Maxime Ripard return -EINVAL; vc4_state->pixel_rate = pixel_rate; -@@ -1317,13 +1327,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_e +@@ -1318,13 +1328,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_e (mode->hsync_end % 2) || (mode->htotal % 2))) return MODE_H_ILLEGAL; diff --git a/target/linux/bcm27xx/patches-5.15/950-0631-drm-vc4-hdmi-Move-clock-calculation-into-its-own-fun.patch b/target/linux/bcm27xx/patches-5.15/950-0631-drm-vc4-hdmi-Move-clock-calculation-into-its-own-fun.patch index 506b0cc5d8..7b99321e6d 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0631-drm-vc4-hdmi-Move-clock-calculation-into-its-own-fun.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0631-drm-vc4-hdmi-Move-clock-calculation-into-its-own-fun.patch @@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1263,6 +1263,35 @@ vc4_hdmi_encoder_clock_valid(const struc +@@ -1264,6 +1264,35 @@ vc4_hdmi_encoder_clock_valid(const struc return MODE_OK; } @@ -51,7 +51,7 @@ Signed-off-by: Maxime Ripard #define WIFI_2_4GHz_CH1_MIN_FREQ 2400000000ULL #define WIFI_2_4GHz_CH1_MAX_FREQ 2422000000ULL -@@ -1275,6 +1304,7 @@ static int vc4_hdmi_encoder_atomic_check +@@ -1276,6 +1305,7 @@ static int vc4_hdmi_encoder_atomic_check struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); unsigned long long pixel_rate = mode->clock * 1000; unsigned long long tmds_rate; @@ -59,7 +59,7 @@ Signed-off-by: Maxime Ripard if (vc4_hdmi->variant->unsupported_odd_h_timings && !(mode->flags & DRM_MODE_FLAG_DBLCLK) && -@@ -1296,21 +1326,10 @@ static int vc4_hdmi_encoder_atomic_check +@@ -1297,21 +1327,10 @@ static int vc4_hdmi_encoder_atomic_check pixel_rate = mode->clock * 1000; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0632-drm-vc4-hdmi-Take-the-sink-maximum-TMDS-clock-into-a.patch b/target/linux/bcm27xx/patches-5.15/950-0632-drm-vc4-hdmi-Take-the-sink-maximum-TMDS-clock-into-a.patch index b9b1636b16..ee520595f7 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0632-drm-vc4-hdmi-Take-the-sink-maximum-TMDS-clock-into-a.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0632-drm-vc4-hdmi-Take-the-sink-maximum-TMDS-clock-into-a.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1254,12 +1254,18 @@ static enum drm_mode_status +@@ -1255,12 +1255,18 @@ static enum drm_mode_status vc4_hdmi_encoder_clock_valid(const struct vc4_hdmi *vc4_hdmi, unsigned long long clock) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0633-drm-vc4-hdmi-Take-bpp-into-account-for-the-scrambler.patch b/target/linux/bcm27xx/patches-5.15/950-0633-drm-vc4-hdmi-Take-bpp-into-account-for-the-scrambler.patch index d44e161cf0..608cc18fda 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0633-drm-vc4-hdmi-Take-bpp-into-account-for-the-scrambler.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0633-drm-vc4-hdmi-Take-bpp-into-account-for-the-scrambler.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -102,9 +102,17 @@ +@@ -103,9 +103,17 @@ #define HDMI_14_MAX_TMDS_CLK (340 * 1000 * 1000) @@ -39,7 +39,7 @@ Signed-off-by: Maxime Ripard } static bool vc4_hdmi_is_full_range_rgb(struct vc4_hdmi *vc4_hdmi, -@@ -276,7 +284,7 @@ static int vc4_hdmi_connector_get_modes( +@@ -277,7 +285,7 @@ static int vc4_hdmi_connector_get_modes( struct drm_display_mode *mode; list_for_each_entry(mode, &connector->probed_modes, head) { @@ -48,7 +48,7 @@ Signed-off-by: Maxime Ripard drm_warn_once(drm, "The core clock cannot reach frequencies high enough to support 4k @ 60Hz."); drm_warn_once(drm, "Please change your config.txt file to add hdmi_enable_4kp60."); } -@@ -627,7 +635,7 @@ static void vc4_hdmi_enable_scrambling(s +@@ -628,7 +636,7 @@ static void vc4_hdmi_enable_scrambling(s if (!vc4_hdmi_supports_scrambling(encoder, mode)) return; @@ -57,7 +57,7 @@ Signed-off-by: Maxime Ripard return; drm_scdc_set_high_tmds_clock_ratio(vc4_hdmi->ddc, true); -@@ -1244,6 +1252,7 @@ static void vc4_hdmi_encoder_atomic_mode +@@ -1245,6 +1253,7 @@ static void vc4_hdmi_encoder_atomic_mode struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); mutex_lock(&vc4_hdmi->mutex); diff --git a/target/linux/bcm27xx/patches-5.15/950-0634-drm-vc4-hdmi-Always-try-to-have-the-highest-bpc.patch b/target/linux/bcm27xx/patches-5.15/950-0634-drm-vc4-hdmi-Always-try-to-have-the-highest-bpc.patch index e57923dd48..50bbb7a507 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0634-drm-vc4-hdmi-Always-try-to-have-the-highest-bpc.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0634-drm-vc4-hdmi-Always-try-to-have-the-highest-bpc.patch @@ -21,7 +21,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -356,6 +356,7 @@ vc4_hdmi_connector_duplicate_state(struc +@@ -357,6 +357,7 @@ vc4_hdmi_connector_duplicate_state(struc return NULL; new_state->pixel_rate = vc4_state->pixel_rate; @@ -29,7 +29,7 @@ Signed-off-by: Maxime Ripard __drm_atomic_helper_connector_duplicate_state(connector, &new_state->base); return &new_state->base; -@@ -913,6 +914,8 @@ static void vc5_hdmi_set_timings(struct +@@ -914,6 +915,8 @@ static void vc5_hdmi_set_timings(struct struct drm_connector_state *state, struct drm_display_mode *mode) { @@ -38,7 +38,7 @@ Signed-off-by: Maxime Ripard bool hsync_pos = mode->flags & DRM_MODE_FLAG_PHSYNC; bool vsync_pos = mode->flags & DRM_MODE_FLAG_PVSYNC; bool interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE; -@@ -960,7 +963,7 @@ static void vc5_hdmi_set_timings(struct +@@ -961,7 +964,7 @@ static void vc5_hdmi_set_timings(struct HDMI_WRITE(HDMI_VERTB0, vertb_even); HDMI_WRITE(HDMI_VERTB1, vertb); @@ -47,7 +47,7 @@ Signed-off-by: Maxime Ripard case 12: gcp = 6; gcp_en = true; -@@ -1250,9 +1253,11 @@ static void vc4_hdmi_encoder_atomic_mode +@@ -1251,9 +1254,11 @@ static void vc4_hdmi_encoder_atomic_mode struct drm_connector_state *conn_state) { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -60,7 +60,7 @@ Signed-off-by: Maxime Ripard memcpy(&vc4_hdmi->saved_adjusted_mode, &crtc_state->adjusted_mode, sizeof(vc4_hdmi->saved_adjusted_mode)); -@@ -1307,6 +1312,38 @@ vc4_hdmi_encoder_compute_clock(const str +@@ -1308,6 +1313,38 @@ vc4_hdmi_encoder_compute_clock(const str return 0; } @@ -99,7 +99,7 @@ Signed-off-by: Maxime Ripard #define WIFI_2_4GHz_CH1_MIN_FREQ 2400000000ULL #define WIFI_2_4GHz_CH1_MAX_FREQ 2422000000ULL -@@ -1341,8 +1378,7 @@ static int vc4_hdmi_encoder_atomic_check +@@ -1342,8 +1379,7 @@ static int vc4_hdmi_encoder_atomic_check pixel_rate = mode->clock * 1000; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0635-drm-vc4-hdmi-Support-HDMI-YUV-output.patch b/target/linux/bcm27xx/patches-5.15/950-0635-drm-vc4-hdmi-Support-HDMI-YUV-output.patch index 72c79c3eed..cd5896f5cd 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0635-drm-vc4-hdmi-Support-HDMI-YUV-output.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0635-drm-vc4-hdmi-Support-HDMI-YUV-output.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -102,15 +102,30 @@ +@@ -103,15 +103,30 @@ #define HDMI_14_MAX_TMDS_CLK (340 * 1000 * 1000) @@ -53,7 +53,7 @@ Signed-off-by: Maxime Ripard return clock > HDMI_14_MAX_TMDS_CLK; } -@@ -284,7 +299,7 @@ static int vc4_hdmi_connector_get_modes( +@@ -285,7 +300,7 @@ static int vc4_hdmi_connector_get_modes( struct drm_display_mode *mode; list_for_each_entry(mode, &connector->probed_modes, head) { @@ -62,7 +62,7 @@ Signed-off-by: Maxime Ripard drm_warn_once(drm, "The core clock cannot reach frequencies high enough to support 4k @ 60Hz."); drm_warn_once(drm, "Please change your config.txt file to add hdmi_enable_4kp60."); } -@@ -341,6 +356,7 @@ static void vc4_hdmi_connector_reset(str +@@ -342,6 +357,7 @@ static void vc4_hdmi_connector_reset(str new_state->base.max_bpc = 8; new_state->base.max_requested_bpc = 8; @@ -70,7 +70,7 @@ Signed-off-by: Maxime Ripard drm_atomic_helper_connector_tv_reset(connector); } -@@ -357,6 +373,7 @@ vc4_hdmi_connector_duplicate_state(struc +@@ -358,6 +374,7 @@ vc4_hdmi_connector_duplicate_state(struc new_state->pixel_rate = vc4_state->pixel_rate; new_state->output_bpc = vc4_state->output_bpc; @@ -78,7 +78,7 @@ Signed-off-by: Maxime Ripard __drm_atomic_helper_connector_duplicate_state(connector, &new_state->base); return &new_state->base; -@@ -510,11 +527,38 @@ static void vc4_hdmi_write_infoframe(str +@@ -511,11 +528,38 @@ static void vc4_hdmi_write_infoframe(str DRM_ERROR("Failed to wait for infoframe to start: %d\n", ret); } @@ -117,7 +117,7 @@ Signed-off-by: Maxime Ripard const struct drm_display_mode *mode = &vc4_hdmi->saved_adjusted_mode; union hdmi_infoframe frame; int ret; -@@ -534,6 +578,7 @@ static void vc4_hdmi_set_avi_infoframe(s +@@ -535,6 +579,7 @@ static void vc4_hdmi_set_avi_infoframe(s HDMI_QUANTIZATION_RANGE_FULL : HDMI_QUANTIZATION_RANGE_LIMITED); drm_hdmi_avi_infoframe_colorimetry(&frame.avi, cstate); @@ -125,7 +125,7 @@ Signed-off-by: Maxime Ripard drm_hdmi_avi_infoframe_bars(&frame.avi, cstate); vc4_hdmi_write_infoframe(encoder, &frame); -@@ -636,7 +681,9 @@ static void vc4_hdmi_enable_scrambling(s +@@ -637,7 +682,9 @@ static void vc4_hdmi_enable_scrambling(s if (!vc4_hdmi_supports_scrambling(encoder, mode)) return; @@ -136,7 +136,7 @@ Signed-off-by: Maxime Ripard return; drm_scdc_set_high_tmds_clock_ratio(vc4_hdmi->ddc, true); -@@ -824,6 +871,38 @@ static const u16 vc5_hdmi_csc_full_rgb_t +@@ -825,6 +872,38 @@ static const u16 vc5_hdmi_csc_full_rgb_t { 0x0000, 0x0000, 0x1b80, 0x0400 }, }; @@ -175,7 +175,7 @@ Signed-off-by: Maxime Ripard static void vc5_hdmi_set_csc_coeffs(struct vc4_hdmi *vc4_hdmi, const u16 coeffs[3][4]) { -@@ -841,19 +920,53 @@ static void vc5_hdmi_csc_setup(struct vc +@@ -842,19 +921,53 @@ static void vc5_hdmi_csc_setup(struct vc struct drm_connector_state *state, const struct drm_display_mode *mode) { @@ -234,7 +234,7 @@ Signed-off-by: Maxime Ripard HDMI_WRITE(HDMI_CSC_CTL, csc_ctl); spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); -@@ -979,6 +1092,15 @@ static void vc5_hdmi_set_timings(struct +@@ -980,6 +1093,15 @@ static void vc5_hdmi_set_timings(struct break; } @@ -250,7 +250,7 @@ Signed-off-by: Maxime Ripard reg = HDMI_READ(HDMI_DEEP_COLOR_CONFIG_1); reg &= ~(VC5_HDMI_DEEP_COLOR_CONFIG_1_INIT_PACK_PHASE_MASK | VC5_HDMI_DEEP_COLOR_CONFIG_1_COLOR_DEPTH_MASK); -@@ -1258,12 +1380,97 @@ static void vc4_hdmi_encoder_atomic_mode +@@ -1259,12 +1381,97 @@ static void vc4_hdmi_encoder_atomic_mode mutex_lock(&vc4_hdmi->mutex); vc4_hdmi->output_bpc = vc4_state->output_bpc; @@ -348,7 +348,7 @@ Signed-off-by: Maxime Ripard static enum drm_mode_status vc4_hdmi_encoder_clock_valid(const struct vc4_hdmi *vc4_hdmi, unsigned long long clock) -@@ -1285,13 +1492,17 @@ vc4_hdmi_encoder_clock_valid(const struc +@@ -1286,13 +1493,17 @@ vc4_hdmi_encoder_clock_valid(const struc static unsigned long long vc4_hdmi_encoder_compute_mode_clock(const struct drm_display_mode *mode, @@ -367,7 +367,7 @@ Signed-off-by: Maxime Ripard return clock * bpc / 8; } -@@ -1299,11 +1510,11 @@ static int +@@ -1300,11 +1511,11 @@ static int vc4_hdmi_encoder_compute_clock(const struct vc4_hdmi *vc4_hdmi, struct vc4_hdmi_connector_state *vc4_state, const struct drm_display_mode *mode, @@ -381,7 +381,7 @@ Signed-off-by: Maxime Ripard if (vc4_hdmi_encoder_clock_valid(vc4_hdmi, clock) != MODE_OK) return -EINVAL; -@@ -1313,10 +1524,55 @@ vc4_hdmi_encoder_compute_clock(const str +@@ -1314,10 +1525,55 @@ vc4_hdmi_encoder_compute_clock(const str } static int @@ -437,7 +437,7 @@ Signed-off-by: Maxime Ripard struct drm_connector_state *conn_state = &vc4_state->base; unsigned int max_bpc = clamp_t(unsigned int, conn_state->max_bpc, 8, 12); unsigned int bpc; -@@ -1325,17 +1581,18 @@ vc4_hdmi_encoder_compute_config(const st +@@ -1326,17 +1582,18 @@ vc4_hdmi_encoder_compute_config(const st for (bpc = max_bpc; bpc >= 8; bpc -= 2) { drm_dbg(dev, "Trying with a %d bpc output\n", bpc); diff --git a/target/linux/bcm27xx/patches-5.15/950-0642-drm-vc4-hdmi-Fix-HDMI-monitor-detection-in-polled-mo.patch b/target/linux/bcm27xx/patches-5.15/950-0642-drm-vc4-hdmi-Fix-HDMI-monitor-detection-in-polled-mo.patch index bbe81baa15..8fb8fe8034 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0642-drm-vc4-hdmi-Fix-HDMI-monitor-detection-in-polled-mo.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0642-drm-vc4-hdmi-Fix-HDMI-monitor-detection-in-polled-mo.patch @@ -18,7 +18,7 @@ Signed-off-by: Matthias Reichl --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -242,7 +242,6 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -243,7 +243,6 @@ vc4_hdmi_connector_detect(struct drm_con connected = true; } @@ -26,7 +26,7 @@ Signed-off-by: Matthias Reichl if (connected) { if (connector->status != connector_status_connected) { struct edid *edid = drm_get_edid(connector, vc4_hdmi->ddc); -@@ -251,6 +250,8 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -252,6 +251,8 @@ vc4_hdmi_connector_detect(struct drm_con cec_s_phys_addr_from_edid(vc4_hdmi->cec_adap, edid); vc4_hdmi->encoder.hdmi_monitor = drm_detect_hdmi_monitor(edid); kfree(edid); @@ -35,7 +35,7 @@ Signed-off-by: Matthias Reichl } } -@@ -260,6 +261,8 @@ vc4_hdmi_connector_detect(struct drm_con +@@ -261,6 +262,8 @@ vc4_hdmi_connector_detect(struct drm_con return connector_status_connected; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0643-drm-vc4-hdmi-Fix-no-video-output-on-DVI-monitors.patch b/target/linux/bcm27xx/patches-5.15/950-0643-drm-vc4-hdmi-Fix-no-video-output-on-DVI-monitors.patch index 9f2301119e..8e1f4bb681 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0643-drm-vc4-hdmi-Fix-no-video-output-on-DVI-monitors.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0643-drm-vc4-hdmi-Fix-no-video-output-on-DVI-monitors.patch @@ -17,7 +17,7 @@ Signed-off-by: Matthias Reichl --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1414,9 +1414,6 @@ vc4_hdmi_sink_supports_format_bpc(const +@@ -1415,9 +1415,6 @@ vc4_hdmi_sink_supports_format_bpc(const case VC4_HDMI_OUTPUT_RGB: drm_dbg(dev, "RGB Format, checking the constraints.\n"); diff --git a/target/linux/bcm27xx/patches-5.15/950-0655-drm-vc4-hdmi-Fix-clock-value-used-for-validating-hdm.patch b/target/linux/bcm27xx/patches-5.15/950-0655-drm-vc4-hdmi-Fix-clock-value-used-for-validating-hdm.patch index 988876077a..815bdd0a32 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0655-drm-vc4-hdmi-Fix-clock-value-used-for-validating-hdm.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0655-drm-vc4-hdmi-Fix-clock-value-used-for-validating-hdm.patch @@ -18,7 +18,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1495,7 +1495,7 @@ vc4_hdmi_encoder_compute_mode_clock(cons +@@ -1496,7 +1496,7 @@ vc4_hdmi_encoder_compute_mode_clock(cons unsigned int bpc, enum vc4_hdmi_output_format fmt) { diff --git a/target/linux/bcm27xx/patches-5.15/950-0669-drm-vc4_hdmi-Add-Broadcast-RGB-property-to-allow-ove.patch b/target/linux/bcm27xx/patches-5.15/950-0669-drm-vc4_hdmi-Add-Broadcast-RGB-property-to-allow-ove.patch index 819e983e6e..00324e11e9 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0669-drm-vc4_hdmi-Add-Broadcast-RGB-property-to-allow-ove.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0669-drm-vc4_hdmi-Add-Broadcast-RGB-property-to-allow-ove.patch @@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -56,6 +56,14 @@ +@@ -57,6 +57,14 @@ #include "vc4_hdmi_regs.h" #include "vc4_regs.h" @@ -31,7 +31,7 @@ Signed-off-by: Dave Stevenson #define VC5_HDMI_HORZA_HFP_SHIFT 16 #define VC5_HDMI_HORZA_HFP_MASK VC4_MASK(28, 16) #define VC5_HDMI_HORZA_VPOS BIT(15) -@@ -135,6 +143,10 @@ static bool vc4_hdmi_is_full_range_rgb(s +@@ -136,6 +144,10 @@ static bool vc4_hdmi_is_full_range_rgb(s { struct vc4_hdmi_encoder *vc4_encoder = &vc4_hdmi->encoder; @@ -42,7 +42,7 @@ Signed-off-by: Dave Stevenson return !vc4_encoder->hdmi_monitor || drm_default_rgb_quant_range(mode) == HDMI_QUANTIZATION_RANGE_FULL; } -@@ -341,6 +353,65 @@ static int vc4_hdmi_connector_atomic_che +@@ -342,6 +354,65 @@ static int vc4_hdmi_connector_atomic_che return 0; } @@ -108,7 +108,7 @@ Signed-off-by: Dave Stevenson static void vc4_hdmi_connector_reset(struct drm_connector *connector) { struct vc4_hdmi_connector_state *old_state = -@@ -377,6 +448,7 @@ vc4_hdmi_connector_duplicate_state(struc +@@ -378,6 +449,7 @@ vc4_hdmi_connector_duplicate_state(struc new_state->pixel_rate = vc4_state->pixel_rate; new_state->output_bpc = vc4_state->output_bpc; new_state->output_format = vc4_state->output_format; @@ -116,7 +116,7 @@ Signed-off-by: Dave Stevenson __drm_atomic_helper_connector_duplicate_state(connector, &new_state->base); return &new_state->base; -@@ -389,6 +461,8 @@ static const struct drm_connector_funcs +@@ -390,6 +462,8 @@ static const struct drm_connector_funcs .reset = vc4_hdmi_connector_reset, .atomic_duplicate_state = vc4_hdmi_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, @@ -125,7 +125,7 @@ Signed-off-by: Dave Stevenson }; static const struct drm_connector_helper_funcs vc4_hdmi_connector_helper_funcs = { -@@ -396,6 +470,32 @@ static const struct drm_connector_helper +@@ -397,6 +471,32 @@ static const struct drm_connector_helper .atomic_check = vc4_hdmi_connector_atomic_check, }; @@ -158,7 +158,7 @@ Signed-off-by: Dave Stevenson static int vc4_hdmi_connector_init(struct drm_device *dev, struct vc4_hdmi *vc4_hdmi) { -@@ -439,6 +539,8 @@ static int vc4_hdmi_connector_init(struc +@@ -440,6 +540,8 @@ static int vc4_hdmi_connector_init(struc if (vc4_hdmi->variant->supports_hdr) drm_connector_attach_hdr_output_metadata_property(connector); @@ -167,7 +167,7 @@ Signed-off-by: Dave Stevenson drm_connector_attach_encoder(connector, encoder); return 0; -@@ -1384,6 +1486,7 @@ static void vc4_hdmi_encoder_atomic_mode +@@ -1385,6 +1487,7 @@ static void vc4_hdmi_encoder_atomic_mode mutex_lock(&vc4_hdmi->mutex); vc4_hdmi->output_bpc = vc4_state->output_bpc; vc4_hdmi->output_format = vc4_state->output_format; diff --git a/target/linux/bcm27xx/patches-5.15/950-0786-drm-vc4-hdmi-Add-CSC-for-BT601-709-2020-limited-and-.patch b/target/linux/bcm27xx/patches-5.15/950-0786-drm-vc4-hdmi-Add-CSC-for-BT601-709-2020-limited-and-.patch index dbfc1520c1..3a8626bf24 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0786-drm-vc4-hdmi-Add-CSC-for-BT601-709-2020-limited-and-.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0786-drm-vc4-hdmi-Add-CSC-for-BT601-709-2020-limited-and-.patch @@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -138,8 +138,8 @@ static bool vc4_hdmi_mode_needs_scrambli +@@ -139,8 +139,8 @@ static bool vc4_hdmi_mode_needs_scrambli return clock > HDMI_14_MAX_TMDS_CLK; } @@ -33,7 +33,7 @@ Signed-off-by: Dave Stevenson { struct vc4_hdmi_encoder *vc4_encoder = &vc4_hdmi->encoder; -@@ -679,7 +679,7 @@ static void vc4_hdmi_set_avi_infoframe(s +@@ -680,7 +680,7 @@ static void vc4_hdmi_set_avi_infoframe(s drm_hdmi_avi_infoframe_quant_range(&frame.avi, connector, mode, @@ -42,7 +42,7 @@ Signed-off-by: Dave Stevenson HDMI_QUANTIZATION_RANGE_FULL : HDMI_QUANTIZATION_RANGE_LIMITED); drm_hdmi_avi_infoframe_colorimetry(&frame.avi, cstate); -@@ -913,7 +913,7 @@ static void vc4_hdmi_csc_setup(struct vc +@@ -914,7 +914,7 @@ static void vc4_hdmi_csc_setup(struct vc csc_ctl = VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR, VC4_HD_CSC_CTL_ORDER); @@ -51,7 +51,7 @@ Signed-off-by: Dave Stevenson /* CEA VICs other than #1 requre limited range RGB * output unless overridden by an AVI infoframe. * Apply a colorspace conversion to squash 0-255 down -@@ -943,7 +943,6 @@ static void vc4_hdmi_csc_setup(struct vc +@@ -944,7 +944,6 @@ static void vc4_hdmi_csc_setup(struct vc spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); } @@ -59,7 +59,7 @@ Signed-off-by: Dave Stevenson /* * If we need to output Full Range RGB, then use the unity matrix * -@@ -951,15 +950,6 @@ static void vc4_hdmi_csc_setup(struct vc +@@ -952,15 +951,6 @@ static void vc4_hdmi_csc_setup(struct vc * [ 0 1 0 0] * [ 0 0 1 0] * @@ -75,7 +75,7 @@ Signed-off-by: Dave Stevenson * CEA VICs other than #1 require limited range RGB output unless * overridden by an AVI infoframe. Apply a colorspace conversion to * squash 0-255 down to 16-235. The matrix here is: -@@ -970,42 +960,105 @@ static const u16 vc5_hdmi_csc_full_rgb_u +@@ -971,42 +961,105 @@ static const u16 vc5_hdmi_csc_full_rgb_u * * Matrix is signed 2p13 fixed point, with signed 9p6 offsets */ @@ -203,7 +203,7 @@ Signed-off-by: Dave Stevenson }; static void vc5_hdmi_set_csc_coeffs(struct vc4_hdmi *vc4_hdmi, -@@ -1021,12 +1074,28 @@ static void vc5_hdmi_set_csc_coeffs(stru +@@ -1022,12 +1075,28 @@ static void vc5_hdmi_set_csc_coeffs(stru HDMI_WRITE(HDMI_CSC_34_33, (coeffs[2][3] << 16) | coeffs[2][2]); } @@ -232,7 +232,7 @@ Signed-off-by: Dave Stevenson unsigned long flags; u32 if_cfg = 0; u32 if_xbar = 0x543210; -@@ -1038,31 +1107,56 @@ static void vc5_hdmi_csc_setup(struct vc +@@ -1039,31 +1108,56 @@ static void vc5_hdmi_csc_setup(struct vc switch (vc4_state->output_format) { case VC4_HDMI_OUTPUT_YUV444: diff --git a/target/linux/bcm27xx/patches-5.15/950-0808-drm-vc4_hdmi-Force-modeset-when-bpc-changes.patch b/target/linux/bcm27xx/patches-5.15/950-0808-drm-vc4_hdmi-Force-modeset-when-bpc-changes.patch index 3b2bc702aa..7e14587348 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0808-drm-vc4_hdmi-Force-modeset-when-bpc-changes.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0808-drm-vc4_hdmi-Force-modeset-when-bpc-changes.patch @@ -25,7 +25,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1808,6 +1808,9 @@ static int vc4_hdmi_encoder_atomic_check +@@ -1809,6 +1809,9 @@ static int vc4_hdmi_encoder_atomic_check struct vc4_hdmi_connector_state *vc4_state = conn_state_to_vc4_hdmi_conn_state(conn_state); struct drm_display_mode *mode = &crtc_state->adjusted_mode; struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); @@ -35,7 +35,7 @@ Signed-off-by: Dom Cobley unsigned long long pixel_rate = mode->clock * 1000; unsigned long long tmds_rate; int ret; -@@ -1836,6 +1839,11 @@ static int vc4_hdmi_encoder_atomic_check +@@ -1837,6 +1840,11 @@ static int vc4_hdmi_encoder_atomic_check if (ret) return ret; diff --git a/target/linux/bcm27xx/patches-5.15/950-0829-vc4_hdmi-Remove-VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWA.patch b/target/linux/bcm27xx/patches-5.15/950-0829-vc4_hdmi-Remove-VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWA.patch index fc5e3c960f..4b811662d0 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0829-vc4_hdmi-Remove-VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWA.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0829-vc4_hdmi-Remove-VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWA.patch @@ -14,7 +14,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1550,9 +1550,6 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1551,9 +1551,6 @@ static void vc4_hdmi_encoder_post_crtc_e WARN_ON(!(HDMI_READ(HDMI_SCHEDULER_CONTROL) & VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE)); diff --git a/target/linux/bcm27xx/patches-5.15/950-0868-drm-vc4-hdmi-Rework-hdmi_enable_4kp60-detection.patch b/target/linux/bcm27xx/patches-5.15/950-0868-drm-vc4-hdmi-Rework-hdmi_enable_4kp60-detection.patch index 60f6921ede..eae608d331 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0868-drm-vc4-hdmi-Rework-hdmi_enable_4kp60-detection.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0868-drm-vc4-hdmi-Rework-hdmi_enable_4kp60-detection.patch @@ -48,7 +48,7 @@ Signed-off-by: Maxime Ripard struct vc4_plane { --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -291,6 +291,7 @@ static int vc4_hdmi_connector_get_modes( +@@ -292,6 +292,7 @@ static int vc4_hdmi_connector_get_modes( { struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector); struct vc4_hdmi_encoder *vc4_encoder = &vc4_hdmi->encoder; @@ -56,7 +56,7 @@ Signed-off-by: Maxime Ripard int ret = 0; struct edid *edid; -@@ -309,7 +310,7 @@ static int vc4_hdmi_connector_get_modes( +@@ -310,7 +311,7 @@ static int vc4_hdmi_connector_get_modes( ret = drm_add_edid_modes(connector, edid); kfree(edid); @@ -65,7 +65,7 @@ Signed-off-by: Maxime Ripard struct drm_device *drm = connector->dev; struct drm_display_mode *mode; -@@ -1671,11 +1672,12 @@ vc4_hdmi_encoder_clock_valid(const struc +@@ -1672,11 +1673,12 @@ vc4_hdmi_encoder_clock_valid(const struc { const struct drm_connector *connector = &vc4_hdmi->connector; const struct drm_display_info *info = &connector->display_info; @@ -79,7 +79,7 @@ Signed-off-by: Maxime Ripard return MODE_CLOCK_HIGH; if (info->max_tmds_clock && clock > (info->max_tmds_clock * 1000)) -@@ -3157,14 +3159,6 @@ static int vc4_hdmi_bind(struct device * +@@ -3158,14 +3160,6 @@ static int vc4_hdmi_bind(struct device * vc4_hdmi->disable_wifi_frequencies = of_property_read_bool(dev->of_node, "wifi-2.4ghz-coexistence"); diff --git a/target/linux/bcm27xx/patches-5.15/950-0911-drm-vc4_hdmi-Force-a-modeset-when-Broadcast-RGB-sett.patch b/target/linux/bcm27xx/patches-5.15/950-0911-drm-vc4_hdmi-Force-a-modeset-when-Broadcast-RGB-sett.patch index 97d3086af5..00e6bf3465 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0911-drm-vc4_hdmi-Force-a-modeset-when-Broadcast-RGB-sett.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0911-drm-vc4_hdmi-Force-a-modeset-when-Broadcast-RGB-sett.patch @@ -13,7 +13,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -333,14 +333,17 @@ static int vc4_hdmi_connector_atomic_che +@@ -334,14 +334,17 @@ static int vc4_hdmi_connector_atomic_che { struct drm_connector_state *old_state = drm_atomic_get_old_connector_state(state, connector); diff --git a/target/linux/generic/backport-5.15/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch b/target/linux/generic/backport-5.15/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch index 489575fb35..caec8db5d6 100644 --- a/target/linux/generic/backport-5.15/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch +++ b/target/linux/generic/backport-5.15/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch @@ -24,8 +24,6 @@ Signed-off-by: Stijn Tintel tools/bpf/resolve_btfids/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile -index af9f9d3534c9..e727058bfe15 100644 --- a/tools/bpf/resolve_btfids/Makefile +++ b/tools/bpf/resolve_btfids/Makefile @@ -23,6 +23,8 @@ CC = $(HOSTCC) @@ -37,7 +35,7 @@ index af9f9d3534c9..e727058bfe15 100644 OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/ -@@ -45,9 +47,9 @@ $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/libsubcmd +@@ -45,9 +47,9 @@ $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/l $(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(abspath $(dir $@))/ $(abspath $@) $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(OUTPUT)/libbpf @@ -49,6 +47,3 @@ index af9f9d3534c9..e727058bfe15 100644 -I$(srctree)/tools/include \ -I$(srctree)/tools/include/uapi \ -I$(LIBBPF_SRC) \ --- -2.35.1 - diff --git a/target/linux/generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch b/target/linux/generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch deleted file mode 100644 index bcada79fb2..0000000000 --- a/target/linux/generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch +++ /dev/null @@ -1,57 +0,0 @@ -From f81d97cb646ab8b90fb181d66fccaf9589990de6 Mon Sep 17 00:00:00 2001 -From: Matthew Hagan -Date: Sat, 30 Apr 2022 11:00:49 +0100 -Subject: [PATCH v2] net: sfp: Add tx-fault workaround for Huawei MA5671A SFP - ONT - -As noted elsewhere, various GPON SFP modules exhibit non-standard -TX-fault behaviour. In the tested case, the Huawei MA5671A, when used -in combination with a Marvell mv88e6085 switch, was found to -persistently assert TX-fault, resulting in the module being disabled. - -This patch adds a quirk to ignore the SFP_F_TX_FAULT state, allowing the -module to function. - -Change from v1: removal of erroneous return statment (Andrew Lunn) - -Signed-off-by: Matthew Hagan -Reviewed-by: Andrew Lunn ---- - drivers/net/phy/sfp.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - ---- a/drivers/net/phy/sfp.c -+++ b/drivers/net/phy/sfp.c -@@ -250,6 +250,7 @@ struct sfp { - struct sfp_eeprom_id id; - unsigned int module_power_mW; - unsigned int module_t_start_up; -+ bool tx_fault_ignore; - - #if IS_ENABLED(CONFIG_HWMON) - struct sfp_diag diag; -@@ -1945,6 +1946,12 @@ static int sfp_sm_mod_probe(struct sfp * - else - sfp->module_t_start_up = T_START_UP; - -+ if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) && -+ !memcmp(id.base.vendor_pn, "MA5671A ", 16)) -+ sfp->tx_fault_ignore = true; -+ else -+ sfp->tx_fault_ignore = false; -+ - return 0; - } - -@@ -2397,7 +2404,10 @@ static void sfp_check_state(struct sfp * - mutex_lock(&sfp->st_mutex); - state = sfp_get_state(sfp); - changed = state ^ sfp->state; -- changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT; -+ if (sfp->tx_fault_ignore) -+ changed &= SFP_F_PRESENT | SFP_F_LOS; -+ else -+ changed &= SFP_F_PRESENT | SFP_F_LOS | SFP_F_TX_FAULT; - - for (i = 0; i < GPIO_MAX; i++) - if (changed & BIT(i)) diff --git a/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch index 1ddfc8e014..fd9e63a613 100644 --- a/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch +++ b/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch @@ -19,7 +19,7 @@ Signed-off-by: Christian 'Ansuel' Marangi /* * Get the required data from the packet. */ -@@ -1151,7 +1154,7 @@ int nf_conntrack_tcp_packet(struct nf_co +@@ -1160,7 +1163,7 @@ int nf_conntrack_tcp_packet(struct nf_co IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED && timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK]) timeout = timeouts[TCP_CONNTRACK_UNACK]; @@ -28,19 +28,19 @@ Signed-off-by: Christian 'Ansuel' Marangi timeouts[new_state] > timeouts[TCP_CONNTRACK_RETRANS]) timeout = timeouts[TCP_CONNTRACK_RETRANS]; else -@@ -1451,6 +1454,9 @@ int nf_conntrack_tcp_packet(struct nf_co - * If it's non-zero, we mark only out of window RST segments as INVALID. +@@ -1476,6 +1479,9 @@ void nf_conntrack_tcp_init_net(struct ne */ tn->tcp_be_liberal = 0; -+ + + /* Skip Windows Check */ + tn->tcp_no_window_check = 0; - ++ /* If it's non-zero, we turn off RST sequence number check */ tn->tcp_ignore_invalid_rst = 0; + --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c -@@ -671,6 +671,7 @@ enum nf_ct_sysctl_index { +@@ -633,6 +633,7 @@ enum nf_ct_sysctl_index { #endif NF_SYSCTL_CT_PROTO_TCP_LOOSE, NF_SYSCTL_CT_PROTO_TCP_LIBERAL, @@ -48,7 +48,7 @@ Signed-off-by: Christian 'Ansuel' Marangi NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST, NF_SYSCTL_CT_PROTO_TCP_MAX_RETRANS, NF_SYSCTL_CT_PROTO_TIMEOUT_UDP, -@@ -800,6 +800,14 @@ static struct ctl_table nf_ct_sysctl_tab +@@ -849,6 +850,14 @@ static struct ctl_table nf_ct_sysctl_tab .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, @@ -63,7 +63,7 @@ Signed-off-by: Christian 'Ansuel' Marangi [NF_SYSCTL_CT_PROTO_TCP_IGNORE_INVALID_RST] = { .procname = "nf_conntrack_tcp_ignore_invalid_rst", .maxlen = sizeof(u8), -@@ -900,6 +900,7 @@ static int nf_conntrack_standalone_init_ +@@ -1065,6 +1074,7 @@ static void nf_conntrack_standalone_init XASSIGN(LOOSE, &tn->tcp_loose); XASSIGN(LIBERAL, &tn->tcp_be_liberal); @@ -73,7 +73,7 @@ Signed-off-by: Christian 'Ansuel' Marangi #undef XASSIGN --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h -@@ -109,6 +109,7 @@ struct netns_ct { +@@ -26,6 +26,7 @@ struct nf_tcp_net { unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX]; u8 tcp_loose; u8 tcp_be_liberal; diff --git a/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch b/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch index 4d3bc62bad..8fee4d49de 100644 --- a/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch +++ b/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch @@ -23,7 +23,7 @@ Acked-by: Miquel Raynal --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -1633,9 +1633,7 @@ static int advk_pcie_enable_phy(struct a +@@ -1622,9 +1622,7 @@ static int advk_pcie_enable_phy(struct a } ret = phy_power_on(pcie->phy); diff --git a/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch b/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch index b37d590475..131371b794 100644 --- a/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch +++ b/target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch @@ -60,7 +60,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c } return 0; -@@ -1149,7 +1149,7 @@ void phy_state_machine(struct work_struc +@@ -1154,7 +1154,7 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch index 90d5dfadcb..cbd94e3e92 100644 --- a/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch +++ b/target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch @@ -23,7 +23,7 @@ Signed-off-by: John Crispin } return 0; -@@ -1149,7 +1152,10 @@ void phy_state_machine(struct work_struc +@@ -1154,7 +1157,10 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; From 2454342e068335ec0a52b2304e83f5f62f6b6b2d Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 25 May 2022 11:21:59 +0100 Subject: [PATCH 07/16] kernel: bump 5.15 to 5.15.42 Deleted (upstreamed): generic/backport-5.15/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch [1] generic/pending-5.15/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch [2] generic/pending-5.15/704-01-netfilter-nft_flow_offload-skip-dst-neigh-lookup-for.patch [3] generic/pending-5.15/704-02-net-fix-dev_fill_forward_path-with-pppoe-bridge.patch [4] generic/pending-5.15/704-03-netfilter-nft_flow_offload-fix-offload-with-pppoe-vl.patch [5] Manually rebased: generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=88b937673b3552d54da20f648e61a123f4c1fa67 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=5f4197a020c049a59ea7907c31f9ab037dcefefe [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=7613dcaceee281973145588f4244f2f78ef85b7f [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=f96b2e06721249ebf8da3254cfef29dcb6583948 [5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.42&id=b329889974aed47e1167c85653c07097013e01a7 Signed-off-by: Rui Salvaterra --- include/kernel-5.15 | 4 +- ...-unregistering-of-framebuffers-witho.patch | 2 +- ...-unplug-firmware-fb-devices-on-force.patch | 4 +- .../600-mips-bmips-add-pci-support.patch | 2 +- ...ow_offload-handle-netdevice-events-f.patch | 4 +- ...wtable-move-dst_check-to-packet-path.patch | 99 ------------------- .../hack-5.15/600-bridge_offload.patch | 4 +- ...-netfilter-add-xt_FLOWOFFLOAD-target.patch | 32 +++--- .../hack-5.15/904-debloat_dma_buf.patch | 2 +- ...ge_allow_receiption_on_disabled_port.patch | 4 +- ...ble-fix-excessive-hw-offload-attempt.patch | 27 ----- ...ow_offload-skip-dst-neigh-lookup-for.patch | 64 ------------ ..._fill_forward_path-with-pppoe-bridge.patch | 66 ------------- ...ow_offload-fix-offload-with-pppoe-vl.patch | 24 ----- ...d-knob-for-filtering-rx-tx-BPDU-pack.patch | 2 +- ...e-main-irq_chip-structure-a-static-d.patch | 10 +- ...ark-Fix-initialization-with-old-Marv.patch | 2 +- 17 files changed, 38 insertions(+), 314 deletions(-) delete mode 100644 target/linux/generic/backport-5.15/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch delete mode 100644 target/linux/generic/pending-5.15/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch delete mode 100644 target/linux/generic/pending-5.15/704-01-netfilter-nft_flow_offload-skip-dst-neigh-lookup-for.patch delete mode 100644 target/linux/generic/pending-5.15/704-02-net-fix-dev_fill_forward_path-with-pppoe-bridge.patch delete mode 100644 target/linux/generic/pending-5.15/704-03-netfilter-nft_flow_offload-fix-offload-with-pppoe-vl.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 0a8c775a41..622d1b844e 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .41 -LINUX_KERNEL_HASH-5.15.41 = 3c7cb1fc3b029b1b765a33af9608b6f18f734246050640def019ee4c4ad6591e +LINUX_VERSION-5.15 = .42 +LINUX_KERNEL_HASH-5.15.42 = 5ecd47a9f663368f005f74d24c8de4ffd93007b675ddf342e2c6db956bf82560 diff --git a/target/linux/bcm27xx/patches-5.15/950-0880-Revert-fbdev-Fix-unregistering-of-framebuffers-witho.patch b/target/linux/bcm27xx/patches-5.15/950-0880-Revert-fbdev-Fix-unregistering-of-framebuffers-witho.patch index e97eb8a31f..66412360bf 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0880-Revert-fbdev-Fix-unregistering-of-framebuffers-witho.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0880-Revert-fbdev-Fix-unregistering-of-framebuffers-witho.patch @@ -11,7 +11,7 @@ This reverts commit 2388f826cdc9af2651991adc0feb79de9bdf2232. --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c -@@ -1619,14 +1619,7 @@ static void do_remove_conflicting_frameb +@@ -1616,14 +1616,7 @@ static void do_remove_conflicting_frameb * If it's not a platform device, at least print a warning. A * fix would add code to remove the device from the system. */ diff --git a/target/linux/bcm27xx/patches-5.15/950-0881-Revert-fbdev-Hot-unplug-firmware-fb-devices-on-force.patch b/target/linux/bcm27xx/patches-5.15/950-0881-Revert-fbdev-Hot-unplug-firmware-fb-devices-on-force.patch index b6ae1dc214..b28d29cc89 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0881-Revert-fbdev-Hot-unplug-firmware-fb-devices-on-force.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0881-Revert-fbdev-Hot-unplug-firmware-fb-devices-on-force.patch @@ -20,7 +20,7 @@ This reverts commit c894ac44786cfed383a6c6b20c1bfb12eb96018a. #include #include #include -@@ -1596,36 +1595,18 @@ static void do_remove_conflicting_frameb +@@ -1593,36 +1592,18 @@ static void do_remove_conflicting_frameb /* check all firmware fbs and kick off if the base addr overlaps */ for_each_registered_fb(i) { struct apertures_struct *gen_aper; @@ -58,7 +58,7 @@ This reverts commit c894ac44786cfed383a6c6b20c1bfb12eb96018a. } } } -@@ -1952,13 +1933,9 @@ EXPORT_SYMBOL(register_framebuffer); +@@ -1949,13 +1930,9 @@ EXPORT_SYMBOL(register_framebuffer); void unregister_framebuffer(struct fb_info *fb_info) { diff --git a/target/linux/bmips/patches-5.15/600-mips-bmips-add-pci-support.patch b/target/linux/bmips/patches-5.15/600-mips-bmips-add-pci-support.patch index b219868442..b10dd8d432 100644 --- a/target/linux/bmips/patches-5.15/600-mips-bmips-add-pci-support.patch +++ b/target/linux/bmips/patches-5.15/600-mips-bmips-add-pci-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -276,6 +276,7 @@ config BMIPS_GENERIC +@@ -277,6 +277,7 @@ config BMIPS_GENERIC select BCM7038_L1_IRQ select BCM7120_L2_IRQ select BRCMSTB_L2_IRQ diff --git a/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch index 9a6b802fd1..19ec9d9409 100644 --- a/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch +++ b/target/linux/generic/backport-5.15/343-netfilter-nft_flow_offload-handle-netdevice-events-f.patch @@ -10,7 +10,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -646,13 +646,41 @@ void nf_flow_table_free(struct nf_flowta +@@ -608,13 +608,41 @@ void nf_flow_table_free(struct nf_flowta } EXPORT_SYMBOL_GPL(nf_flow_table_free); @@ -55,7 +55,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nft_flow_offload.c +++ b/net/netfilter/nft_flow_offload.c -@@ -438,47 +438,14 @@ static struct nft_expr_type nft_flow_off +@@ -444,47 +444,14 @@ static struct nft_expr_type nft_flow_off .owner = THIS_MODULE, }; diff --git a/target/linux/generic/backport-5.15/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch b/target/linux/generic/backport-5.15/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch deleted file mode 100644 index 8d355315c9..0000000000 --- a/target/linux/generic/backport-5.15/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 2738d9d963bd1f06d5114c2b4fa5771a95703991 Mon Sep 17 00:00:00 2001 -From: Ritaro Takenaka -Date: Tue, 17 May 2022 12:55:30 +0200 -Subject: [PATCH] netfilter: flowtable: move dst_check to packet path - -Fixes sporadic IPv6 packet loss when flow offloading is enabled. - -IPv6 route GC and flowtable GC are not synchronized. -When dst_cache becomes stale and a packet passes through the flow before -the flowtable GC teardowns it, the packet can be dropped. -So, it is necessary to check dst every time in packet path. - -Fixes: 227e1e4d0d6c ("netfilter: nf_flowtable: skip device lookup from interface index") -Signed-off-by: Ritaro Takenaka -Signed-off-by: Pablo Neira Ayuso ---- - net/netfilter/nf_flow_table_core.c | 23 +---------------------- - net/netfilter/nf_flow_table_ip.c | 19 +++++++++++++++++++ - 2 files changed, 20 insertions(+), 22 deletions(-) - ---- a/net/netfilter/nf_flow_table_core.c -+++ b/net/netfilter/nf_flow_table_core.c -@@ -431,33 +431,12 @@ nf_flow_table_iterate(struct nf_flowtabl - return err; - } - --static bool flow_offload_stale_dst(struct flow_offload_tuple *tuple) --{ -- struct dst_entry *dst; -- -- if (tuple->xmit_type == FLOW_OFFLOAD_XMIT_NEIGH || -- tuple->xmit_type == FLOW_OFFLOAD_XMIT_XFRM) { -- dst = tuple->dst_cache; -- if (!dst_check(dst, tuple->dst_cookie)) -- return true; -- } -- -- return false; --} -- --static bool nf_flow_has_stale_dst(struct flow_offload *flow) --{ -- return flow_offload_stale_dst(&flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple) || -- flow_offload_stale_dst(&flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple); --} -- - static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data) - { - struct nf_flowtable *flow_table = data; - - if (nf_flow_has_expired(flow) || -- nf_ct_is_dying(flow->ct) || -- nf_flow_has_stale_dst(flow)) -+ nf_ct_is_dying(flow->ct)) - set_bit(NF_FLOW_TEARDOWN, &flow->flags); - - if (test_bit(NF_FLOW_TEARDOWN, &flow->flags)) { ---- a/net/netfilter/nf_flow_table_ip.c -+++ b/net/netfilter/nf_flow_table_ip.c -@@ -227,6 +227,15 @@ static bool nf_flow_exceeds_mtu(const st - return true; - } - -+static inline bool nf_flow_dst_check(struct flow_offload_tuple *tuple) -+{ -+ if (tuple->xmit_type != FLOW_OFFLOAD_XMIT_NEIGH && -+ tuple->xmit_type != FLOW_OFFLOAD_XMIT_XFRM) -+ return true; -+ -+ return dst_check(tuple->dst_cache, tuple->dst_cookie); -+} -+ - static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb, - const struct nf_hook_state *state, - struct dst_entry *dst) -@@ -346,6 +355,11 @@ nf_flow_offload_ip_hook(void *priv, stru - if (nf_flow_state_check(flow, iph->protocol, skb, thoff)) - return NF_ACCEPT; - -+ if (!nf_flow_dst_check(&tuplehash->tuple)) { -+ flow_offload_teardown(flow); -+ return NF_ACCEPT; -+ } -+ - if (skb_try_make_writable(skb, thoff + hdrsize)) - return NF_DROP; - -@@ -582,6 +596,11 @@ nf_flow_offload_ipv6_hook(void *priv, st - if (nf_flow_state_check(flow, ip6h->nexthdr, skb, thoff)) - return NF_ACCEPT; - -+ if (!nf_flow_dst_check(&tuplehash->tuple)) { -+ flow_offload_teardown(flow); -+ return NF_ACCEPT; -+ } -+ - if (skb_try_make_writable(skb, thoff + hdrsize)) - return NF_DROP; - diff --git a/target/linux/generic/hack-5.15/600-bridge_offload.patch b/target/linux/generic/hack-5.15/600-bridge_offload.patch index b396d748b6..5d49d07753 100644 --- a/target/linux/generic/hack-5.15/600-bridge_offload.patch +++ b/target/linux/generic/hack-5.15/600-bridge_offload.patch @@ -154,7 +154,7 @@ static int br_netif_receive_skb(struct net *net, struct sock *sk, struct sk_buff *skb) -@@ -164,6 +165,7 @@ int br_handle_frame_finish(struct net *n +@@ -171,6 +172,7 @@ int br_handle_frame_finish(struct net *n dst->used = now; br_forward(dst->dst, skb, local_rcv, false); } else { @@ -162,7 +162,7 @@ if (!mcast_hit) br_flood(br, skb, pkt_type, local_rcv, false); else -@@ -297,6 +299,9 @@ static rx_handler_result_t br_handle_fra +@@ -304,6 +306,9 @@ static rx_handler_result_t br_handle_fra memset(skb->cb, 0, sizeof(struct br_input_skb_cb)); p = br_port_get_rcu(skb->dev); diff --git a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch index 81432bbeab..f826d65a81 100644 --- a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch +++ b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o --- /dev/null +++ b/net/netfilter/xt_FLOWOFFLOAD.c -@@ -0,0 +1,694 @@ +@@ -0,0 +1,697 @@ +/* + * Copyright (C) 2018-2021 Felix Fietkau + * @@ -289,13 +289,16 @@ Signed-off-by: Felix Fietkau +} + +static void -+xt_flowoffload_check_hook(struct flow_offload *flow, void *data) ++xt_flowoffload_check_hook(struct nf_flowtable *flowtable, ++ struct flow_offload *flow, void *data) +{ -+ struct xt_flowoffload_table *table = data; ++ struct xt_flowoffload_table *table; + struct flow_offload_tuple *tuple0 = &flow->tuplehash[0].tuple; + struct flow_offload_tuple *tuple1 = &flow->tuplehash[1].tuple; + struct xt_flowoffload_hook *hook; + ++ table = container_of(flowtable, struct xt_flowoffload_table, ft); ++ + spin_lock_bh(&hooks_lock); + hlist_for_each_entry(hook, &table->hooks, list) { + if (hook->ops.dev->ifindex != tuple0->iifidx && @@ -323,7 +326,7 @@ Signed-off-by: Felix Fietkau + spin_unlock_bh(&hooks_lock); + + err = nf_flow_table_iterate(&table->ft, xt_flowoffload_check_hook, -+ table); ++ NULL); + if (err && err != -EAGAIN) + goto out; + @@ -803,23 +806,23 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -399,8 +398,7 @@ flow_offload_lookup(struct nf_flowtable +@@ -380,8 +379,7 @@ flow_offload_lookup(struct nf_flowtable } EXPORT_SYMBOL_GPL(flow_offload_lookup); -static int -nf_flow_table_iterate(struct nf_flowtable *flow_table, +int nf_flow_table_iterate(struct nf_flowtable *flow_table, - void (*iter)(struct flow_offload *flow, void *data), + void (*iter)(struct nf_flowtable *flowtable, + struct flow_offload *flow, void *data), void *data) - { -@@ -432,6 +430,7 @@ nf_flow_table_iterate(struct nf_flowtabl - - return err; +@@ -435,6 +433,7 @@ static void nf_flow_offload_gc_step(stru + nf_flow_offload_stats(flow_table, flow); + } } +EXPORT_SYMBOL_GPL(nf_flow_table_iterate); - static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data) + static void nf_flow_offload_work_gc(struct work_struct *work) { --- /dev/null +++ b/include/uapi/linux/netfilter/xt_FLOWOFFLOAD.h @@ -843,13 +846,14 @@ Signed-off-by: Felix Fietkau +#endif /* _XT_FLOWOFFLOAD_H */ --- a/include/net/netfilter/nf_flow_table.h +++ b/include/net/netfilter/nf_flow_table.h -@@ -275,6 +275,10 @@ void nf_flow_table_free(struct nf_flowta +@@ -275,6 +275,11 @@ void nf_flow_table_free(struct nf_flowta void flow_offload_teardown(struct flow_offload *flow); +int nf_flow_table_iterate(struct nf_flowtable *flow_table, -+ void (*iter)(struct flow_offload *flow, void *data), -+ void *data); ++ void (*iter)(struct nf_flowtable *flowtable, ++ struct flow_offload *flow, void *data), ++ void *data); + void nf_flow_snat_port(const struct flow_offload *flow, struct sk_buff *skb, unsigned int thoff, diff --git a/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch b/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch index 2531e32ff8..1f4d2fd394 100644 --- a/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-5.15/904-debloat_dma_buf.patch @@ -63,7 +63,7 @@ Signed-off-by: Felix Fietkau +dma-shared-buffer-objs := $(dma-buf-objs-y) --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c -@@ -1498,4 +1498,5 @@ static void __exit dma_buf_deinit(void) +@@ -1506,4 +1506,5 @@ static void __exit dma_buf_deinit(void) kern_unmount(dma_buf_mnt); dma_buf_uninit_sysfs_statistics(); } diff --git a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch index 2b9570e9a0..9968a79699 100644 --- a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch +++ b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -197,6 +197,9 @@ static void __br_handle_local_finish(str +@@ -204,6 +204,9 @@ static void __br_handle_local_finish(str /* note: already called with rcu_read_lock */ static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb) { @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau __br_handle_local_finish(skb); /* return 1 to signal the okfn() was called so it's ok to use the skb */ -@@ -362,6 +365,17 @@ static rx_handler_result_t br_handle_fra +@@ -369,6 +372,17 @@ static rx_handler_result_t br_handle_fra forward: switch (p->state) { diff --git a/target/linux/generic/pending-5.15/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch b/target/linux/generic/pending-5.15/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch deleted file mode 100644 index c03cb5ae46..0000000000 --- a/target/linux/generic/pending-5.15/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Felix Fietkau -Date: Fri, 6 May 2022 12:37:23 +0200 -Subject: [PATCH] netfilter: flowtable: fix excessive hw offload attempts - after failure - -If a flow cannot be offloaded, the code currently repeatedly tries again as -quickly as possible, which can significantly increase system load. -Fix this by limiting flow timeout update and hardware offload retry to once -per second. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/netfilter/nf_flow_table_core.c -+++ b/net/netfilter/nf_flow_table_core.c -@@ -329,8 +329,10 @@ void flow_offload_refresh(struct nf_flow - u32 timeout; - - timeout = nf_flowtable_time_stamp + flow_offload_get_timeout(flow); -- if (READ_ONCE(flow->timeout) != timeout) -+ if (timeout - READ_ONCE(flow->timeout) > HZ) - WRITE_ONCE(flow->timeout, timeout); -+ else -+ return; - - if (likely(!nf_flowtable_hw_offload(flow_table))) - return; diff --git a/target/linux/generic/pending-5.15/704-01-netfilter-nft_flow_offload-skip-dst-neigh-lookup-for.patch b/target/linux/generic/pending-5.15/704-01-netfilter-nft_flow_offload-skip-dst-neigh-lookup-for.patch deleted file mode 100644 index 6683a53f76..0000000000 --- a/target/linux/generic/pending-5.15/704-01-netfilter-nft_flow_offload-skip-dst-neigh-lookup-for.patch +++ /dev/null @@ -1,64 +0,0 @@ -From: Felix Fietkau -Date: Fri, 6 May 2022 12:43:58 +0200 -Subject: [PATCH] netfilter: nft_flow_offload: skip dst neigh lookup for - ppp devices - -The dst entry does not contain a valid hardware address, so skip the lookup -in order to avoid running into errors here. -The proper hardware address is filled in from nft_dev_path_info - -Signed-off-by: Felix Fietkau ---- - ---- a/net/netfilter/nft_flow_offload.c -+++ b/net/netfilter/nft_flow_offload.c -@@ -36,6 +36,15 @@ static void nft_default_forward_path(str - route->tuple[dir].xmit_type = nft_xmit_type(dst_cache); - } - -+static bool nft_is_valid_ether_device(const struct net_device *dev) -+{ -+ if (!dev || (dev->flags & IFF_LOOPBACK) || dev->type != ARPHRD_ETHER || -+ dev->addr_len != ETH_ALEN || !is_valid_ether_addr(dev->dev_addr)) -+ return false; -+ -+ return true; -+} -+ - static int nft_dev_fill_forward_path(const struct nf_flow_route *route, - const struct dst_entry *dst_cache, - const struct nf_conn *ct, -@@ -47,6 +56,9 @@ static int nft_dev_fill_forward_path(con - struct neighbour *n; - u8 nud_state; - -+ if (!nft_is_valid_ether_device(dev)) -+ goto out; -+ - n = dst_neigh_lookup(dst_cache, daddr); - if (!n) - return -1; -@@ -60,6 +72,7 @@ static int nft_dev_fill_forward_path(con - if (!(nud_state & NUD_VALID)) - return -1; - -+out: - return dev_fill_forward_path(dev, ha, stack); - } - -@@ -78,15 +91,6 @@ struct nft_forward_info { - enum flow_offload_xmit_type xmit_type; - }; - --static bool nft_is_valid_ether_device(const struct net_device *dev) --{ -- if (!dev || (dev->flags & IFF_LOOPBACK) || dev->type != ARPHRD_ETHER || -- dev->addr_len != ETH_ALEN || !is_valid_ether_addr(dev->dev_addr)) -- return false; -- -- return true; --} -- - static void nft_dev_path_info(const struct net_device_path_stack *stack, - struct nft_forward_info *info, - unsigned char *ha, struct nf_flowtable *flowtable) diff --git a/target/linux/generic/pending-5.15/704-02-net-fix-dev_fill_forward_path-with-pppoe-bridge.patch b/target/linux/generic/pending-5.15/704-02-net-fix-dev_fill_forward_path-with-pppoe-bridge.patch deleted file mode 100644 index 984733aeb8..0000000000 --- a/target/linux/generic/pending-5.15/704-02-net-fix-dev_fill_forward_path-with-pppoe-bridge.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Felix Fietkau -Date: Fri, 6 May 2022 13:54:44 +0200 -Subject: [PATCH] net: fix dev_fill_forward_path with pppoe + bridge - -When calling dev_fill_forward_path on a pppoe device, the provided destination -address is invalid. In order for the bridge fdb lookup to succeed, the pppoe -code needs to update ctx->daddr to the correct value. -Fix this by storing the address inside struct net_device_path_ctx - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -@@ -90,7 +90,6 @@ mtk_flow_get_wdma_info(struct net_device - { - struct net_device_path_ctx ctx = { - .dev = dev, -- .daddr = addr, - }; - struct net_device_path path = {}; - -@@ -100,6 +99,7 @@ mtk_flow_get_wdma_info(struct net_device - if (!dev->netdev_ops->ndo_fill_forward_path) - return -1; - -+ memcpy(ctx.daddr, addr, sizeof(ctx.daddr)); - if (dev->netdev_ops->ndo_fill_forward_path(&ctx, &path)) - return -1; - ---- a/drivers/net/ppp/pppoe.c -+++ b/drivers/net/ppp/pppoe.c -@@ -988,6 +988,7 @@ static int pppoe_fill_forward_path(struc - path->encap.proto = htons(ETH_P_PPP_SES); - path->encap.id = be16_to_cpu(po->num); - memcpy(path->encap.h_dest, po->pppoe_pa.remote, ETH_ALEN); -+ memcpy(ctx->daddr, po->pppoe_pa.remote, ETH_ALEN); - path->dev = ctx->dev; - ctx->dev = dev; - ---- a/include/linux/netdevice.h -+++ b/include/linux/netdevice.h -@@ -894,7 +894,7 @@ struct net_device_path_stack { - - struct net_device_path_ctx { - const struct net_device *dev; -- const u8 *daddr; -+ u8 daddr[ETH_ALEN]; - - int num_vlans; - struct { ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -741,11 +741,11 @@ int dev_fill_forward_path(const struct n - const struct net_device *last_dev; - struct net_device_path_ctx ctx = { - .dev = dev, -- .daddr = daddr, - }; - struct net_device_path *path; - int ret = 0; - -+ memcpy(ctx.daddr, daddr, sizeof(ctx.daddr)); - stack->num_paths = 0; - while (ctx.dev && ctx.dev->netdev_ops->ndo_fill_forward_path) { - last_dev = ctx.dev; diff --git a/target/linux/generic/pending-5.15/704-03-netfilter-nft_flow_offload-fix-offload-with-pppoe-vl.patch b/target/linux/generic/pending-5.15/704-03-netfilter-nft_flow_offload-fix-offload-with-pppoe-vl.patch deleted file mode 100644 index 1e0dc9957d..0000000000 --- a/target/linux/generic/pending-5.15/704-03-netfilter-nft_flow_offload-fix-offload-with-pppoe-vl.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Felix Fietkau -Date: Fri, 6 May 2022 15:15:06 +0200 -Subject: [PATCH] netfilter: nft_flow_offload: fix offload with pppoe + - vlan - -When running a combination of PPPoE on top of a VLAN, we need to set -info->outdev to the PPPoE device, otherwise PPPoE encap is skipped -during software offload. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/netfilter/nft_flow_offload.c -+++ b/net/netfilter/nft_flow_offload.c -@@ -123,7 +123,8 @@ static void nft_dev_path_info(const stru - info->indev = NULL; - break; - } -- info->outdev = path->dev; -+ if (!info->outdev) -+ info->outdev = path->dev; - info->encap[info->num_encaps].id = path->encap.id; - info->encap[info->num_encaps].proto = path->encap.proto; - info->num_encaps++; diff --git a/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch index 84a3ee8e60..2a2ca7f1fa 100644 --- a/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch +++ b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev) --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -319,6 +319,8 @@ static rx_handler_result_t br_handle_fra +@@ -326,6 +326,8 @@ static rx_handler_result_t br_handle_fra fwd_mask |= p->group_fwd_mask; switch (dest[5]) { case 0x00: /* Bridge Group Address */ diff --git a/target/linux/generic/pending-5.15/850-0023-PCI-aardvark-Make-main-irq_chip-structure-a-static-d.patch b/target/linux/generic/pending-5.15/850-0023-PCI-aardvark-Make-main-irq_chip-structure-a-static-d.patch index 96a55ba311..de28ebe73a 100644 --- a/target/linux/generic/pending-5.15/850-0023-PCI-aardvark-Make-main-irq_chip-structure-a-static-d.patch +++ b/target/linux/generic/pending-5.15/850-0023-PCI-aardvark-Make-main-irq_chip-structure-a-static-d.patch @@ -33,15 +33,15 @@ Signed-off-by: Marek Behún --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -275,7 +275,6 @@ struct advk_pcie { - int irq; +@@ -274,7 +274,6 @@ struct advk_pcie { + u8 wins_count; struct irq_domain *rp_irq_domain; struct irq_domain *irq_domain; - struct irq_chip irq_chip; raw_spinlock_t irq_lock; struct irq_domain *msi_domain; struct irq_domain *msi_inner_domain; -@@ -1331,14 +1330,19 @@ static void advk_pcie_irq_unmask(struct +@@ -1330,14 +1329,19 @@ static void advk_pcie_irq_unmask(struct raw_spin_unlock_irqrestore(&pcie->irq_lock, flags); } @@ -63,7 +63,7 @@ Signed-off-by: Marek Behún irq_set_chip_data(virq, pcie); return 0; -@@ -1397,7 +1401,6 @@ static int advk_pcie_init_irq_domain(str +@@ -1396,7 +1400,6 @@ static int advk_pcie_init_irq_domain(str struct device *dev = &pcie->pdev->dev; struct device_node *node = dev->of_node; struct device_node *pcie_intc_node; @@ -71,7 +71,7 @@ Signed-off-by: Marek Behún int ret = 0; raw_spin_lock_init(&pcie->irq_lock); -@@ -1408,28 +1411,14 @@ static int advk_pcie_init_irq_domain(str +@@ -1407,28 +1410,14 @@ static int advk_pcie_init_irq_domain(str return -ENODEV; } diff --git a/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch b/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch index 8fee4d49de..4425e3f86b 100644 --- a/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch +++ b/target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch @@ -23,7 +23,7 @@ Acked-by: Miquel Raynal --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c -@@ -1622,9 +1622,7 @@ static int advk_pcie_enable_phy(struct a +@@ -1616,9 +1616,7 @@ static int advk_pcie_enable_phy(struct a } ret = phy_power_on(pcie->phy); From 1f20e70a5cd26a41dbccea9401e2704632953ffe Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 25 May 2022 17:08:52 +0100 Subject: [PATCH 08/16] kernel: bump 5.15 to 5.15.43 No patches needed rebasing. Signed-off-by: Rui Salvaterra --- include/kernel-5.15 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 622d1b844e..070bf0ddda 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .42 -LINUX_KERNEL_HASH-5.15.42 = 5ecd47a9f663368f005f74d24c8de4ffd93007b675ddf342e2c6db956bf82560 +LINUX_VERSION-5.15 = .43 +LINUX_KERNEL_HASH-5.15.43 = 064b913a9d58773a85cafa62f2a2f9031aeee724d7e41b66631037d9a6571c12 From 79e7a2552e89d762a1a2a9bcf327427738f5d238 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 30 May 2022 10:30:24 +0100 Subject: [PATCH 09/16] kernel: bump 5.15 to 5.15.44 Delete the crypto-lib-blake2s kmod package, as BLAKE2s is now built-in. Patches automatically rebased. Signed-off-by: Rui Salvaterra --- include/kernel-5.15 | 4 ++-- ...950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch | 2 +- ...Documentation-devicetree-Add-documentation-for-imx37.patch | 2 +- ...dt-bindings-media-i2c-Add-IMX519-CMOS-sensor-binding.patch | 2 +- target/linux/generic/config-5.15 | 1 - target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch | 4 ++-- .../generic/pending-5.15/205-backtrace_module_info.patch | 4 ++-- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 070bf0ddda..6692deaf3f 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .43 -LINUX_KERNEL_HASH-5.15.43 = 064b913a9d58773a85cafa62f2a2f9031aeee724d7e41b66631037d9a6571c12 +LINUX_VERSION-5.15 = .44 +LINUX_KERNEL_HASH-5.15.44 = 9bfabc38e56758bd0cfe22715a3f9a74cdf4a8870f3b150a03d2ffda29f832dc diff --git a/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch b/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch index 499b48e69c..6a379a2c74 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch @@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17514,6 +17514,14 @@ T: git git://linuxtv.org/media_tree.git +@@ -17516,6 +17516,14 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml F: drivers/media/i2c/imx412.c diff --git a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch index 77c44cf13c..2848cb87c5 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch @@ -132,7 +132,7 @@ Signed-off-by: David Plowman +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17528,6 +17528,7 @@ M: Raspberry Pi Kernel Maintenance +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17532,6 +17532,14 @@ F: Documentation/devicetree/bindings/med +@@ -17534,6 +17534,14 @@ F: Documentation/devicetree/bindings/med F: Documentation/devicetree/bindings/media/i2c/imx477.yaml F: drivers/media/i2c/imx477.c diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 8146161d08..3ddc7fbbf8 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -1177,7 +1177,6 @@ CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_LIB_AES=y CONFIG_CRYPTO_LIB_ARC4=y -# CONFIG_CRYPTO_LIB_BLAKE2S is not set # CONFIG_CRYPTO_LIB_CHACHA is not set # CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set # CONFIG_CRYPTO_LIB_CURVE25519 is not set diff --git a/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch b/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch index a7668acfad..dfba811f31 100644 --- a/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch +++ b/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch @@ -4,7 +4,7 @@ from backports. --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig -@@ -6,7 +6,7 @@ config CRYPTO_LIB_AES +@@ -4,7 +4,7 @@ config CRYPTO_LIB_AES tristate config CRYPTO_LIB_ARC4 @@ -12,4 +12,4 @@ from backports. + tristate "ARC4 cipher library" config CRYPTO_ARCH_HAVE_LIB_BLAKE2S - tristate + bool diff --git a/target/linux/generic/pending-5.15/205-backtrace_module_info.patch b/target/linux/generic/pending-5.15/205-backtrace_module_info.patch index 84e4534143..6379ce071d 100644 --- a/target/linux/generic/pending-5.15/205-backtrace_module_info.patch +++ b/target/linux/generic/pending-5.15/205-backtrace_module_info.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/lib/vsprintf.c +++ b/lib/vsprintf.c -@@ -1001,8 +1001,10 @@ char *symbol_string(char *buf, char *end +@@ -1003,8 +1003,10 @@ char *symbol_string(char *buf, char *end struct printf_spec spec, const char *fmt) { unsigned long value; @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau #endif if (fmt[1] == 'R') -@@ -1023,8 +1025,14 @@ char *symbol_string(char *buf, char *end +@@ -1025,8 +1027,14 @@ char *symbol_string(char *buf, char *end return string_nocheck(buf, end, sym, spec); #else From fbf6992f2b8960cbca36cd652bcdc71d69931076 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 6 Jun 2022 08:46:34 +0100 Subject: [PATCH 10/16] kernel: bump 5.15 to 5.15.45 Patches automatically rebased. Signed-off-by: Rui Salvaterra --- include/kernel-5.15 | 4 ++-- ...hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch | 2 +- target/linux/generic/hack-5.15/251-kconfig.patch | 2 +- target/linux/generic/hack-5.15/253-ksmbd-config.patch | 2 +- target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch | 2 +- .../generic/pending-5.15/530-jffs2_make_lzma_available.patch | 2 +- ...-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch | 2 +- .../patches-5.15/707-net-phy-Add-Qualcom-QCA807x-driver.patch | 2 +- .../patches-5.15/500-gsw-rtl8367s-mt7622-support.patch | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 6692deaf3f..2abff11cbb 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .44 -LINUX_KERNEL_HASH-5.15.44 = 9bfabc38e56758bd0cfe22715a3f9a74cdf4a8870f3b150a03d2ffda29f832dc +LINUX_VERSION-5.15 = .45 +LINUX_KERNEL_HASH-5.15.45 = b2390d7d977c66036ef0ceb294e408f2bdaab6dfeeb8ff4f4e0a84b71f8d8754 diff --git a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index aa04cf68ba..9774074e50 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1305,6 +1308,9 @@ +@@ -1306,6 +1309,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch b/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch index 705f05913b..1d2cb9a029 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch @@ -16,7 +16,7 @@ Signed-off-by: Jonathan Bell --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c -@@ -1900,6 +1900,8 @@ static const struct usb_audio_quirk_flag +@@ -1902,6 +1902,8 @@ static const struct usb_audio_quirk_flag QUIRK_FLAG_ALIGN_TRANSFER), DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */ QUIRK_FLAG_GET_SAMPLE_RATE), diff --git a/target/linux/generic/hack-5.15/251-kconfig.patch b/target/linux/generic/hack-5.15/251-kconfig.patch index 3304e9543a..49c9688cf2 100644 --- a/target/linux/generic/hack-5.15/251-kconfig.patch +++ b/target/linux/generic/hack-5.15/251-kconfig.patch @@ -92,7 +92,7 @@ Signed-off-by: John Crispin bool --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -438,16 +438,16 @@ config BCH_CONST_T +@@ -440,16 +440,16 @@ config BCH_CONST_T # Textsearch support is select'ed if needed # config TEXTSEARCH diff --git a/target/linux/generic/hack-5.15/253-ksmbd-config.patch b/target/linux/generic/hack-5.15/253-ksmbd-config.patch index 89be6f6c47..20a437f5c4 100644 --- a/target/linux/generic/hack-5.15/253-ksmbd-config.patch +++ b/target/linux/generic/hack-5.15/253-ksmbd-config.patch @@ -11,7 +11,7 @@ that can be interpreted by the ASN.1 stream decoder and used to --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -609,7 +609,7 @@ config LIBFDT +@@ -611,7 +611,7 @@ config LIBFDT bool config OID_REGISTRY diff --git a/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch b/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch index dfba811f31..4ffd8cfa37 100644 --- a/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch +++ b/target/linux/generic/hack-5.15/261-lib-arc4-unhide.patch @@ -4,7 +4,7 @@ from backports. --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig -@@ -4,7 +4,7 @@ config CRYPTO_LIB_AES +@@ -6,7 +6,7 @@ config CRYPTO_LIB_AES tristate config CRYPTO_LIB_ARC4 diff --git a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch index 80c8110a82..28cdec51b2 100644 --- a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch +++ b/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch @@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis #define JFFS2_NODE_ACCURATE 0x2000 --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -335,6 +335,12 @@ config ZSTD_DECOMPRESS +@@ -337,6 +337,12 @@ config ZSTD_DECOMPRESS source "lib/xz/Kconfig" diff --git a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch index 662b956e4c..8a718a02f2 100644 --- a/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch +++ b/target/linux/generic/pending-5.15/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch @@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -6320,6 +6320,7 @@ static int mv88e6xxx_register_switch(str +@@ -6319,6 +6319,7 @@ static int mv88e6xxx_register_switch(str ds->ops = &mv88e6xxx_switch_ops; ds->ageing_time_min = chip->info->age_time_coeff; ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX; diff --git a/target/linux/ipq40xx/patches-5.15/707-net-phy-Add-Qualcom-QCA807x-driver.patch b/target/linux/ipq40xx/patches-5.15/707-net-phy-Add-Qualcom-QCA807x-driver.patch index eba1d3454e..87be5980c4 100644 --- a/target/linux/ipq40xx/patches-5.15/707-net-phy-Add-Qualcom-QCA807x-driver.patch +++ b/target/linux/ipq40xx/patches-5.15/707-net-phy-Add-Qualcom-QCA807x-driver.patch @@ -40,7 +40,7 @@ Signed-off-by: Robert Marko help --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -90,6 +90,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o +@@ -92,6 +92,7 @@ obj-$(CONFIG_NATIONAL_PHY) += national.o obj-$(CONFIG_NXP_C45_TJA11XX_PHY) += nxp-c45-tja11xx.o obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o obj-$(CONFIG_QSEMI_PHY) += qsemi.o diff --git a/target/linux/mediatek/patches-5.15/500-gsw-rtl8367s-mt7622-support.patch b/target/linux/mediatek/patches-5.15/500-gsw-rtl8367s-mt7622-support.patch index aec8f327f1..262df9d2cf 100644 --- a/target/linux/mediatek/patches-5.15/500-gsw-rtl8367s-mt7622-support.patch +++ b/target/linux/mediatek/patches-5.15/500-gsw-rtl8367s-mt7622-support.patch @@ -15,7 +15,7 @@ help --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -93,6 +93,7 @@ obj-$(CONFIG_QSEMI_PHY) += qsemi.o +@@ -95,6 +95,7 @@ obj-$(CONFIG_QSEMI_PHY) += qsemi.o obj-$(CONFIG_REALTEK_PHY) += realtek.o obj-$(CONFIG_RENESAS_PHY) += uPD60620.o obj-$(CONFIG_ROCKCHIP_PHY) += rockchip.o From 677774d445ced1a56e73fe62df47b4eb66441721 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Mon, 25 Apr 2022 09:09:23 -0300 Subject: [PATCH 11/16] wolfssl: don't change ABI because of hw crypto Enabling different hardware crypto acceleration should not change the library ABI. Add them to PKG_CONFIG_DEPENDS after the ABI version hash has been computed. Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Makefile | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index cfd65b4a69..46bf52795b 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -25,16 +25,27 @@ PKG_MAINTAINER:=Eneas U de Queiroz PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl PKG_CONFIG_DEPENDS:=\ - CONFIG_WOLFSSL_HAS_AES_CCM CONFIG_WOLFSSL_HAS_AFALG \ - CONFIG_WOLFSSL_HAS_ARC4 CONFIG_WOLFSSL_HAS_CHACHA_POLY \ - CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL \ - CONFIG_WOLFSSL_HAS_DH CONFIG_WOLFSSL_HAS_DTLS \ - CONFIG_WOLFSSL_HAS_ECC25519 CONFIG_WOLFSSL_HAS_OCSP \ - CONFIG_WOLFSSL_HAS_SESSION_TICKET CONFIG_WOLFSSL_HAS_TLSV10 \ - CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_HAS_CERTGEN \ - CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES + CONFIG_WOLFSSL_HAS_AES_CCM \ + CONFIG_WOLFSSL_HAS_ARC4 \ + CONFIG_WOLFSSL_HAS_CERTGEN \ + CONFIG_WOLFSSL_HAS_CHACHA_POLY \ + CONFIG_WOLFSSL_HAS_DH \ + CONFIG_WOLFSSL_HAS_DTLS \ + CONFIG_WOLFSSL_HAS_ECC25519 \ + CONFIG_WOLFSSL_HAS_OCSP \ + CONFIG_WOLFSSL_HAS_OPENVPN CONFIG_WOLFSSL_ALT_NAMES \ + CONFIG_WOLFSSL_HAS_SESSION_TICKET \ + CONFIG_WOLFSSL_HAS_TLSV10 \ + CONFIG_WOLFSSL_HAS_TLSV13 \ + CONFIG_WOLFSSL_HAS_WPAS -PKG_ABI_VERSION=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS))) +PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(call confvar,$(PKG_CONFIG_DEPENDS))) + +PKG_CONFIG_DEPENDS+=\ + CONFIG_WOLFSSL_HAS_AFALG \ + CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \ + CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \ + CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL include $(INCLUDE_DIR)/package.mk From 18fd12edb810f9dfbf8410bb81f639df052134cb Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 19 Apr 2022 18:23:05 -0300 Subject: [PATCH 12/16] wolfssl: add benchmark utility This packages the wolfssl benchmark utility. Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Makefile | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 46bf52795b..9283737542 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -49,12 +49,16 @@ PKG_CONFIG_DEPENDS+=\ include $(INCLUDE_DIR)/package.mk -define Package/libwolfssl +define Package/libwolfssl/Default SECTION:=libs SUBMENU:=SSL CATEGORY:=Libraries - TITLE:=wolfSSL library URL:=http://www.wolfssl.com/ +endef + +define Package/libwolfssl +$(call Package/libwolfssl/Default) + TITLE:=wolfSSL library MENU:=1 PROVIDES:=libcyassl DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user @@ -70,6 +74,16 @@ define Package/libwolfssl/config source "$(SOURCE)/Config.in" endef +define Package/libwolfssl-benchmark +$(call Package/libwolfssl/Default) + TITLE:=wolfSSL Benchmark Utility + DEPENDS:=libwolfssl +endef + +define Package/libwolfssl-benchmark/description +This is the wolfssl benchmark utility. +endef + TARGET_CFLAGS += \ $(FPIC) \ -fomit-frame-pointer \ @@ -88,7 +102,7 @@ CONFIGURE_ARGS += \ --enable-sni \ --enable-stunnel \ --enable-altcertchains \ - --disable-crypttests \ + --$(if $(CONFIG_PACKAGE_libwolfssl-benchmark),enable,disable)-crypttests \ --disable-examples \ --disable-jobserver \ --$(if $(CONFIG_IPV6),enable,disable)-ipv6 \ @@ -136,4 +150,10 @@ define Package/libwolfssl/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/ endef +define Package/libwolfssl-benchmark/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/wolfcrypt/benchmark/.libs/benchmark $(1)/usr/bin/wolfssl-benchmark +endef + $(eval $(call BuildPackage,libwolfssl)) +$(eval $(call BuildPackage,libwolfssl-benchmark)) From 0a2edc2714dcda10be902c32525723ce2cbcb138 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 19 Apr 2022 12:02:09 -0300 Subject: [PATCH 13/16] wolfssl: enable CPU crypto instructions This enables AES & SHA CPU instructions for compatible armv8, and x86_64 architectures. Add this to the hardware acceleration choice, since they can't be enabled at the same time. The package was marked non-shared, since the arm CPUs may or may not have crypto extensions enabled based on licensing; bcm27xx does not enable them. There is no run-time detection of this for arm. NOTE: Should this be backported to a release branch, it must be done shortly before a new minor release, because the change to nonshared will remove libwolfssl from the shared packages, but the nonshared are only built in a subsequent release! Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Config.in | 12 ++++++++++++ package/libs/wolfssl/Makefile | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/package/libs/wolfssl/Config.in b/package/libs/wolfssl/Config.in index b32d5ab6cb..f495a90ff6 100644 --- a/package/libs/wolfssl/Config.in +++ b/package/libs/wolfssl/Config.in @@ -62,13 +62,25 @@ config WOLFSSL_ALT_NAMES config WOLFSSL_HAS_DEVCRYPTO bool +config WOLFSSL_ASM_CAPABLE + bool + default x86_64 || (aarch64 && !TARGET_bcm27xx) + choice prompt "Hardware Acceleration" + default WOLFSSL_HAS_CPU_CRYPTO if WOLFSSL_ASM_CAPABLE default WOLFSSL_HAS_NO_HW config WOLFSSL_HAS_NO_HW bool "None" + config WOLFSSL_HAS_CPU_CRYPTO + bool "Use CPU crypto instructions" + depends on WOLFSSL_ASM_CAPABLE + help + This will use Intel AESNI insturctions or armv8 Crypto Extensions. + Either of them should easily outperform hardware crypto in WolfSSL. + config WOLFSSL_HAS_AFALG bool "AF_ALG" diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 9283737542..3edd526364 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -43,6 +43,7 @@ PKG_ABI_VERSION:=$(patsubst %-stable,%,$(PKG_VERSION)).$(call version_abbrev,$(c PKG_CONFIG_DEPENDS+=\ CONFIG_WOLFSSL_HAS_AFALG \ + CONFIG_WOLFSSL_HAS_CPU_CRYPTO \ CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \ CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \ CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL @@ -59,6 +60,7 @@ endef define Package/libwolfssl $(call Package/libwolfssl/Default) TITLE:=wolfSSL library + PKGFLAGS:=nonshared MENU:=1 PROVIDES:=libcyassl DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user @@ -133,6 +135,15 @@ CONFIGURE_ARGS += \ --enable-wpas --enable-fortress --enable-fastmath endif +ifdef CONFIG_WOLFSSL_HAS_CPU_CRYPTO + ifdef CONFIG_aarch64 + CONFIGURE_ARGS += --enable-armasm + TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto) + else ifdef CONFIG_TARGET_x86_64 + CONFIGURE_ARGS += --enable-intelasm + endif +endif + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ From 5c1b1918abf853c95976daf7fea58fb1355eae6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= Date: Wed, 1 Jun 2022 10:42:33 +0300 Subject: [PATCH 14/16] bcm53xx: remove BROKEN flag from Asus RT-AC88U MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The image builds and works fine on Asus RT-AC88U. Therefore, remove the BROKEN flag from the makefile. Signed-off-by: Arınç ÜNAL --- target/linux/bcm53xx/image/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index d70e394b94..0d0cf9b19b 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -172,7 +172,6 @@ define Device/asus_rt-ac88u DEVICE_MODEL := RT-AC88U DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) ASUS_PRODUCTID := RT-AC88U - BROKEN := y endef TARGET_DEVICES += asus_rt-ac88u From 8121e7dd75d53bc7fa1f16fc360eda03385a9b05 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Wed, 1 Jun 2022 17:20:08 -0300 Subject: [PATCH 15/16] realtek: add reset button for D-Link DGS-1210-28 Tested in a DGS-1210-28 F3, both triggering failsafe and reboot. Signed-off-by: Luiz Angelo Daros de Luca Reviewed-by: Robert Marko --- .../dts-5.10/rtl8382_d-link_dgs-1210-28.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts index edd4fb140f..bf25140e97 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts +++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts @@ -5,6 +5,24 @@ / { compatible = "d-link,dgs-1210-28", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-28"; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 33 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio1: rtl8231-gpio { + compatible = "realtek,rtl8231-gpio"; + #gpio-cells = <2>; + gpio-controller; + indirect-access-bus-id = <0>; + }; }; ðernet0 { From f5a87a0a7b8d5aa83435868eb324601df6c4f4dc Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Wed, 1 Jun 2022 19:20:22 -0300 Subject: [PATCH 16/16] realtek: add gpio-restart for D-Link DGS-1210-28 A GPIO assert is required to reset the system. Otherwise, the system will hang on reboot. Signed-off-by: Luiz Angelo Daros de Luca Reviewed-by: Robert Marko --- .../linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts index bf25140e97..a73e19e16f 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts +++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts @@ -6,6 +6,12 @@ compatible = "d-link,dgs-1210-28", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-28"; + gpio-restart { + compatible = "gpio-restart"; + gpios = <&gpio1 34 GPIO_ACTIVE_LOW>; + open-source; + }; + keys { compatible = "gpio-keys-polled"; poll-interval = <20>;