kernel: bump 5.15 to 5.15.41
authorRui Salvaterra <rsalvaterra@gmail.com>
Wed, 18 May 2022 14:32:03 +0000 (15:32 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 6 Jun 2022 17:20:28 +0000 (19:20 +0200)
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 <rsalvaterra@gmail.com>
58 files changed:
include/kernel-5.15
target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch
target/linux/bcm27xx/patches-5.15/950-0001-drm-vc4-hdmi-Split-the-CEC-disable-enable-functions-.patch
target/linux/bcm27xx/patches-5.15/950-0002-drm-vc4-hdmi-Make-sure-the-device-is-powered-with-CE.patch
target/linux/bcm27xx/patches-5.15/950-0004-drm-vc4-hdmi-Remove-the-DDC-probing-for-status-detec.patch
target/linux/bcm27xx/patches-5.15/950-0005-drm-vc4-hdmi-Raise-the-maximum-clock-rate.patch
target/linux/bcm27xx/patches-5.15/950-0006-drm-vc4-hdmi-Fix-HPD-GPIO-detection.patch
target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch
target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch
target/linux/bcm27xx/patches-5.15/950-0009-drm-vc4-hdmi-Prevent-access-to-crtc-state-outside-of.patch
target/linux/bcm27xx/patches-5.15/950-0010-drm-vc4-hdmi-Check-the-device-state-in-prepare.patch
target/linux/bcm27xx/patches-5.15/950-0011-drm-vc4-hdmi-Introduce-an-output_enabled-flag.patch
target/linux/bcm27xx/patches-5.15/950-0012-drm-vc4-hdmi-Introduce-a-scdc_enabled-flag.patch
target/linux/bcm27xx/patches-5.15/950-0021-drm-vc4-hdmi-Actually-check-for-the-connector-status.patch
target/linux/bcm27xx/patches-5.15/950-0144-bcmgenet-Better-coalescing-parameter-defaults.patch
target/linux/bcm27xx/patches-5.15/950-0292-net-bcmgenet-Reset-RBUF-on-first-open.patch
target/linux/bcm27xx/patches-5.15/950-0425-drm-vc4-A-present-but-empty-dmas-disables-audio.patch
target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch
target/linux/bcm27xx/patches-5.15/950-0429-vc4_hdmi-Report-that-3d-stereo-is-allowed.patch
target/linux/bcm27xx/patches-5.15/950-0430-vc4-Clear-unused-infoframe-packet-RAM-registers.patch
target/linux/bcm27xx/patches-5.15/950-0432-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch
target/linux/bcm27xx/patches-5.15/950-0442-drm-vc4-hdmi-Simplify-the-connector-state-retrieval.patch
target/linux/bcm27xx/patches-5.15/950-0443-drm-vc4-Fix-timings-for-interlaced-modes.patch
target/linux/bcm27xx/patches-5.15/950-0475-drm-vc4-Reset-HDMI-MISC_CONTROL-register.patch
target/linux/bcm27xx/patches-5.15/950-0572-drm-vc4-Don-t-try-disabling-SCDC-on-Pi0-3.patch
target/linux/bcm27xx/patches-5.15/950-0580-drm-vc4-Ensure-vc4_hdmi-doesn-t-use-2711-HPD-registe.patch
target/linux/bcm27xx/patches-5.15/950-0590-drm-vc4-Move-HDMI-reset-to-pm_resume.patch
target/linux/bcm27xx/patches-5.15/950-0603-vc4-drm-Ignore-vc4_hdmi-output_enabled-for-allowing-.patch
target/linux/bcm27xx/patches-5.15/950-0607-drm-vc4-Fix-build-without-DRM_VC4_HDMI_CEC.patch
target/linux/bcm27xx/patches-5.15/950-0622-drm-vc4-Skip-writes-to-disabled-packet-RAM.patch
target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch
target/linux/bcm27xx/patches-5.15/950-0624-drm-vc4-hdmi-Add-full-range-RGB-helper.patch
target/linux/bcm27xx/patches-5.15/950-0625-drm-vc4-hdmi-Use-full-range-helper-in-csc-functions.patch
target/linux/bcm27xx/patches-5.15/950-0626-drm-vc4-hdmi-Move-XBAR-setup-to-csc_setup.patch
target/linux/bcm27xx/patches-5.15/950-0627-drm-vc4-hdmi-Replace-CSC_CTL-hardcoded-value-by-defi.patch
target/linux/bcm27xx/patches-5.15/950-0628-drm-vc4-hdmi-Define-colorspace-matrices.patch
target/linux/bcm27xx/patches-5.15/950-0629-drm-vc4-hdmi-Change-CSC-callback-prototype.patch
target/linux/bcm27xx/patches-5.15/950-0630-drm-vc4-hdmi-Move-clock-validation-to-its-own-functi.patch
target/linux/bcm27xx/patches-5.15/950-0631-drm-vc4-hdmi-Move-clock-calculation-into-its-own-fun.patch
target/linux/bcm27xx/patches-5.15/950-0632-drm-vc4-hdmi-Take-the-sink-maximum-TMDS-clock-into-a.patch
target/linux/bcm27xx/patches-5.15/950-0633-drm-vc4-hdmi-Take-bpp-into-account-for-the-scrambler.patch
target/linux/bcm27xx/patches-5.15/950-0634-drm-vc4-hdmi-Always-try-to-have-the-highest-bpc.patch
target/linux/bcm27xx/patches-5.15/950-0635-drm-vc4-hdmi-Support-HDMI-YUV-output.patch
target/linux/bcm27xx/patches-5.15/950-0642-drm-vc4-hdmi-Fix-HDMI-monitor-detection-in-polled-mo.patch
target/linux/bcm27xx/patches-5.15/950-0643-drm-vc4-hdmi-Fix-no-video-output-on-DVI-monitors.patch
target/linux/bcm27xx/patches-5.15/950-0655-drm-vc4-hdmi-Fix-clock-value-used-for-validating-hdm.patch
target/linux/bcm27xx/patches-5.15/950-0669-drm-vc4_hdmi-Add-Broadcast-RGB-property-to-allow-ove.patch
target/linux/bcm27xx/patches-5.15/950-0786-drm-vc4-hdmi-Add-CSC-for-BT601-709-2020-limited-and-.patch
target/linux/bcm27xx/patches-5.15/950-0808-drm-vc4_hdmi-Force-modeset-when-bpc-changes.patch
target/linux/bcm27xx/patches-5.15/950-0829-vc4_hdmi-Remove-VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWA.patch
target/linux/bcm27xx/patches-5.15/950-0868-drm-vc4-hdmi-Rework-hdmi_enable_4kp60-detection.patch
target/linux/bcm27xx/patches-5.15/950-0911-drm-vc4_hdmi-Force-a-modeset-when-Broadcast-RGB-sett.patch
target/linux/generic/backport-5.15/200-v5.18-tools-resolve_btfids-Build-with-host-flags.patch
target/linux/generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch [deleted file]
target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch
target/linux/generic/pending-5.15/851-0006-Revert-PCI-aardvark-Fix-initialization-with-old-Marv.patch
target/linux/ramips/patches-5.15/720-Revert-net-phy-simplify-phy_link_change-arguments.patch
target/linux/ramips/patches-5.15/721-NET-no-auto-carrier-off-support.patch

index fed7f9dbfac6063a980e0dddd7ca30d04d427bd5..0a8c775a41de2a2afc39e0bd65060ded537ca888 100644 (file)
@@ -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
index 436d6e0907a4a63c8ad51a03e66d83e3886a5409..4c69139eec09eb44afa03e5382b5ca8ad25bd14a 100644 (file)
  #include <linux/types.h>
 +#include <linux/in6.h>
  
- 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 {
index 6f8ea4e9cc031e0ef8c650a8c25d9ea49411fc5d..379165238de94898c367b35ef13194a0cc5f4b0a 100644 (file)
@@ -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);
  
index a0ec38bada6776b46f8bfd88cfd9c4fa38ad14a5..d3f665936350b8010f9c904159a1603099ab2820 100644 (file)
@@ -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);
  
index f4dd7878d4c863eff276af34bbbe0e4e1cf27f67..4e6a10925370e791fddca3522332f30f56b6b546 100644 (file)
@@ -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;
index dbefadc5d59166b827432df1ce0141c237aee511..4838fe330c671fd0838ae08662b340bbd2511d6d 100644 (file)
@@ -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",
index bfc2ed4e8bfc50e71c0f4d7f8716f2513f271631..910f983bd1134973c93661ecc00984dd967c59fa 100644 (file)
@@ -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));
  
index 64b97d89626acd3c83d080df5be9d5fe604292ed..029fabd8e0f02a53a70e8a004c19163786890051 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  #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 <maxime@cerno.tech>
        }
  
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
  
        /*
         * 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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
                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 <maxime@cerno.tech>
                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 <maxime@cerno.tech>
                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 <maxime@cerno.tech>
                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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        /*
         * 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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        memcpy(&vc4_hdmi->audio.infoframe, &params->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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
  
                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;
index 2298c0d812bf155c85994421bf47a9900d8ab7f9..f3f4e14903c7a317d823a5816dcd93b93124a0a5 100644 (file)
@@ -38,7 +38,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        /*
         * 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 <maxime@cerno.tech>
        }
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
        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, &params->cea, sizeof(params->cea));
        vc4_hdmi_set_audio_infoframe(encoder);
  
@@ -329,7 +329,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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;
index 7d29e9551492431453b143cb8be199afba364d6a..db65832d9b3a58a7daebe4c3bd474af5c9def280 100644 (file)
@@ -29,7 +29,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
                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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  #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 <maxime@cerno.tech>
        .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)
  {
index dac66f902b11175117f40b1100c149b4cde7dac9..1361850d0055eee5ba6d877d089b3714ee349ce0 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
                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);
  
index 616cfd54d184c7ff6b4da3a1c6f4f8c731556f11..0e04ba7924664dfbbd90aacdd03fd21fbde06178 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
  }
  
  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)
  {
index 888de174e2800890a7994367d74c28d4f8c34dd6..13601ede9a9ca4cd746738528af71086c88ae3e3 100644 (file)
@@ -35,7 +35,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  
        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;
  
index 44e4d66cc3e1e307650fb9f225bccb5d0d421e83..d7d207f7db2fd9fea6482bd2d105dfccf2e3678a 100644 (file)
@@ -44,7 +44,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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;
index 462f8a8e5a08b1eabf905f266bff6b1f0570478a..17512cfcc2de462cb80c5d8145aabbfd23b9f5b9 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
        /* 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 */
index 06f757ad9d59a6a6d2ccc1f638841ce5656ebdd3..42df30457bd9c83a82b3dd8ab3ff0d5823f7cc4e 100644 (file)
@@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
  
        /* 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 */
index eb3528cf668195fddd869125923de4763f08b9e1..261035d4b4986f73ecd9984b759027bad39d1861 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
 
 --- 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;
index feedea8f43a50fbd5b2070ac55ffb74ed2a644d6..fdc2139c5e2cde4ea395e290e659513df93e1664 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 
 --- 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 <dave.stevenson@raspberrypi.com>
  
        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 <dave.stevenson@raspberrypi.com>
  
        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);
        }
  
index 6ff1ed9d3eee842a04d9f93146c3ef9474f66630..b823897c64757179829521c79aefc682c86ebd58 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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;
index df693920dc0d8cbe4700d07023dec2feac147416..ac08e34af301ab2707ad890ebdb879fe98698957 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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 <popcornmix@gmail.com>
        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;
        }
  
index 477ad923e76c3608a948af6f6706a7516ab8fac8..4c0e8c2d6c9c4e3aeb6adca14f4552cf558cd1f1 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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,
index b84a607ea065d16d5604a5b84b983f93a9328cfa..93b8a3971a9cc6b3c23b4e1f8e9e44fdb9b810c3 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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");
  }
  
index 20cb8d3ad749fd1f98d4e6fc7639341095ed033e..a6d88d1ec1d50a846c7d9ba23a74bdb841be9b5e 100644 (file)
@@ -49,7 +49,7 @@ Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
        } 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 <kfyatek+publicgit@gmail.com>
                                        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) |
index 64f4e9bd5b83abc57623750ac043d70552b744ba..9032f11794e929a8d410e7af3bd5e32b539d414a 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 
 --- 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 <dave.stevenson@raspberrypi.com>
  #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);
  
index 6b7acd8e4a44313bb64ce72f027486e89de4ed09..3bb136f3c0f79e7db8748a84adc4ac67353974f0 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 
 --- 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.
         */
index c542d240a422dee5ed4afc55305e6a2f6ca4bb77..fb4258ca79e089f5c1252ed5ea3366cc00cddc4e 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 
 --- 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 <dave.stevenson@raspberrypi.com>
                        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 <dave.stevenson@raspberrypi.com>
  /* 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 <dave.stevenson@raspberrypi.com>
  };
  
  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,
index c8bd69cae20fd14515a615ac042dcf972b4a854b..581279ac1bffc642438ce8f6bc89aa4cf643f454 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 
 --- 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 <dave.stevenson@raspberrypi.com>
        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 <dave.stevenson@raspberrypi.com>
        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 <dave.stevenson@raspberrypi.com>
  #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 <dave.stevenson@raspberrypi.com>
  #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 <dave.stevenson@raspberrypi.com>
        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;
  
index 9d0361c426164af81066593fecacbb61bc9d70a2..9ecf5db11d369a535d22202c91d8be7d6c119407 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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 <popcornmix@gmail.com>
        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 <popcornmix@gmail.com>
  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 <popcornmix@gmail.com>
  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 <popcornmix@gmail.com>
  };
  
  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);
  
        /*
index ac2e8e9839bf36bbdb74be9237412601fd4c8f67..777cdda54ff7d8aeafd620a4a24c5887804596be 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
 
 --- 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) {};
  
index 565fad9bd6ff31da671333f1762e29f280eef52b..fd1c51dd48e1ce775323ab2e5c85b6e6e40e6a35 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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 <popcornmix@gmail.com>
        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 <popcornmix@gmail.com>
  
                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, &params->cea, sizeof(params->cea));
index 8dce12c8dbfa43980fdcecd8ff03c85df64a13db..a0f4963c414a2a4e5fcf17e4f00942687a38558b 100644 (file)
@@ -76,7 +76,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
        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);
index 5f606d39b2849293069be2bd2314dfd57315c6c3..75d96d74e37395c8c9739e4ae5f3b07736b463bf 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
  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);
  
index f6d45b1c33a59cf76e520e9332a31c3d55e2c9f2..5ec3643a501b85508d5d2b7b44928113fe455695 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  {
        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 <maxime@cerno.tech>
                /* 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 <maxime@cerno.tech>
  {
        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 <maxime@cerno.tech>
                /* 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;
index 6db6ff62bbcdcbde7cf4a7bf457f92ee649d4408..879be397b9f8da665ffc346f48406b56e8dde849 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
        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);
  
index 8a9630c569f6256d1f43a748d96fca2c914962f3..6d03449024be5353d332800d1eddd57776760bd4 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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;
index ae2faca5f1a6b6e4e2a10d49bebdf38d2ed537d6..20c8b9874c52c58be184d1c701eb6856cbbc663c 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
  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);
  
index 6dd476ae5e88cadc5627b2b7b21a99dbe139803c..61911b4825fb472b0c8ee70b7e8276bf796965a2 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
                               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 <maxime@cerno.tech>
                               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);
index c3222e51a42c14d858b2fd1df4ff4c41f6b81984..f0b5b48149e3df170443e5309d5d33b1810dff08 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
  #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 <maxime@cerno.tech>
                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;
  
index 506b0cc5d8b5ceb97e2d2bf10d6bdacf5d3db6d2..7b99321e6d77fe34877902f36f9332ac81526cc4 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
  #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 <maxime@cerno.tech>
  
        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;
        }
  
index b9b1636b1624dfd36a561e92b8c7480c0dfded10..ee520595f7272cb1377713fe035f7ea7efc07109 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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)
  {
index d44e161cf0b730cf6449e0f2d674f8fe1db466ee..608cc18fda94ffb29699d2bb107073386cb491e4 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
  }
  
  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 <maxime@cerno.tech>
                                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 <maxime@cerno.tech>
                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);
index e57923dd480126673c7341c2d1abb68696c3c18d..50bbb7a5077841969fc347f68fd10a37219ef467 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
        __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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  #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;
        }
  
index 72c79c3eed093daf67724298486c5d22306896b5..cd5896f5cd1265ed67f090d0c57828da94911e9e 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- 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 <maxime@cerno.tech>
  
        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 <maxime@cerno.tech>
                                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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        __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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
                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 <maxime@cerno.tech>
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
        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);
  
index bbe81baa156b30c224f91450cc57e1b4c7f4ebda..8fb8fe8034c774f4c6ca53a3d3d91187cee27ce7 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Matthias Reichl <hias@horus.com>
 
 --- 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 <hias@horus.com>
        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 <hias@horus.com>
                        }
                }
  
-@@ -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;
        }
  
index 9f2301119e42e6b5d22c576306239da2cec54214..8e1f4bb68128790addcb6494a6ac86af763869ef 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Matthias Reichl <hias@horus.com>
 
 --- 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");
  
index 988876077a614414b68ba174a80d1a287a3a7e53..815bdd0a321df8c8a85d548a4e7d038fd327ecfc 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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)
  {
index 819e983e6e6d6746d36cd5f3ef32cc06c919cf25..00324e11e916ed9522ecae8db9561656e1b3deea 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 
 --- 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 <dave.stevenson@raspberrypi.com>
  #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 <dave.stevenson@raspberrypi.com>
        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 <dave.stevenson@raspberrypi.com>
  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 <dave.stevenson@raspberrypi.com>
        __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 <dave.stevenson@raspberrypi.com>
  };
  
  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 <dave.stevenson@raspberrypi.com>
  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 <dave.stevenson@raspberrypi.com>
        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;
index dbfc1520c1a7ab9f421e122dabe0ff8c2d97a3f8..3a8626bf24af22a4e1817895ccf19ee6a6c43524 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
 
 --- 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 <dave.stevenson@raspberrypi.com>
  {
        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 <dave.stevenson@raspberrypi.com>
                                           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 <dave.stevenson@raspberrypi.com>
                /* 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 <dave.stevenson@raspberrypi.com>
  /*
   * 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 <dave.stevenson@raspberrypi.com>
   * 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 <dave.stevenson@raspberrypi.com>
  };
  
  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 <dave.stevenson@raspberrypi.com>
        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:
index 3b2bc702aa7401a7dfd938c0d1f4d51622ee9aad..7e145873482ec0dd2d730ff650a375f2e533a3d8 100644 (file)
@@ -25,7 +25,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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 <popcornmix@gmail.com>
        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;
  
index fc5e3c960fbe1f2c0c1231959607c444655d3f7c..4b811662d0fed38bfb14cd0fdcda16b2d68f5276 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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));
index 60f6921ede1964f8d370918e6ff5c38019c8b2b6..eae608d331bc90db20eb20409724e7310226327d 100644 (file)
@@ -48,7 +48,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
  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 <maxime@cerno.tech>
        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 <maxime@cerno.tech>
                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 <maxime@cerno.tech>
                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");
  
index 97d3086af52d4ec7ed87e87d6a124adda8d6bf5c..00e6bf34652288ff73869aa97ddb48f5daae5d48 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
 
 --- 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);
index 489575fb3526f27343e75f9281150d95b39c4189..caec8db5d692b0f3fa38f5480641bfbb2795935e 100644 (file)
@@ -24,8 +24,6 @@ Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
  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 (file)
index bcada79..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-From f81d97cb646ab8b90fb181d66fccaf9589990de6 Mon Sep 17 00:00:00 2001
-From: Matthew Hagan <mnhagan88@gmail.com>
-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 <mnhagan88@gmail.com>
-Reviewed-by: Andrew Lunn <andrew@lunn.ch>
----
- 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))
index 1ddfc8e0148631df18ae100a46ff340bd300f786..fd9e63a6137d6f7ed86d616377e2396df4bc6ae9 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
        /*
         * 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 <ansuelsmth@gmail.com>
                 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 <ansuelsmth@gmail.com>
        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 <ansuelsmth@gmail.com>
        [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 <ansuelsmth@gmail.com>
  #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;
index 4d3bc62bad500f1e3dfb42cb292768538fcb36a9..8fee4d49de3d90259bc2af39e0fe9cdffe4e898e 100644 (file)
@@ -23,7 +23,7 @@ Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
 
 --- 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);
index b37d590475b24647a55d402fdbfaaecfcc68d28c..131371b79444e20a4fe473acba3647add8576d72 100644 (file)
@@ -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;
index 90d5dfadcbccef5a94b453d82734638e37ad3b6f..cbd94e3e9213725da0ae6cbb1f31b12510b2cebc 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
        }
  
        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;