From ed1536e0b6b7f2aeea6881632b89b269d27ff7ce Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 18 May 2022 15:32:03 +0100 Subject: [PATCH] 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; -- 2.30.2