diff options
author | Rui Salvaterra <rsalvaterra@gmail.com> | 2022-05-18 15:32:03 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-06-06 19:20:28 +0200 |
commit | ed1536e0b6b7f2aeea6881632b89b269d27ff7ce (patch) | |
tree | baf77f9a1bb148f9d0c765d78de348e81e92583b /target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch | |
parent | f800f8d6fc4f21ed87454aa657ebbf376dc3b6cf (diff) | |
download | upstream-ed1536e0b6b7f2aeea6881632b89b269d27ff7ce.tar.gz upstream-ed1536e0b6b7f2aeea6881632b89b269d27ff7ce.tar.bz2 upstream-ed1536e0b6b7f2aeea6881632b89b269d27ff7ce.zip |
kernel: bump 5.15 to 5.15.41
Deleted (upstreamed):
generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch [1]
Other patches automatically rebased.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.41&id=99858114a3b2c8f5f8707d9bbd46c50f547c87c0
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch b/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch index 64b97d8962..029fabd8e0 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0007-drm-vc4-hdmi-Add-a-spinlock-to-protect-register-acce.patch @@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard <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, ¶ms->cea, sizeof(params->cea)); vc4_hdmi_set_audio_infoframe(encoder); -@@ -1668,6 +1793,8 @@ static void vc4_cec_read_msg(struct vc4_ +@@ -1669,6 +1794,8 @@ static void vc4_cec_read_msg(struct vc4_ struct cec_msg *msg = &vc4_hdmi->cec_rx_msg; unsigned int i; @@ -562,7 +562,7 @@ Signed-off-by: Maxime Ripard <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; |