-LINUX_VERSION-5.10 = .93
-LINUX_KERNEL_HASH-5.10.93 = a6788c430bab7670c08888caa0969521f22d5976483ee9452c2c0363153bbbcb
+LINUX_VERSION-5.10 = .94
+LINUX_KERNEL_HASH-5.10.94 = 28ff44aa4a9a8a1ea52ae74e448da6174ca4ff042ddc202e36b157c951cd7508
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -2295,8 +2295,15 @@ static int bcm2835_clk_probe(struct plat
+@@ -2290,8 +2290,15 @@ static int bcm2835_clk_probe(struct plat
if (ret)
return ret;
}
static const struct cprman_plat_data cprman_bcm2835_plat_data = {
-@@ -2322,7 +2329,11 @@ static struct platform_driver bcm2835_cl
+@@ -2317,7 +2324,11 @@ static struct platform_driver bcm2835_cl
.probe = bcm2835_clk_probe,
};
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1384,6 +1384,11 @@ bcm2835_register_pll_divider(struct bcm2
+@@ -1379,6 +1379,11 @@ bcm2835_register_pll_divider(struct bcm2
divider->div.hw.init = &init;
divider->div.table = NULL;
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1312,6 +1312,8 @@ static const struct clk_ops bcm2835_vpu_
+@@ -1307,6 +1307,8 @@ static const struct clk_ops bcm2835_vpu_
.debug_init = bcm2835_clock_debug_init,
};
static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman,
const void *data)
{
-@@ -1329,6 +1331,9 @@ static struct clk_hw *bcm2835_register_p
+@@ -1324,6 +1326,9 @@ static struct clk_hw *bcm2835_register_p
init.ops = &bcm2835_pll_clk_ops;
init.flags = pll_data->flags | CLK_IGNORE_UNUSED;
pll = kzalloc(sizeof(*pll), GFP_KERNEL);
if (!pll)
return NULL;
-@@ -1384,9 +1389,11 @@ bcm2835_register_pll_divider(struct bcm2
+@@ -1379,9 +1384,11 @@ bcm2835_register_pll_divider(struct bcm2
divider->div.hw.init = &init;
divider->div.table = NULL;
}
divider->cprman = cprman;
-@@ -1443,6 +1450,15 @@ static struct clk_hw *bcm2835_register_c
+@@ -1438,6 +1445,15 @@ static struct clk_hw *bcm2835_register_c
init.flags = clock_data->flags | CLK_IGNORE_UNUSED;
/*
* Pass the CLK_SET_RATE_PARENT flag if we are allowed to propagate
* rate changes on at least of the parents.
*/
-@@ -2221,6 +2237,8 @@ static const struct bcm2835_clk_desc clk
+@@ -2216,6 +2232,8 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_PERIICTL),
};
/*
* Permanently take a reference on the parent of the SDRAM clock.
*
-@@ -2240,6 +2258,19 @@ static int bcm2835_mark_sdc_parent_criti
+@@ -2235,6 +2253,19 @@ static int bcm2835_mark_sdc_parent_criti
return clk_prepare_enable(parent);
}
static int bcm2835_clk_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
-@@ -2249,6 +2280,7 @@ static int bcm2835_clk_probe(struct plat
+@@ -2244,6 +2275,7 @@ static int bcm2835_clk_probe(struct plat
const size_t asize = ARRAY_SIZE(clk_desc_array);
const struct cprman_plat_data *pdata;
size_t i;
int ret;
pdata = of_device_get_match_data(&pdev->dev);
-@@ -2267,6 +2299,13 @@ static int bcm2835_clk_probe(struct plat
+@@ -2262,6 +2294,13 @@ static int bcm2835_clk_probe(struct plat
if (IS_ERR(cprman->regs))
return PTR_ERR(cprman->regs);
spinlock_t regs_lock; /* spinlock for all clocks */
unsigned int soc;
-@@ -1016,6 +1020,30 @@ static unsigned long bcm2835_clock_get_r
+@@ -1011,6 +1015,30 @@ static unsigned long bcm2835_clock_get_r
return bcm2835_clock_rate_from_divisor(clock, parent_rate, div);
}
static void bcm2835_clock_wait_busy(struct bcm2835_clock *clock)
{
struct bcm2835_cprman *cprman = clock->cprman;
-@@ -1304,7 +1332,7 @@ static int bcm2835_vpu_clock_is_on(struc
+@@ -1299,7 +1327,7 @@ static int bcm2835_vpu_clock_is_on(struc
*/
static const struct clk_ops bcm2835_vpu_clock_clk_ops = {
.is_prepared = bcm2835_vpu_clock_is_on,
.set_rate = bcm2835_clock_set_rate,
.determine_rate = bcm2835_clock_determine_rate,
.set_parent = bcm2835_clock_set_parent,
-@@ -2279,6 +2307,7 @@ static int bcm2835_clk_probe(struct plat
+@@ -2274,6 +2302,7 @@ static int bcm2835_clk_probe(struct plat
const struct bcm2835_clk_desc *desc;
const size_t asize = ARRAY_SIZE(clk_desc_array);
const struct cprman_plat_data *pdata;
size_t i;
u32 clk_id;
int ret;
-@@ -2299,6 +2328,14 @@ static int bcm2835_clk_probe(struct plat
+@@ -2294,6 +2323,14 @@ static int bcm2835_clk_probe(struct plat
if (IS_ERR(cprman->regs))
return PTR_ERR(cprman->regs);
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
-@@ -8594,8 +8594,6 @@ int alloc_contig_range(unsigned long sta
+@@ -8596,8 +8596,6 @@ int alloc_contig_range(unsigned long sta
/* Make sure the range is really isolated. */
if (test_pages_isolated(outer_start, end, 0)) {
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
-@@ -2599,7 +2599,12 @@ static int pl011_setup_port(struct devic
+@@ -2578,7 +2578,12 @@ static int pl011_setup_port(struct devic
if (IS_ERR(base))
return PTR_ERR(base);
/* Clear pending error and receive interrupts */
pl011_write(UART011_OEIS | UART011_BEIS | UART011_PEIS |
-@@ -2313,7 +2330,7 @@ static int pl011_console_setup(struct co
+@@ -2292,7 +2309,7 @@ static int pl011_console_setup(struct co
plat->init();
}
if (uap->vendor->fixed_options) {
baud = uap->fixed_baud;
-@@ -2530,6 +2547,7 @@ static struct uart_driver amba_reg = {
+@@ -2509,6 +2526,7 @@ static struct uart_driver amba_reg = {
.cons = AMBA_CONSOLE,
};
static int pl011_probe_dt_alias(int index, struct device *dev)
{
struct device_node *np;
-@@ -2561,6 +2579,7 @@ static int pl011_probe_dt_alias(int inde
+@@ -2540,6 +2558,7 @@ static int pl011_probe_dt_alias(int inde
return ret;
}
- reg
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
-@@ -2686,6 +2686,11 @@ static int pl011_probe(struct amba_devic
+@@ -2665,6 +2665,11 @@ static int pl011_probe(struct amba_devic
if (IS_ERR(uap->clk))
return PTR_ERR(uap->clk);
static void pl011_stop_rx(struct uart_port *port)
{
struct uart_amba_port *uap =
-@@ -2156,6 +2182,8 @@ static const struct uart_ops amba_pl011_
+@@ -2139,6 +2165,8 @@ static const struct uart_ops amba_pl011_
.stop_tx = pl011_stop_tx,
.start_tx = pl011_start_tx,
.stop_rx = pl011_stop_rx,
}
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -5503,7 +5503,7 @@ static void port_event(struct usb_hub *h
+@@ -5506,7 +5506,7 @@ static void port_event(struct usb_hub *h
port_dev->over_current_count++;
port_over_current_notify(port_dev);
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -2382,7 +2382,7 @@ static int bcm2835_clk_probe(struct plat
+@@ -2377,7 +2377,7 @@ static int bcm2835_clk_probe(struct plat
return ret;
/* note that we have registered all the clocks */
/* Disable rate control for now */
bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
TDMA_FLOW_PERIOD);
-@@ -4058,9 +4058,12 @@ static int bcmgenet_probe(struct platfor
+@@ -4060,9 +4060,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 */
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1115,15 +1115,19 @@ static int bcm2835_clock_set_rate(struct
+@@ -1110,15 +1110,19 @@ static int bcm2835_clock_set_rate(struct
spin_lock(&cprman->regs_lock);
ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0;
cprman_write(cprman, data->ctl_reg, ctl);
-@@ -1499,7 +1503,7 @@ static struct clk_hw *bcm2835_register_c
+@@ -1494,7 +1498,7 @@ static struct clk_hw *bcm2835_register_c
init.ops = &bcm2835_vpu_clock_clk_ops;
} else {
init.ops = &bcm2835_clock_clk_ops;
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1104,8 +1104,10 @@ static int bcm2835_clock_on(struct clk_h
+@@ -1099,8 +1099,10 @@ static int bcm2835_clock_on(struct clk_h
return 0;
}
{
struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
struct bcm2835_cprman *cprman = clock->cprman;
-@@ -1127,6 +1129,11 @@ static int bcm2835_clock_set_rate(struct
+@@ -1122,6 +1124,11 @@ static int bcm2835_clock_set_rate(struct
bcm2835_clock_wait_busy(clock);
}
ctl &= ~CM_FRAC;
ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0;
cprman_write(cprman, data->ctl_reg, ctl);
-@@ -1138,6 +1145,12 @@ static int bcm2835_clock_set_rate(struct
+@@ -1133,6 +1140,12 @@ static int bcm2835_clock_set_rate(struct
return 0;
}
static bool
bcm2835_clk_is_pllc(struct clk_hw *hw)
{
-@@ -1321,6 +1334,7 @@ static const struct clk_ops bcm2835_cloc
+@@ -1316,6 +1329,7 @@ static const struct clk_ops bcm2835_cloc
.unprepare = bcm2835_clock_off,
.recalc_rate = bcm2835_clock_get_rate,
.set_rate = bcm2835_clock_set_rate,
.determine_rate = bcm2835_clock_determine_rate,
.set_parent = bcm2835_clock_set_parent,
.get_parent = bcm2835_clock_get_parent,
-@@ -1503,7 +1517,6 @@ static struct clk_hw *bcm2835_register_c
+@@ -1498,7 +1512,6 @@ static struct clk_hw *bcm2835_register_c
init.ops = &bcm2835_vpu_clock_clk_ops;
} else {
init.ops = &bcm2835_clock_clk_ops;
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -2310,9 +2310,11 @@ static bool bcm2835_clk_is_claimed(const
+@@ -2305,9 +2305,11 @@ static bool bcm2835_clk_is_claimed(const
int i;
for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) {
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -1741,16 +1741,12 @@ static const struct bcm2835_clk_desc clk
+@@ -1736,16 +1736,12 @@ static const struct bcm2835_clk_desc clk
.hold_mask = CM_PLLA_HOLDCORE,
.fixed_divider = 1,
.flags = CLK_SET_RATE_PARENT),
[BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV(
SOC_ALL,
.name = "plla_dsi0",
-@@ -2051,14 +2047,12 @@ static const struct bcm2835_clk_desc clk
+@@ -2046,14 +2042,12 @@ static const struct bcm2835_clk_desc clk
.int_bits = 6,
.frac_bits = 0,
.tcnt_mux = 3),
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
-@@ -2429,7 +2429,7 @@ static int __init __bcm2835_clk_driver_i
+@@ -2424,7 +2424,7 @@ static int __init __bcm2835_clk_driver_i
{
return platform_driver_register(&bcm2835_clk_driver);
}
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1490,9 +1490,6 @@ static int vc4_hdmi_cec_init(struct vc4_
+@@ -1497,9 +1497,6 @@ static int vc4_hdmi_cec_init(struct vc4_
u32 value;
int ret;
vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops,
vc4_hdmi, "vc4",
CEC_CAP_DEFAULTS |
-@@ -1912,7 +1909,6 @@ static const struct vc4_hdmi_variant bcm
+@@ -1934,7 +1931,6 @@ static const struct vc4_hdmi_variant bcm
.debugfs_name = "hdmi_regs",
.card_name = "vc4-hdmi",
.max_pixel_clock = 162000000,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -988,6 +988,44 @@ static void vc4_hdmi_audio_shutdown(stru
+@@ -989,6 +989,44 @@ static void vc4_hdmi_audio_shutdown(stru
vc4_hdmi->audio.substream = NULL;
}
/* HDMI audio codec callbacks */
static int vc4_hdmi_audio_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
-@@ -998,6 +1036,8 @@ static int vc4_hdmi_audio_hw_params(stru
+@@ -999,6 +1037,8 @@ static int vc4_hdmi_audio_hw_params(stru
struct device *dev = &vc4_hdmi->pdev->dev;
u32 audio_packet_config, channel_mask;
u32 channel_map;
if (substream != vc4_hdmi->audio.substream)
return -EINVAL;
-@@ -1018,6 +1058,14 @@ static int vc4_hdmi_audio_hw_params(stru
+@@ -1019,6 +1059,14 @@ static int vc4_hdmi_audio_hw_params(stru
vc4_hdmi_audio_set_mai_clock(vc4_hdmi);
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_drm_eld.h>
#include <sound/pcm_params.h>
-@@ -1179,6 +1180,47 @@ static int vc4_hdmi_audio_eld_ctl_get(st
+@@ -1180,6 +1181,47 @@ static int vc4_hdmi_audio_eld_ctl_get(st
return 0;
}
static const struct snd_kcontrol_new vc4_hdmi_audio_controls[] = {
{
.access = SNDRV_CTL_ELEM_ACCESS_READ |
-@@ -1188,6 +1230,19 @@ static const struct snd_kcontrol_new vc4
+@@ -1189,6 +1231,19 @@ static const struct snd_kcontrol_new vc4
.info = vc4_hdmi_audio_eld_ctl_info,
.get = vc4_hdmi_audio_eld_ctl_get,
},
};
static const struct snd_soc_dapm_widget vc4_hdmi_audio_widgets[] = {
-@@ -1308,6 +1363,11 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1309,6 +1364,11 @@ static int vc4_hdmi_audio_init(struct vc
vc4_hdmi->audio.dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
vc4_hdmi->audio.dma_data.maxburst = 2;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1028,9 +1028,8 @@ static int sample_rate_to_mai_fmt(int sa
+@@ -1029,9 +1029,8 @@ static int sample_rate_to_mai_fmt(int sa
}
/* HDMI audio codec callbacks */
{
struct vc4_hdmi *vc4_hdmi = dai_to_hdmi(dai);
struct drm_encoder *encoder = &vc4_hdmi->encoder.base.base;
-@@ -1043,12 +1042,15 @@ static int vc4_hdmi_audio_hw_params(stru
+@@ -1044,12 +1043,15 @@ static int vc4_hdmi_audio_hw_params(stru
if (substream != vc4_hdmi->audio.substream)
return -EINVAL;
HDMI_WRITE(HDMI_MAI_CTL,
VC4_HD_MAI_CTL_RESET |
-@@ -1270,7 +1272,7 @@ static const struct snd_soc_component_dr
+@@ -1271,7 +1273,7 @@ static const struct snd_soc_component_dr
static const struct snd_soc_dai_ops vc4_hdmi_audio_dai_ops = {
.startup = vc4_hdmi_audio_startup,
.shutdown = vc4_hdmi_audio_shutdown,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1062,7 +1062,11 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1063,7 +1063,11 @@ static int vc4_hdmi_audio_prepare(struct
vc4_hdmi_audio_set_mai_clock(vc4_hdmi);
mai_sample_rate = sample_rate_to_mai_fmt(vc4_hdmi->audio.samplerate);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1083,22 +1083,12 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1084,22 +1084,12 @@ static int vc4_hdmi_audio_prepare(struct
audio_packet_config |= VC4_SET_FIELD(channel_mask,
VC4_HDMI_AUDIO_PACKET_CEA_MASK);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1092,6 +1092,7 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1093,6 +1093,7 @@ static int vc4_hdmi_audio_prepare(struct
HDMI_WRITE(HDMI_MAI_CONFIG,
VC4_HDMI_MAI_CONFIG_BIT_REVERSE |
/* Reinitialize TDMA and RDMA and SW housekeeping */
ret = bcmgenet_init_dma(priv);
-@@ -4187,7 +4195,7 @@ static int bcmgenet_resume(struct device
+@@ -4189,7 +4197,7 @@ static int bcmgenet_resume(struct device
bcmgenet_hfb_create_rxnfc_filter(priv, rule);
/* Disable RX/TX DMA and flush TX queues */
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1330,10 +1330,12 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1331,10 +1331,12 @@ static int vc4_hdmi_audio_init(struct vc
const __be32 *addr;
int index;
int ret;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -91,6 +91,12 @@ static int vc4_hdmi_debugfs_regs(struct
+@@ -92,6 +92,12 @@ static int vc4_hdmi_debugfs_regs(struct
drm_print_regset32(&p, &vc4_hdmi->hdmi_regset);
drm_print_regset32(&p, &vc4_hdmi->hd_regset);
return 0;
}
-@@ -1731,6 +1737,7 @@ static int vc5_hdmi_init_resources(struc
+@@ -1740,6 +1746,7 @@ static int vc5_hdmi_init_resources(struc
struct platform_device *pdev = vc4_hdmi->pdev;
struct device *dev = &pdev->dev;
struct resource *res;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hdmi");
if (!res)
-@@ -1821,6 +1828,38 @@ static int vc5_hdmi_init_resources(struc
+@@ -1830,6 +1837,38 @@ static int vc5_hdmi_init_resources(struc
return PTR_ERR(vc4_hdmi->reset);
}
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -256,6 +256,7 @@ static int vc4_hdmi_connector_init(struc
+@@ -257,6 +257,7 @@ static int vc4_hdmi_connector_init(struc
connector->interlace_allowed = 1;
connector->doublescan_allowed = 0;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -284,9 +284,11 @@ static void vc4_hdmi_write_infoframe(str
+@@ -285,9 +285,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;
ssize_t len, i;
int ret;
-@@ -319,6 +321,13 @@ static void vc4_hdmi_write_infoframe(str
+@@ -320,6 +322,13 @@ static void vc4_hdmi_write_infoframe(str
packet_reg += 4;
}
}
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
-@@ -710,7 +710,7 @@ static int rcar_du_crtc_atomic_check(str
+@@ -716,7 +716,7 @@ static int rcar_du_crtc_atomic_check(str
}
static void rcar_du_crtc_atomic_enable(struct drm_crtc *crtc,
{
struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc);
struct rcar_du_crtc_state *rstate = to_rcar_crtc_state(crtc->state);
-@@ -745,8 +745,10 @@ static void rcar_du_crtc_atomic_enable(s
+@@ -751,8 +751,10 @@ static void rcar_du_crtc_atomic_enable(s
}
static void rcar_du_crtc_atomic_disable(struct drm_crtc *crtc,
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -5602,17 +5602,19 @@ static void dm_update_crtc_active_planes
+@@ -5605,17 +5605,19 @@ static void dm_update_crtc_active_planes
}
static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
WARN_ON(1);
return ret;
}
-@@ -5623,8 +5625,8 @@ static int dm_crtc_helper_atomic_check(s
+@@ -5626,8 +5628,8 @@ static int dm_crtc_helper_atomic_check(s
* planes are disabled, which is not supported by the hardware. And there is legacy
* userspace which stops using the HW cursor altogether in response to the resulting EINVAL.
*/
omap_crtc_state->zpos = pri_state->zpos;
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
-@@ -682,20 +682,23 @@ static void rcar_du_crtc_stop(struct rca
+@@ -688,20 +688,23 @@ static void rcar_du_crtc_stop(struct rca
*/
static int rcar_du_crtc_atomic_check(struct drm_crtc *crtc,
}
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
-@@ -779,7 +779,7 @@ static void rcar_du_crtc_atomic_disable(
+@@ -785,7 +785,7 @@ static void rcar_du_crtc_atomic_disable(
}
static void rcar_du_crtc_atomic_begin(struct drm_crtc *crtc,
{
struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc);
-@@ -808,7 +808,7 @@ static void rcar_du_crtc_atomic_begin(st
+@@ -814,7 +814,7 @@ static void rcar_du_crtc_atomic_begin(st
}
static void rcar_du_crtc_atomic_flush(struct drm_crtc *crtc,
static inline struct vc4_encoder *
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -411,7 +411,8 @@ static void vc4_hdmi_set_infoframes(stru
+@@ -412,7 +412,8 @@ static void vc4_hdmi_set_infoframes(stru
vc4_hdmi_set_audio_infoframe(encoder);
}
{
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
-@@ -424,7 +425,8 @@ static void vc4_hdmi_encoder_post_crtc_d
+@@ -425,7 +426,8 @@ static void vc4_hdmi_encoder_post_crtc_d
HDMI_READ(HDMI_VID_CTL) | VC4_HD_VID_CTL_BLANKPIX);
}
{
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
int ret;
-@@ -637,7 +639,8 @@ static void vc4_hdmi_recenter_fifo(struc
+@@ -638,7 +640,8 @@ static void vc4_hdmi_recenter_fifo(struc
"VC4_HDMI_FIFO_CTL_RECENTER_DONE");
}
{
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
-@@ -719,7 +722,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -720,7 +723,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
vc4_hdmi->variant->set_timings(vc4_hdmi, mode);
}
{
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder);
-@@ -741,7 +745,8 @@ static void vc4_hdmi_encoder_pre_crtc_en
+@@ -742,7 +746,8 @@ static void vc4_hdmi_encoder_pre_crtc_en
HDMI_WRITE(HDMI_FIFO_CTL, VC4_HDMI_FIFO_CTL_MASTER_SLAVE_N);
}
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -215,7 +215,9 @@ static int vc4_hdmi_connector_get_modes(
+@@ -216,7 +216,9 @@ static int vc4_hdmi_connector_get_modes(
static void vc4_hdmi_connector_reset(struct drm_connector *connector)
{
drm_atomic_helper_connector_reset(connector);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -214,10 +214,37 @@ static int vc4_hdmi_connector_get_modes(
+@@ -215,10 +215,37 @@ static int vc4_hdmi_connector_get_modes(
static void vc4_hdmi_connector_reset(struct drm_connector *connector)
{
}
static const struct drm_connector_funcs vc4_hdmi_connector_funcs = {
-@@ -225,7 +252,7 @@ static const struct drm_connector_funcs
+@@ -226,7 +253,7 @@ static const struct drm_connector_funcs
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = vc4_hdmi_connector_destroy,
.reset = vc4_hdmi_connector_reset,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -242,6 +242,7 @@ vc4_hdmi_connector_duplicate_state(struc
+@@ -243,6 +243,7 @@ vc4_hdmi_connector_duplicate_state(struc
if (!new_state)
return NULL;
__drm_atomic_helper_connector_duplicate_state(connector, &new_state->base);
return &new_state->base;
-@@ -668,9 +669,29 @@ static void vc4_hdmi_recenter_fifo(struc
+@@ -669,9 +670,29 @@ static void vc4_hdmi_recenter_fifo(struc
"VC4_HDMI_FIFO_CTL_RECENTER_DONE");
}
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
unsigned long pixel_rate, hsm_rate;
-@@ -682,7 +703,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -683,7 +704,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
return;
}
ret = clk_set_rate(vc4_hdmi->pixel_clock, pixel_rate);
if (ret) {
DRM_ERROR("Failed to set pixel clock rate: %d\n", ret);
-@@ -844,6 +865,7 @@ static int vc4_hdmi_encoder_atomic_check
+@@ -845,6 +866,7 @@ static int vc4_hdmi_encoder_atomic_check
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
{
struct drm_display_mode *mode = &crtc_state->adjusted_mode;
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
unsigned long long pixel_rate = mode->clock * 1000;
-@@ -874,6 +896,8 @@ static int vc4_hdmi_encoder_atomic_check
+@@ -875,6 +897,8 @@ static int vc4_hdmi_encoder_atomic_check
if (pixel_rate > vc4_hdmi->variant->max_pixel_clock)
return -EINVAL;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -761,7 +761,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -762,7 +762,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
}
if (vc4_hdmi->variant->phy_init)
# define VC4_HD_M_SW_RST BIT(2)
# define VC4_HD_M_ENABLE BIT(0)
-@@ -228,6 +239,8 @@ static void vc4_hdmi_connector_reset(str
+@@ -229,6 +240,8 @@ static void vc4_hdmi_connector_reset(str
if (!new_state)
return;
drm_atomic_helper_connector_tv_reset(connector);
}
-@@ -274,12 +287,20 @@ static int vc4_hdmi_connector_init(struc
+@@ -275,12 +288,20 @@ static int vc4_hdmi_connector_init(struc
vc4_hdmi->ddc);
drm_connector_helper_add(connector, &vc4_hdmi_connector_helper_funcs);
connector->polled = (DRM_CONNECTOR_POLL_CONNECT |
DRM_CONNECTOR_POLL_DISCONNECT);
-@@ -554,6 +575,7 @@ static void vc5_hdmi_csc_setup(struct vc
+@@ -555,6 +576,7 @@ static void vc5_hdmi_csc_setup(struct vc
}
static void vc4_hdmi_set_timings(struct vc4_hdmi *vc4_hdmi,
struct drm_display_mode *mode)
{
bool hsync_pos = mode->flags & DRM_MODE_FLAG_PHSYNC;
-@@ -597,7 +619,9 @@ static void vc4_hdmi_set_timings(struct
+@@ -598,7 +620,9 @@ static void vc4_hdmi_set_timings(struct
HDMI_WRITE(HDMI_VERTB0, vertb_even);
HDMI_WRITE(HDMI_VERTB1, vertb);
}
struct drm_display_mode *mode)
{
bool hsync_pos = mode->flags & DRM_MODE_FLAG_PHSYNC;
-@@ -617,6 +641,9 @@ static void vc5_hdmi_set_timings(struct
+@@ -618,6 +642,9 @@ static void vc5_hdmi_set_timings(struct
mode->crtc_vsync_end -
interlaced,
VC4_HDMI_VERTB_VBP));
HDMI_WRITE(HDMI_VEC_INTERFACE_XBAR, 0x354021);
HDMI_WRITE(HDMI_HORZA,
-@@ -642,6 +669,39 @@ static void vc5_hdmi_set_timings(struct
+@@ -643,6 +670,39 @@ static void vc5_hdmi_set_timings(struct
HDMI_WRITE(HDMI_VERTB0, vertb_even);
HDMI_WRITE(HDMI_VERTB1, vertb);
HDMI_WRITE(HDMI_CLOCK_STOP, 0);
}
-@@ -769,7 +829,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -770,7 +830,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
VC4_HDMI_SCHEDULER_CONTROL_IGNORE_VSYNC_PREDICTS);
if (vc4_hdmi->variant->set_timings)
}
static void vc4_hdmi_encoder_pre_crtc_enable(struct drm_encoder *encoder,
-@@ -890,6 +950,14 @@ static int vc4_hdmi_encoder_atomic_check
+@@ -891,6 +951,14 @@ static int vc4_hdmi_encoder_atomic_check
pixel_rate = mode->clock * 1000;
}
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -801,6 +801,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -802,6 +802,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
vc4_hdmi_cec_update_clk_div(vc4_hdmi);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -150,7 +150,7 @@ static void vc4_hdmi_cec_update_clk_div(
+@@ -151,7 +151,7 @@ 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.
*/
value |= clk_cnt << VC4_HDMI_CEC_DIV_CLK_CNT_SHIFT;
HDMI_WRITE(HDMI_CEC_CNTRL_1, value);
}
-@@ -1866,6 +1866,7 @@ static int vc4_hdmi_init_resources(struc
+@@ -1875,6 +1875,7 @@ static int vc4_hdmi_init_resources(struc
return PTR_ERR(vc4_hdmi->hsm_clock);
}
vc4_hdmi->audio_clock = vc4_hdmi->hsm_clock;
return 0;
}
-@@ -1960,6 +1961,12 @@ static int vc5_hdmi_init_resources(struc
+@@ -1969,6 +1970,12 @@ static int vc5_hdmi_init_resources(struc
return PTR_ERR(vc4_hdmi->audio_clock);
}
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1571,15 +1571,22 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1572,15 +1572,22 @@ static int vc4_hdmi_audio_init(struct vc
}
#ifdef CONFIG_DRM_VC4_HDMI_CEC
cec_transmit_done(vc4_hdmi->cec_adap, CEC_TX_STATUS_OK,
0, 0, 0, 0);
} else {
-@@ -1593,6 +1600,19 @@ static irqreturn_t vc4_cec_irq_handler_t
+@@ -1594,6 +1601,19 @@ static irqreturn_t vc4_cec_irq_handler_t
return IRQ_HANDLED;
}
static void vc4_cec_read_msg(struct vc4_hdmi *vc4_hdmi, u32 cntrl1)
{
struct drm_device *dev = vc4_hdmi->connector.dev;
-@@ -1617,31 +1637,55 @@ static void vc4_cec_read_msg(struct vc4_
+@@ -1618,31 +1638,55 @@ static void vc4_cec_read_msg(struct vc4_
}
}
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1722,9 +1722,11 @@ static int vc4_hdmi_cec_adap_enable(stru
+@@ -1729,9 +1729,11 @@ static int vc4_hdmi_cec_adap_enable(stru
((3600 / usecs) << VC4_HDMI_CEC_CNT_TO_3600_US_SHIFT) |
((3500 / usecs) << VC4_HDMI_CEC_CNT_TO_3500_US_SHIFT));
HDMI_WRITE(HDMI_CEC_CNTRL_5, val |
VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET);
}
-@@ -1796,8 +1798,6 @@ static int vc4_hdmi_cec_init(struct vc4_
+@@ -1803,8 +1805,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);
value = HDMI_READ(HDMI_CEC_CNTRL_1);
/* Set the logical address to Unregistered */
value |= VC4_HDMI_CEC_ADDR_MASK;
-@@ -1805,12 +1805,32 @@ static int vc4_hdmi_cec_init(struct vc4_
+@@ -1812,12 +1812,32 @@ static int vc4_hdmi_cec_init(struct vc4_
vc4_hdmi_cec_update_clk_div(vc4_hdmi);
ret = cec_register_adapter(vc4_hdmi->cec_adap, &pdev->dev);
if (ret < 0)
-@@ -2272,6 +2292,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2294,6 +2314,7 @@ static const struct vc4_hdmi_variant bcm
PHY_LANE_CK,
},
.unsupported_odd_h_timings = true,
.init_resources = vc5_hdmi_init_resources,
.csc_setup = vc5_hdmi_csc_setup,
-@@ -2298,6 +2319,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2320,6 +2341,7 @@ static const struct vc4_hdmi_variant bcm
PHY_LANE_2,
},
.unsupported_odd_h_timings = true,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1784,9 +1784,15 @@ static int vc4_hdmi_cec_init(struct vc4_
+@@ -1791,9 +1791,15 @@ static int vc4_hdmi_cec_init(struct vc4_
{
struct cec_connector_info conn_info;
struct platform_device *pdev = vc4_hdmi->pdev;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -309,6 +309,10 @@ static int vc4_hdmi_connector_init(struc
+@@ -310,6 +310,10 @@ static int vc4_hdmi_connector_init(struc
connector->doublescan_allowed = 0;
connector->stereo_allowed = 1;
drm_connector_attach_encoder(connector, encoder);
return 0;
-@@ -448,6 +452,25 @@ static void vc4_hdmi_set_audio_infoframe
+@@ -449,6 +453,25 @@ static void vc4_hdmi_set_audio_infoframe
vc4_hdmi_write_infoframe(encoder, &frame);
}
static void vc4_hdmi_set_infoframes(struct drm_encoder *encoder)
{
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
-@@ -460,6 +483,8 @@ static void vc4_hdmi_set_infoframes(stru
+@@ -461,6 +484,8 @@ static void vc4_hdmi_set_infoframes(stru
*/
if (vc4_hdmi->audio.streaming)
vc4_hdmi_set_audio_infoframe(encoder);
}
static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder,
-@@ -2282,6 +2307,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2304,6 +2329,7 @@ static const struct vc4_hdmi_variant bcm
.phy_rng_enable = vc4_hdmi_phy_rng_enable,
.phy_rng_disable = vc4_hdmi_phy_rng_disable,
.channel_map = vc4_hdmi_channel_map,
};
static const struct vc4_hdmi_variant bcm2711_hdmi0_variant = {
-@@ -2309,6 +2335,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2331,6 +2357,7 @@ static const struct vc4_hdmi_variant bcm
.phy_rng_enable = vc5_hdmi_phy_rng_enable,
.phy_rng_disable = vc5_hdmi_phy_rng_disable,
.channel_map = vc5_hdmi_channel_map,
};
static const struct vc4_hdmi_variant bcm2711_hdmi1_variant = {
-@@ -2336,6 +2363,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2358,6 +2385,7 @@ static const struct vc4_hdmi_variant bcm
.phy_rng_enable = vc5_hdmi_phy_rng_enable,
.phy_rng_disable = vc5_hdmi_phy_rng_disable,
.channel_map = vc5_hdmi_channel_map,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -223,6 +223,45 @@ static int vc4_hdmi_connector_get_modes(
+@@ -224,6 +224,45 @@ static int vc4_hdmi_connector_get_modes(
return ret;
}
static void vc4_hdmi_connector_reset(struct drm_connector *connector)
{
struct vc4_hdmi_connector_state *old_state =
-@@ -272,6 +311,7 @@ static const struct drm_connector_funcs
+@@ -273,6 +312,7 @@ static const struct drm_connector_funcs
static const struct drm_connector_helper_funcs vc4_hdmi_connector_helper_funcs = {
.get_modes = vc4_hdmi_connector_get_modes,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1294,10 +1294,10 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1295,10 +1295,10 @@ static int vc4_hdmi_audio_prepare(struct
/* Set the MAI threshold */
HDMI_WRITE(HDMI_MAI_THR,
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -6525,9 +6525,7 @@ void amdgpu_dm_connector_init_helper(str
+@@ -6528,9 +6528,7 @@ void amdgpu_dm_connector_init_helper(str
if (connector_type == DRM_MODE_CONNECTOR_HDMIA ||
connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
connector_type == DRM_MODE_CONNECTOR_eDP) {
drm_connector_attach_vrr_capable_property(&aconnector->base);
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
-@@ -2492,8 +2492,7 @@ static int dw_hdmi_connector_create(stru
+@@ -2500,8 +2500,7 @@ static int dw_hdmi_connector_create(stru
drm_connector_attach_max_bpc_property(connector, 8, 16);
if (hdmi->version >= 0x200a && hdmi->plat_data->use_drm_infoframe)
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -5473,25 +5473,6 @@ static int fill_hdr_info_packet(const st
+@@ -5476,25 +5476,6 @@ static int fill_hdr_info_packet(const st
return 0;
}
static int
amdgpu_dm_connector_atomic_check(struct drm_connector *conn,
struct drm_atomic_state *state)
-@@ -5507,7 +5488,7 @@ amdgpu_dm_connector_atomic_check(struct
+@@ -5510,7 +5491,7 @@ amdgpu_dm_connector_atomic_check(struct
if (!crtc)
return 0;
ret = fill_hdr_info_packet(new_con_state, &hdr_infopacket);
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
-@@ -2395,21 +2395,6 @@ static int dw_hdmi_connector_get_modes(s
+@@ -2403,21 +2403,6 @@ static int dw_hdmi_connector_get_modes(s
return ret;
}
static int dw_hdmi_connector_atomic_check(struct drm_connector *connector,
struct drm_atomic_state *state)
{
-@@ -2423,7 +2408,7 @@ static int dw_hdmi_connector_atomic_chec
+@@ -2431,7 +2416,7 @@ static int dw_hdmi_connector_atomic_chec
if (!crtc)
return 0;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -223,21 +223,6 @@ static int vc4_hdmi_connector_get_modes(
+@@ -224,21 +224,6 @@ static int vc4_hdmi_connector_get_modes(
return ret;
}
static int vc4_hdmi_connector_atomic_check(struct drm_connector *connector,
struct drm_atomic_state *state)
{
-@@ -246,12 +231,13 @@ static int vc4_hdmi_connector_atomic_che
+@@ -247,12 +232,13 @@ static int vc4_hdmi_connector_atomic_che
struct drm_connector_state *new_state =
drm_atomic_get_new_connector_state(state, connector);
struct drm_crtc *crtc = new_state->crtc;
crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
-@@ -350,8 +336,7 @@ static int vc4_hdmi_connector_init(struc
+@@ -351,8 +337,7 @@ static int vc4_hdmi_connector_init(struc
connector->stereo_allowed = 1;
if (vc4_hdmi->variant->supports_hdr)
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -235,7 +235,8 @@ static int vc4_hdmi_connector_atomic_che
+@@ -236,7 +236,8 @@ static int vc4_hdmi_connector_atomic_che
if (!crtc)
return 0;
struct drm_crtc_state *crtc_state;
crtc_state = drm_atomic_get_crtc_state(state, crtc);
-@@ -325,6 +326,11 @@ static int vc4_hdmi_connector_init(struc
+@@ -326,6 +327,11 @@ static int vc4_hdmi_connector_init(struc
if (ret)
return ret;
drm_connector_attach_tv_margin_properties(connector);
drm_connector_attach_max_bpc_property(connector, 8, 12);
-@@ -439,7 +445,7 @@ static void vc4_hdmi_set_avi_infoframe(s
+@@ -440,7 +446,7 @@ static void vc4_hdmi_set_avi_infoframe(s
vc4_encoder->limited_rgb_range ?
HDMI_QUANTIZATION_RANGE_LIMITED :
HDMI_QUANTIZATION_RANGE_FULL);
* clk_get_parent - return the parent of a clk
* @clk: the clk whose parent gets returned
*
-@@ -3820,6 +3940,7 @@ __clk_register(struct device *dev, struc
+@@ -3838,6 +3958,7 @@ __clk_register(struct device *dev, struc
goto fail_parents;
INIT_HLIST_HEAD(&core->clks);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -545,6 +545,9 @@ static void vc4_hdmi_encoder_post_crtc_p
+@@ -546,6 +546,9 @@ static void vc4_hdmi_encoder_post_crtc_p
HDMI_READ(HDMI_VID_CTL) & ~VC4_HD_VID_CTL_ENABLE);
clk_disable_unprepare(vc4_hdmi->pixel_bvb_clock);
clk_disable_unprepare(vc4_hdmi->pixel_clock);
ret = pm_runtime_put(&vc4_hdmi->pdev->dev);
-@@ -849,9 +852,9 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -850,9 +853,9 @@ static void vc4_hdmi_encoder_pre_crtc_co
* pixel clock, but HSM ends up being the limiting factor.
*/
hsm_rate = max_t(unsigned long, 120000000, (pixel_rate / 100) * 101);
return;
}
-@@ -863,10 +866,12 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -864,10 +867,12 @@ static void vc4_hdmi_encoder_pre_crtc_co
* FIXME: When the pixel freq is 594MHz (4k60), this needs to be setup
* at 300MHz.
*/
clk_disable_unprepare(vc4_hdmi->pixel_clock);
return;
}
-@@ -874,6 +879,9 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -875,6 +880,9 @@ static void vc4_hdmi_encoder_pre_crtc_co
ret = clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
if (ret) {
DRM_ERROR("Failed to turn on pixel bvb clock: %d\n", ret);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -92,7 +92,6 @@
- # define VC4_HD_M_ENABLE BIT(0)
+@@ -93,7 +93,6 @@
+ #define HSM_MIN_CLOCK_FREQ 120000000
#define CEC_CLOCK_FREQ 40000
-#define VC4_HSM_MID_CLOCK 149985000
static int vc4_hdmi_debugfs_regs(struct seq_file *m, void *unused)
{
-@@ -813,7 +812,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -814,7 +813,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
conn_state_to_vc4_hdmi_conn_state(conn_state);
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
int ret;
ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
-@@ -862,12 +861,14 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -863,12 +862,14 @@ static void vc4_hdmi_encoder_pre_crtc_co
vc4_hdmi_cec_update_clk_div(vc4_hdmi);
#define VC5_HDMI_DEEP_COLOR_CONFIG_1_INIT_PACK_PHASE_SHIFT 8
#define VC5_HDMI_DEEP_COLOR_CONFIG_1_INIT_PACK_PHASE_MASK VC4_MASK(10, 8)
-@@ -517,6 +520,64 @@ static void vc4_hdmi_set_infoframes(stru
+@@ -518,6 +521,64 @@ static void vc4_hdmi_set_infoframes(stru
vc4_hdmi_set_hdr_infoframe(encoder);
}
static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{
-@@ -529,6 +590,8 @@ static void vc4_hdmi_encoder_post_crtc_d
+@@ -530,6 +591,8 @@ static void vc4_hdmi_encoder_post_crtc_d
HDMI_WRITE(HDMI_VID_CTL,
HDMI_READ(HDMI_VID_CTL) | VC4_HD_VID_CTL_BLANKPIX);
}
static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder,
-@@ -979,6 +1042,7 @@ static void vc4_hdmi_encoder_post_crtc_e
+@@ -980,6 +1043,7 @@ static void vc4_hdmi_encoder_post_crtc_e
}
vc4_hdmi_recenter_fifo(vc4_hdmi);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -2418,7 +2418,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2440,7 +2440,7 @@ static const struct vc4_hdmi_variant bcm
.encoder_type = VC4_ENCODER_TYPE_HDMI0,
.debugfs_name = "hdmi0_regs",
.card_name = "vc4-hdmi-0",
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -607,7 +607,8 @@ static void vc4_hdmi_encoder_post_crtc_p
+@@ -608,7 +608,8 @@ static void vc4_hdmi_encoder_post_crtc_p
HDMI_READ(HDMI_VID_CTL) & ~VC4_HD_VID_CTL_ENABLE);
clk_disable_unprepare(vc4_hdmi->pixel_bvb_clock);
clk_disable_unprepare(vc4_hdmi->hsm_clock);
clk_request_done(vc4_hdmi->hsm_req);
clk_disable_unprepare(vc4_hdmi->pixel_clock);
-@@ -931,7 +932,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -932,7 +933,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
else
bvb_rate = 75000000;
if (IS_ERR(vc4_hdmi->bvb_req)) {
DRM_ERROR("Failed to set pixel bvb clock rate: %ld\n", PTR_ERR(vc4_hdmi->bvb_req));
clk_request_done(vc4_hdmi->hsm_req);
-@@ -943,7 +945,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -944,7 +946,8 @@ static void vc4_hdmi_encoder_pre_crtc_co
ret = clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
if (ret) {
DRM_ERROR("Failed to turn on pixel bvb clock: %d\n", ret);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1066,6 +1066,7 @@ static int vc4_hdmi_encoder_atomic_check
+@@ -1067,6 +1067,7 @@ static int vc4_hdmi_encoder_atomic_check
unsigned long long tmds_rate;
if (vc4_hdmi->variant->unsupported_odd_h_timings &&
((mode->hdisplay % 2) || (mode->hsync_start % 2) ||
(mode->hsync_end % 2) || (mode->htotal % 2)))
return -EINVAL;
-@@ -1110,6 +1111,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_e
+@@ -1111,6 +1112,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_e
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
if (vc4_hdmi->variant->unsupported_odd_h_timings &&
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -851,31 +851,16 @@ static void vc4_hdmi_recenter_fifo(struc
+@@ -852,31 +852,16 @@ static void vc4_hdmi_recenter_fifo(struc
"VC4_HDMI_FIFO_CTL_RECENTER_DONE");
}
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1689,6 +1689,46 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1690,6 +1690,46 @@ static int vc4_hdmi_audio_init(struct vc
}
#ifdef CONFIG_DRM_VC4_HDMI_CEC
static irqreturn_t vc4_cec_irq_handler_rx_thread(int irq, void *priv)
{
-@@ -2303,6 +2343,10 @@ static int vc4_hdmi_bind(struct device *
+@@ -2325,6 +2365,10 @@ static int vc4_hdmi_bind(struct device *
if (ret)
goto err_destroy_encoder;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -537,6 +537,8 @@ static bool vc4_hdmi_supports_scrambling
+@@ -538,6 +538,8 @@ static bool vc4_hdmi_supports_scrambling
return true;
}
static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder)
{
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
-@@ -553,6 +555,9 @@ static void vc4_hdmi_enable_scrambling(s
+@@ -554,6 +556,9 @@ static void vc4_hdmi_enable_scrambling(s
HDMI_WRITE(HDMI_SCRAMBLER_CTL, HDMI_READ(HDMI_SCRAMBLER_CTL) |
VC5_HDMI_SCRAMBLER_CTL_ENABLE);
}
static void vc4_hdmi_disable_scrambling(struct drm_encoder *encoder)
-@@ -571,6 +576,9 @@ static void vc4_hdmi_disable_scrambling(
+@@ -572,6 +577,9 @@ static void vc4_hdmi_disable_scrambling(
if (crtc && !vc4_hdmi_mode_needs_scrambling(&crtc->mode))
return;
HDMI_WRITE(HDMI_SCRAMBLER_CTL, HDMI_READ(HDMI_SCRAMBLER_CTL) &
~VC5_HDMI_SCRAMBLER_CTL_ENABLE);
-@@ -578,6 +586,22 @@ static void vc4_hdmi_disable_scrambling(
+@@ -579,6 +587,22 @@ static void vc4_hdmi_disable_scrambling(
drm_scdc_set_high_tmds_clock_ratio(vc4_hdmi->ddc, false);
}
static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{
-@@ -2274,6 +2298,7 @@ static int vc4_hdmi_bind(struct device *
+@@ -2283,6 +2307,7 @@ static int vc4_hdmi_bind(struct device *
vc4_hdmi = devm_kzalloc(dev, sizeof(*vc4_hdmi), GFP_KERNEL);
if (!vc4_hdmi)
return -ENOMEM;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1728,6 +1728,7 @@ static int vc4_hdmi_hotplug_init(struct
+@@ -1729,6 +1729,7 @@ static int vc4_hdmi_hotplug_init(struct
{
struct platform_device *pdev = vc4_hdmi->pdev;
struct device *dev = &pdev->dev;
#include <sound/pcm_drm_eld.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
-@@ -95,6 +96,12 @@
- # define VC4_HD_M_ENABLE BIT(0)
+@@ -96,6 +97,12 @@
+ #define HSM_MIN_CLOCK_FREQ 120000000
#define CEC_CLOCK_FREQ 40000
+#define HDMI_14_MAX_TMDS_CLK (340 * 1000 * 1000)
+
static int vc4_hdmi_debugfs_regs(struct seq_file *m, void *unused)
{
-@@ -472,16 +479,10 @@ static void vc4_hdmi_set_spd_infoframe(s
+@@ -473,16 +480,10 @@ static void vc4_hdmi_set_spd_infoframe(s
static void vc4_hdmi_set_audio_infoframe(struct drm_encoder *encoder)
{
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
vc4_hdmi_write_infoframe(encoder, &frame);
}
-@@ -1214,18 +1215,10 @@ static inline struct vc4_hdmi *dai_to_hd
+@@ -1215,18 +1216,10 @@ static inline struct vc4_hdmi *dai_to_hd
return snd_soc_card_get_drvdata(card);
}
/*
* If the HDMI encoder hasn't probed, or the encoder is
-@@ -1235,15 +1228,18 @@ static int vc4_hdmi_audio_startup(struct
+@@ -1236,15 +1229,18 @@ static int vc4_hdmi_audio_startup(struct
VC4_HDMI_RAM_PACKET_ENABLE))
return -ENODEV;
return 0;
}
-@@ -1263,17 +1259,20 @@ static void vc4_hdmi_audio_reset(struct
+@@ -1264,17 +1260,20 @@ static void vc4_hdmi_audio_reset(struct
HDMI_WRITE(HDMI_MAI_CTL, VC4_HD_MAI_CTL_FLUSH);
}
}
static int sample_rate_to_mai_fmt(int samplerate)
-@@ -1315,42 +1314,35 @@ static int sample_rate_to_mai_fmt(int sa
+@@ -1316,42 +1315,35 @@ static int sample_rate_to_mai_fmt(int sa
}
/* HDMI audio codec callbacks */
mai_audio_format = VC4_HDMI_MAI_FORMAT_HBR;
else
mai_audio_format = VC4_HDMI_MAI_FORMAT_PCM;
-@@ -1387,148 +1379,12 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1388,148 +1380,12 @@ static int vc4_hdmi_audio_prepare(struct
HDMI_WRITE(HDMI_AUDIO_PACKET_CONFIG, audio_packet_config);
vc4_hdmi_set_n_cts(vc4_hdmi);
static const struct snd_soc_dapm_widget vc4_hdmi_audio_widgets[] = {
SND_SOC_DAPM_OUTPUT("TX"),
};
-@@ -1539,8 +1395,6 @@ static const struct snd_soc_dapm_route v
+@@ -1540,8 +1396,6 @@ static const struct snd_soc_dapm_route v
static const struct snd_soc_component_driver vc4_hdmi_audio_component_drv = {
.name = "vc4-hdmi-codec-dai-component",
.dapm_widgets = vc4_hdmi_audio_widgets,
.num_dapm_widgets = ARRAY_SIZE(vc4_hdmi_audio_widgets),
.dapm_routes = vc4_hdmi_audio_routes,
-@@ -1551,28 +1405,6 @@ static const struct snd_soc_component_dr
+@@ -1552,28 +1406,6 @@ static const struct snd_soc_component_dr
.non_legacy_dai_naming = 1,
};
static const struct snd_soc_component_driver vc4_hdmi_audio_cpu_dai_comp = {
.name = "vc4-hdmi-cpu-dai-component",
};
-@@ -1599,7 +1431,6 @@ static struct snd_soc_dai_driver vc4_hdm
+@@ -1600,7 +1432,6 @@ static struct snd_soc_dai_driver vc4_hdm
SNDRV_PCM_RATE_192000,
.formats = SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE,
},
};
static const struct snd_dmaengine_pcm_config pcm_conf = {
-@@ -1607,6 +1438,31 @@ static const struct snd_dmaengine_pcm_co
+@@ -1608,6 +1439,31 @@ static const struct snd_dmaengine_pcm_co
.prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config,
};
static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
{
const struct vc4_hdmi_register *mai_data =
-@@ -1614,6 +1470,7 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1615,6 +1471,7 @@ static int vc4_hdmi_audio_init(struct vc
struct snd_soc_dai_link *dai_link = &vc4_hdmi->audio.link;
struct snd_soc_card *card = &vc4_hdmi->audio.card;
struct device *dev = &vc4_hdmi->pdev->dev;
const __be32 *addr;
int index;
int ret;
-@@ -1649,11 +1506,6 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1650,11 +1507,6 @@ static int vc4_hdmi_audio_init(struct vc
vc4_hdmi->audio.dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
vc4_hdmi->audio.dma_data.maxburst = 2;
ret = devm_snd_dmaengine_pcm_register(dev, &pcm_conf, 0);
if (ret) {
dev_err(dev, "Could not register PCM component: %d\n", ret);
-@@ -1667,12 +1519,13 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1668,12 +1520,13 @@ static int vc4_hdmi_audio_init(struct vc
return ret;
}
}
dai_link->cpus = &vc4_hdmi->audio.cpu;
-@@ -1685,9 +1538,9 @@ static int vc4_hdmi_audio_init(struct vc
+@@ -1686,9 +1539,9 @@ static int vc4_hdmi_audio_init(struct vc
dai_link->name = "MAI";
dai_link->stream_name = "MAI PCM";
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1164,12 +1164,13 @@ static u32 vc5_hdmi_channel_map(struct v
+@@ -1165,12 +1165,13 @@ static u32 vc5_hdmi_channel_map(struct v
}
/* HDMI audio codec callbacks */
VC4_HD_MAI_SMP_N_MASK >>
VC4_HD_MAI_SMP_N_SHIFT,
(VC4_HD_MAI_SMP_M_MASK >>
-@@ -1181,12 +1182,11 @@ static void vc4_hdmi_audio_set_mai_clock
+@@ -1182,12 +1183,11 @@ static void vc4_hdmi_audio_set_mai_clock
VC4_SET_FIELD(m - 1, VC4_HD_MAI_SMP_M));
}
u32 n, cts;
u64 tmp;
-@@ -1320,27 +1320,25 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1321,27 +1321,25 @@ static int vc4_hdmi_audio_prepare(struct
{
struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
struct drm_encoder *encoder = &vc4_hdmi->encoder.base.base;
if (params->iec.status[0] & IEC958_AES0_NONAUDIO &&
params->channels == 8)
mai_audio_format = VC4_HDMI_MAI_FORMAT_HBR;
-@@ -1358,7 +1356,7 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1359,7 +1357,7 @@ static int vc4_hdmi_audio_prepare(struct
VC4_HDMI_AUDIO_PACKET_ZERO_DATA_ON_INACTIVE_CHANNELS |
VC4_SET_FIELD(0x8, VC4_HDMI_AUDIO_PACKET_B_FRAME_IDENTIFIER);
audio_packet_config |= VC4_SET_FIELD(channel_mask,
VC4_HDMI_AUDIO_PACKET_CEA_MASK);
-@@ -1377,7 +1375,7 @@ static int vc4_hdmi_audio_prepare(struct
+@@ -1378,7 +1376,7 @@ 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);
} else {
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -735,12 +735,12 @@ static void vc4_hdmi_set_timings(struct
+@@ -736,12 +736,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) |
VC4_HDMI_VERTB_VBP));
HDMI_WRITE(HDMI_HORZA,
-@@ -781,12 +781,12 @@ static void vc5_hdmi_set_timings(struct
+@@ -782,12 +782,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) |
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -610,12 +610,12 @@ static void vc4_hdmi_encoder_post_crtc_d
+@@ -611,12 +611,12 @@ static void vc4_hdmi_encoder_post_crtc_d
HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, 0);
vc4_hdmi_disable_scrambling(encoder);
}
-@@ -625,12 +625,12 @@ static void vc4_hdmi_encoder_post_crtc_p
+@@ -626,12 +626,12 @@ static void vc4_hdmi_encoder_post_crtc_p
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
int ret;
clk_disable_unprepare(vc4_hdmi->pixel_bvb_clock);
if (vc4_hdmi->bvb_req)
clk_request_done(vc4_hdmi->bvb_req);
-@@ -1010,6 +1010,7 @@ static void vc4_hdmi_encoder_post_crtc_e
+@@ -1011,6 +1011,7 @@ static void vc4_hdmi_encoder_post_crtc_e
HDMI_WRITE(HDMI_VID_CTL,
VC4_HD_VID_CTL_ENABLE |
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -908,23 +908,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -909,23 +909,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
return;
}
vc4_hdmi->hsm_req = clk_request_start(vc4_hdmi->hsm_clock, hsm_rate);
if (IS_ERR(vc4_hdmi->hsm_req)) {
DRM_ERROR("Failed to set HSM clock rate: %ld\n", PTR_ERR(vc4_hdmi->hsm_req));
-@@ -1140,6 +1124,39 @@ static const struct drm_encoder_helper_f
+@@ -1141,6 +1125,39 @@ static const struct drm_encoder_helper_f
.enable = vc4_hdmi_encoder_enable,
};
static u32 vc4_hdmi_channel_map(struct vc4_hdmi *vc4_hdmi, u32 channel_mask)
{
int i;
-@@ -2322,6 +2339,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2344,6 +2361,7 @@ static const struct vc4_hdmi_variant bcm
.phy_disable = vc4_hdmi_phy_disable,
.phy_rng_enable = vc4_hdmi_phy_rng_enable,
.phy_rng_disable = vc4_hdmi_phy_rng_disable,
.channel_map = vc4_hdmi_channel_map,
.supports_hdr = false,
};
-@@ -2350,6 +2368,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2372,6 +2390,7 @@ static const struct vc4_hdmi_variant bcm
.phy_disable = vc5_hdmi_phy_disable,
.phy_rng_enable = vc5_hdmi_phy_rng_enable,
.phy_rng_disable = vc5_hdmi_phy_rng_disable,
.channel_map = vc5_hdmi_channel_map,
.supports_hdr = true,
};
-@@ -2378,6 +2397,7 @@ static const struct vc4_hdmi_variant bcm
+@@ -2400,6 +2419,7 @@ static const struct vc4_hdmi_variant bcm
.phy_disable = vc5_hdmi_phy_disable,
.phy_rng_enable = vc5_hdmi_phy_rng_enable,
.phy_rng_disable = vc5_hdmi_phy_rng_disable,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -167,6 +167,8 @@ static void vc4_hdmi_cec_update_clk_div(
+@@ -168,6 +168,8 @@ static void vc4_hdmi_cec_update_clk_div(
static void vc4_hdmi_cec_update_clk_div(struct vc4_hdmi *vc4_hdmi) {}
#endif
static enum drm_connector_status
vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
{
-@@ -196,6 +198,8 @@ vc4_hdmi_connector_detect(struct drm_con
+@@ -197,6 +199,8 @@ vc4_hdmi_connector_detect(struct drm_con
}
}
pm_runtime_put(&vc4_hdmi->pdev->dev);
return connector_status_connected;
}
-@@ -542,9 +546,13 @@ static bool vc4_hdmi_supports_scrambling
+@@ -543,9 +547,13 @@ static bool vc4_hdmi_supports_scrambling
static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder)
{
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -900,6 +900,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -901,6 +901,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
if (ret < 0) {
DRM_ERROR("Failed to retain power domain: %d\n", ret);
return;
}
-@@ -907,12 +908,14 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -908,12 +909,14 @@ static void vc4_hdmi_encoder_pre_crtc_co
ret = clk_set_rate(vc4_hdmi->pixel_clock, pixel_rate);
if (ret) {
DRM_ERROR("Failed to set pixel clock rate: %d\n", ret);
return;
}
-@@ -920,6 +923,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -921,6 +924,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
vc4_hdmi->hsm_req = clk_request_start(vc4_hdmi->hsm_clock, hsm_rate);
if (IS_ERR(vc4_hdmi->hsm_req)) {
DRM_ERROR("Failed to set HSM clock rate: %ld\n", PTR_ERR(vc4_hdmi->hsm_req));
return;
}
-@@ -941,6 +945,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -942,6 +946,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
clk_request_done(vc4_hdmi->hsm_req);
clk_disable_unprepare(vc4_hdmi->hsm_clock);
clk_disable_unprepare(vc4_hdmi->pixel_clock);
return;
}
-@@ -952,6 +957,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -953,6 +958,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
clk_request_done(vc4_hdmi->hsm_req);
clk_disable_unprepare(vc4_hdmi->hsm_clock);
clk_disable_unprepare(vc4_hdmi->pixel_clock);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1755,7 +1755,7 @@ static irqreturn_t vc4_cec_irq_handler(i
+@@ -1756,7 +1756,7 @@ static irqreturn_t vc4_cec_irq_handler(i
return ret;
}
{
struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap);
/* clock period in microseconds */
-@@ -1768,38 +1768,53 @@ static int vc4_hdmi_cec_adap_enable(stru
+@@ -1775,38 +1775,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);
+++ /dev/null
-From ea4d08578d2e002ce01a2f6913c78fbff8195985 Mon Sep 17 00:00:00 2001
-From: Maxime Ripard <maxime@cerno.tech>
-Date: Tue, 29 Jun 2021 11:41:57 +0200
-Subject: [PATCH] drm/vc4: hdmi: Make sure the device is powered with
- CEC
-
-Similarly to what we encountered with the detect hook with DRM, nothing
-actually prevents any of the CEC callback from being run while the HDMI
-output is disabled.
-
-However, this is an issue since any register access to the controller
-when it's powered down will result in a silent hang.
-
-Let's make sure we run the runtime_pm hooks when the CEC adapter is
-opened and closed by the userspace to avoid that issue.
-
-Fixes: 15b4511a4af6 ("drm/vc4: add HDMI CEC support")
-Signed-off-by: Maxime Ripard <maxime@cerno.tech>
----
- drivers/gpu/drm/vc4/vc4_hdmi.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/drivers/gpu/drm/vc4/vc4_hdmi.c
-+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1761,6 +1761,11 @@ static int vc4_hdmi_cec_enable(struct ce
- /* clock period in microseconds */
- const u32 usecs = 1000000 / CEC_CLOCK_FREQ;
- u32 val = HDMI_READ(HDMI_CEC_CNTRL_5);
-+ int ret;
-+
-+ ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
-+ if (ret)
-+ return ret;
-
- val &= ~(VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET |
- VC4_HDMI_CEC_CNT_TO_4700_US_MASK |
-@@ -1804,6 +1809,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);
-
-+ pm_runtime_put(&vc4_hdmi->pdev->dev);
-+
- return 0;
- }
-
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -923,6 +923,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
+@@ -924,6 +924,7 @@ static void vc4_hdmi_encoder_pre_crtc_co
vc4_hdmi->hsm_req = clk_request_start(vc4_hdmi->hsm_clock, hsm_rate);
if (IS_ERR(vc4_hdmi->hsm_req)) {
DRM_ERROR("Failed to set HSM clock rate: %ld\n", PTR_ERR(vc4_hdmi->hsm_req));
+++ /dev/null
-From 9f2c0bf1e2f3784e1f991ab30bba83ffd79b8a19 Mon Sep 17 00:00:00 2001
-From: Maxime Ripard <maxime@cerno.tech>
-Date: Mon, 5 Jul 2021 10:48:07 +0200
-Subject: [PATCH] drm/vc4: hdmi: Move initial register read after
- pm_runtime_get
-
-Commit ecdd08fd9bba ("drm/vc4: hdmi: Make sure the device is powered
-with CEC") made sure that the device is powered while there is
-CEC-related accesses but missed one register read in the variable
-declaration.
-
-Move the variable assignment after the pm_runtime_resume_and_get.
-
-Fixes: ecdd08fd9bba ("drm/vc4: hdmi: Make sure the device is powered with CEC")
-Signed-off-by: Maxime Ripard <maxime@cerno.tech>
----
- drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/gpu/drm/vc4/vc4_hdmi.c
-+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1761,13 +1761,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;
-- u32 val = HDMI_READ(HDMI_CEC_CNTRL_5);
-+ u32 val;
- int ret;
-
- ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
- if (ret)
- return ret;
-
-+ 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 |
- VC4_HDMI_CEC_CNT_TO_4500_US_MASK);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1903,38 +1903,46 @@ static int vc4_hdmi_cec_init(struct vc4_
+@@ -1902,40 +1902,49 @@ static int vc4_hdmi_cec_init(struct vc4_
vc4_hdmi_cec_update_clk_div(vc4_hdmi);
if (vc4_hdmi->variant->external_irq_controller) {
if (ret)
- goto err_delete_cec_adap;
+ goto err_remove_cec_rx_handler;
++
} else {
HDMI_WRITE(HDMI_CEC_CPU_MASK_SET, 0xffffffff);
- goto err_delete_cec_adap;
+ goto err_remove_handlers;
+ pm_runtime_put(&vc4_hdmi->pdev->dev);
+
return 0;
+err_remove_handlers:
err_delete_cec_adap:
cec_delete_adapter(vc4_hdmi->cec_adap);
-@@ -1943,6 +1951,15 @@ err_delete_cec_adap:
+@@ -1944,6 +1953,15 @@ err_delete_cec_adap:
static void vc4_hdmi_cec_exit(struct vc4_hdmi *vc4_hdmi)
{
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1611,26 +1611,28 @@ static irqreturn_t vc4_hdmi_hpd_irq_thre
+@@ -1612,26 +1612,28 @@ static irqreturn_t vc4_hdmi_hpd_irq_thre
static int vc4_hdmi_hotplug_init(struct vc4_hdmi *vc4_hdmi)
{
struct platform_device *pdev = vc4_hdmi->pdev;
connector->polled = DRM_CONNECTOR_POLL_HPD;
}
-@@ -1638,6 +1640,16 @@ static int vc4_hdmi_hotplug_init(struct
+@@ -1639,6 +1641,16 @@ static int vc4_hdmi_hotplug_init(struct
return 0;
}
#ifdef CONFIG_DRM_VC4_HDMI_CEC
static irqreturn_t vc4_cec_irq_handler_rx_thread(int irq, void *priv)
{
-@@ -2299,7 +2311,7 @@ static int vc4_hdmi_bind(struct device *
+@@ -2314,7 +2326,7 @@ static int vc4_hdmi_bind(struct device *
ret = vc4_hdmi_cec_init(vc4_hdmi);
if (ret)
ret = vc4_hdmi_audio_init(vc4_hdmi);
if (ret)
-@@ -2313,6 +2325,8 @@ static int vc4_hdmi_bind(struct device *
+@@ -2328,6 +2340,8 @@ static int vc4_hdmi_bind(struct device *
err_free_cec:
vc4_hdmi_cec_exit(vc4_hdmi);
err_destroy_conn:
vc4_hdmi_connector_destroy(&vc4_hdmi->connector);
err_destroy_encoder:
-@@ -2354,6 +2368,7 @@ static void vc4_hdmi_unbind(struct devic
+@@ -2369,6 +2383,7 @@ static void vc4_hdmi_unbind(struct devic
kfree(vc4_hdmi->hd_regset.regs);
vc4_hdmi_cec_exit(vc4_hdmi);
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -1602,7 +1602,7 @@ static irqreturn_t vc4_hdmi_hpd_irq_thre
+@@ -1603,7 +1603,7 @@ static irqreturn_t vc4_hdmi_hpd_irq_thre
struct vc4_hdmi *vc4_hdmi = priv;
struct drm_device *dev = vc4_hdmi->connector.dev;
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -363,7 +363,8 @@ static int vc4_hdmi_connector_init(struc
+@@ -364,7 +364,8 @@ static int vc4_hdmi_connector_init(struc
}
static int vc4_hdmi_stop_packet(struct drm_encoder *encoder,
{
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
u32 packet_id = type - 0x80;
-@@ -371,6 +372,9 @@ static int vc4_hdmi_stop_packet(struct d
+@@ -372,6 +373,9 @@ static int vc4_hdmi_stop_packet(struct d
HDMI_WRITE(HDMI_RAM_PACKET_CONFIG,
HDMI_READ(HDMI_RAM_PACKET_CONFIG) & ~BIT(packet_id));
return wait_for(!(HDMI_READ(HDMI_RAM_PACKET_STATUS) &
BIT(packet_id)), 100);
}
-@@ -399,7 +403,7 @@ static void vc4_hdmi_write_infoframe(str
+@@ -400,7 +404,7 @@ static void vc4_hdmi_write_infoframe(str
if (len < 0)
return;
if (ret) {
DRM_ERROR("Failed to wait for infoframe to go idle: %d\n", ret);
return;
-@@ -1283,7 +1287,7 @@ static void vc4_hdmi_audio_reset(struct
+@@ -1284,7 +1288,7 @@ static void vc4_hdmi_audio_reset(struct
int ret;
vc4_hdmi->audio.streaming = false;
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -4989,7 +4989,6 @@ static void dm_disable_vblank(struct drm
+@@ -4992,7 +4992,6 @@ static void dm_disable_vblank(struct drm
static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = {
.reset = dm_crtc_reset_state,
.destroy = amdgpu_dm_crtc_destroy,
.atomic_set_property = omap_crtc_atomic_set_property,
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
-@@ -1138,7 +1138,6 @@ static const struct drm_crtc_funcs crtc_
+@@ -1150,7 +1150,6 @@ static const struct drm_crtc_funcs crtc_
.set_crc_source = rcar_du_crtc_set_crc_source,
.verify_crc_source = rcar_du_crtc_verify_crc_source,
.get_crc_sources = rcar_du_crtc_get_crc_sources,
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -2289,6 +2289,18 @@ static int vc4_hdmi_bind(struct device *
- vc4_hdmi->disable_wifi_frequencies =
- of_property_read_bool(dev->of_node, "wifi-2.4ghz-coexistence");
+@@ -2304,6 +2304,18 @@ static int vc4_hdmi_bind(struct device *
+ if (ret)
+ goto err_put_ddc;
+ /*
+ * We need to have the device powered up at this point to call
if (vc4_hdmi->variant->reset)
vc4_hdmi->variant->reset(vc4_hdmi);
-@@ -2300,8 +2312,6 @@ static int vc4_hdmi_bind(struct device *
+@@ -2315,8 +2327,6 @@ static int vc4_hdmi_bind(struct device *
clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
}
drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
drm_encoder_helper_add(encoder, &vc4_hdmi_encoder_helper_funcs);
-@@ -2325,6 +2335,8 @@ static int vc4_hdmi_bind(struct device *
+@@ -2340,6 +2350,8 @@ static int vc4_hdmi_bind(struct device *
vc4_hdmi_debugfs_regs,
vc4_hdmi);
return 0;
err_free_cec:
-@@ -2335,6 +2347,7 @@ err_destroy_conn:
+@@ -2350,6 +2362,7 @@ err_destroy_conn:
vc4_hdmi_connector_destroy(&vc4_hdmi->connector);
err_destroy_encoder:
drm_encoder_cleanup(encoder);
}
static struct clk clk_pcie = {
-@@ -542,6 +556,21 @@ static struct clk_lookup bcm6368_clks[]
+@@ -548,6 +562,21 @@ static struct clk_lookup bcm6368_clks[]
CLKDEV_INIT(NULL, "ipsec", &clk_ipsec),
};
#define HSSPI_PLL_HZ_6328 133333333
#define HSSPI_PLL_HZ_6362 400000000
-@@ -574,6 +603,10 @@ static int __init bcm63xx_clk_init(void)
+@@ -580,6 +609,10 @@ static int __init bcm63xx_clk_init(void)
case BCM6368_CPU_ID:
clkdev_add_table(bcm6368_clks, ARRAY_SIZE(bcm6368_clks));
break;
mask = CKCTL_6328_HSSPI_EN;
else if (BCMCPU_IS_6362())
mask = CKCTL_6362_HSSPI_EN;
-@@ -450,6 +452,19 @@ static struct clk_lookup bcm3368_clks[]
+@@ -456,6 +458,19 @@ static struct clk_lookup bcm3368_clks[]
CLKDEV_INIT("bcm63xx_enet.1", "enet", &clk_enet1),
};
static struct clk_lookup bcm6328_clks[] = {
/* fixed rate clocks */
CLKDEV_INIT(NULL, "periph", &clk_periph),
-@@ -571,6 +586,7 @@ static struct clk_lookup bcm63268_clks[]
+@@ -577,6 +592,7 @@ static struct clk_lookup bcm63268_clks[]
CLKDEV_INIT(NULL, "pcie", &clk_pcie),
};
#define HSSPI_PLL_HZ_6328 133333333
#define HSSPI_PLL_HZ_6362 400000000
-@@ -580,6 +596,10 @@ static int __init bcm63xx_clk_init(void)
+@@ -586,6 +602,10 @@ static int __init bcm63xx_clk_init(void)
case BCM3368_CPU_ID:
clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks));
break;
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
-@@ -495,6 +495,8 @@ static struct clk_lookup bcm3368_clks[]
+@@ -501,6 +501,8 @@ static struct clk_lookup bcm3368_clks[]
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enet0", &clk_enet0),
CLKDEV_INIT(NULL, "enet1", &clk_enet1),
-@@ -511,7 +513,9 @@ static struct clk_lookup bcm6318_clks[]
+@@ -517,7 +519,9 @@ static struct clk_lookup bcm6318_clks[]
/* fixed rate clocks */
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
-@@ -525,7 +529,10 @@ static struct clk_lookup bcm6328_clks[]
+@@ -531,7 +535,10 @@ static struct clk_lookup bcm6328_clks[]
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
-@@ -538,6 +545,7 @@ static struct clk_lookup bcm6338_clks[]
+@@ -544,6 +551,7 @@ static struct clk_lookup bcm6338_clks[]
/* fixed rate clocks */
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enet0", &clk_enet0),
CLKDEV_INIT(NULL, "enet1", &clk_enet1),
-@@ -552,6 +560,7 @@ static struct clk_lookup bcm6345_clks[]
+@@ -558,6 +566,7 @@ static struct clk_lookup bcm6345_clks[]
/* fixed rate clocks */
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enet0", &clk_enet0),
CLKDEV_INIT(NULL, "enet1", &clk_enet1),
-@@ -566,6 +575,7 @@ static struct clk_lookup bcm6348_clks[]
+@@ -572,6 +581,7 @@ static struct clk_lookup bcm6348_clks[]
/* fixed rate clocks */
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enet0", &clk_enet0),
CLKDEV_INIT(NULL, "enet1", &clk_enet1),
-@@ -582,6 +592,8 @@ static struct clk_lookup bcm6358_clks[]
+@@ -588,6 +598,8 @@ static struct clk_lookup bcm6358_clks[]
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enet0", &clk_enet0),
CLKDEV_INIT(NULL, "enet1", &clk_enet1),
-@@ -601,7 +613,10 @@ static struct clk_lookup bcm6362_clks[]
+@@ -607,7 +619,10 @@ static struct clk_lookup bcm6362_clks[]
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
-@@ -617,6 +632,8 @@ static struct clk_lookup bcm6368_clks[]
+@@ -623,6 +638,8 @@ static struct clk_lookup bcm6368_clks[]
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
-@@ -631,7 +648,10 @@ static struct clk_lookup bcm63268_clks[]
+@@ -637,7 +654,10 @@ static struct clk_lookup bcm63268_clks[]
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
* Internal peripheral clock
*/
static struct clk clk_periph = {
-@@ -618,6 +635,7 @@ static struct clk_lookup bcm6362_clks[]
+@@ -624,6 +641,7 @@ static struct clk_lookup bcm6362_clks[]
CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),
CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
CLKDEV_INIT(NULL, "usbd", &clk_usbd),
-@@ -635,6 +653,7 @@ static struct clk_lookup bcm6368_clks[]
+@@ -641,6 +659,7 @@ static struct clk_lookup bcm6368_clks[]
CLKDEV_INIT("10000100.serial", "refclk", &clk_periph),
CLKDEV_INIT("10000120.serial", "refclk", &clk_periph),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
CLKDEV_INIT(NULL, "usbd", &clk_usbd),
-@@ -653,6 +672,7 @@ static struct clk_lookup bcm63268_clks[]
+@@ -659,6 +678,7 @@ static struct clk_lookup bcm63268_clks[]
CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),
CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll),
/* gated clocks */
+++ /dev/null
-From 447fd4347f06af3a369045149ba74f9b914cd99e Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@gmail.com>
-Date: Tue, 23 Nov 2021 21:42:21 +0100
-Subject: [PATCH] ARM: dts: gemini: NAS4220-B: fis-index-block with 128 KiB
- sectors
-
-Steven Maddox reported in the OpenWrt bugzilla, that his
-RaidSonic IB-NAS4220-B was no longer booting with the new
-OpenWrt 21.02 (uses linux 5.10's device-tree). However, it was
-working with the previous OpenWrt 19.07 series (uses 4.14).
-
-|[ 5.548038] No RedBoot partition table detected in 30000000.flash
-|[ 5.618553] Searching for RedBoot partition table in 30000000.flash at offset 0x0
-|[ 5.739093] No RedBoot partition table detected in 30000000.flash
-|...
-|[ 7.039504] Waiting for root device /dev/mtdblock3...
-
-The provided bootlog shows that the RedBoot partition parser was
-looking for the partition table "at offset 0x0". Which is strange
-since the comment in the device-tree says it should be at 0xfe0000.
-
-Further digging on the internet led to a review site that took
-some useful PCB pictures of their review unit back in February 2009.
-Their picture shows a Spansion S29GL128N11TFI01 flash chip.
-
-From Spansion's Datasheet:
-"S29GL128N: One hundred twenty-eight 64 Kword (128 Kbyte) sectors"
-The reported also provided a "cat /sys/class/mtd/mtd0/erasesize",
-which returned "131072".
-
-With the 128 KiB Sector/Erasesize in mind. This patch changes the
-fis-index-block property to (0xfe0000 / 0x20000) = 0x7f.
-
-Note:
-Let's hope the vendor stuck to the 128 KiB sector size flash chip
-for all units still out there.
-
-Fixes: b5a923f8c739 ("ARM: dts: gemini: Switch to redboot partition parsing")
-Bugzilla: https://bugs.openwrt.org/index.php?do=details&task_id=4137
-Reported-by: Steven Maddox <s.maddox@lantizia.me.uk>
-Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---- a/arch/arm/boot/dts/gemini-nas4220b.dts
-+++ b/arch/arm/boot/dts/gemini-nas4220b.dts
-@@ -84,7 +84,7 @@
- partitions {
- compatible = "redboot-fis";
- /* Eraseblock at 0xfe0000 */
-- fis-index-block = <0x1fc>;
-+ fis-index-block = <0x7f>;
- };
- };
-
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
-@@ -841,6 +841,7 @@ struct regmap *__regmap_init(struct devi
+@@ -842,6 +842,7 @@ struct regmap *__regmap_init(struct devi
if (!bus) {
map->reg_read = config->reg_read;
map->reg_write = config->reg_write;
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -2084,7 +2084,7 @@ config CPU_MIPS32
+@@ -2088,7 +2088,7 @@ config CPU_MIPS32
config CPU_MIPS64
bool
default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 || CPU_MIPS64_R5 || \
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
-@@ -1461,12 +1461,34 @@ static void ppp_dev_priv_destructor(stru
+@@ -1466,12 +1466,34 @@ static void ppp_dev_priv_destructor(stru
ppp_destroy_interface(ppp);
}
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
-@@ -2134,6 +2134,19 @@ static int marvell_vct7_cable_test_get_s
+@@ -2140,6 +2140,19 @@ static int marvell_vct7_cable_test_get_s
}
#ifdef CONFIG_HWMON
static int m88e1121_get_temp(struct phy_device *phydev, long *temp)
{
int oldpage;
-@@ -2177,75 +2190,6 @@ error:
+@@ -2183,75 +2196,6 @@ error:
return phy_restore_page(phydev, oldpage, ret);
}
static int m88e1510_get_temp(struct phy_device *phydev, long *temp)
{
int ret;
-@@ -2308,92 +2252,6 @@ static int m88e1510_get_temp_alarm(struc
+@@ -2314,92 +2258,6 @@ static int m88e1510_get_temp_alarm(struc
return 0;
}
static int m88e6390_get_temp(struct phy_device *phydev, long *temp)
{
int sum = 0;
-@@ -2452,63 +2310,112 @@ error:
+@@ -2458,63 +2316,112 @@ error:
return ret;
}
};
static int marvell_hwmon_name(struct phy_device *phydev)
-@@ -2531,49 +2438,48 @@ static int marvell_hwmon_name(struct phy
+@@ -2537,49 +2444,48 @@ static int marvell_hwmon_name(struct phy
return 0;
}
{
return 0;
}
-@@ -2589,40 +2495,7 @@ static int marvell_probe(struct phy_devi
+@@ -2595,40 +2501,7 @@ static int marvell_probe(struct phy_devi
phydev->priv = priv;
}
static struct phy_driver marvell_drivers[] = {
-@@ -2707,8 +2580,9 @@ static struct phy_driver marvell_drivers
+@@ -2713,8 +2586,9 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1121R,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1121R",
.config_init = marvell_config_init,
.config_aneg = m88e1121_config_aneg,
.read_status = marvell_read_status,
-@@ -2827,9 +2701,10 @@ static struct phy_driver marvell_drivers
+@@ -2833,9 +2707,10 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1510,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1510",
.config_init = m88e1510_config_init,
.config_aneg = m88e1510_config_aneg,
.read_status = marvell_read_status,
-@@ -2856,9 +2731,10 @@ static struct phy_driver marvell_drivers
+@@ -2862,9 +2737,10 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1540,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1540",
.config_init = marvell_config_init,
.config_aneg = m88e1510_config_aneg,
.read_status = marvell_read_status,
-@@ -2882,7 +2758,8 @@ static struct phy_driver marvell_drivers
+@@ -2888,7 +2764,8 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1545,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1545",
/* PHY_GBIT_FEATURES */
.flags = PHY_POLL_CABLE_TEST,
.config_init = marvell_config_init,
-@@ -2928,9 +2805,10 @@ static struct phy_driver marvell_drivers
+@@ -2934,9 +2811,10 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E6341_FAMILY,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E6341 Family",
.config_init = marvell_config_init,
.config_aneg = m88e6390_config_aneg,
.read_status = marvell_read_status,
-@@ -2954,9 +2832,10 @@ static struct phy_driver marvell_drivers
+@@ -2960,9 +2838,10 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E6390_FAMILY,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E6390 Family",
.config_init = marvell_config_init,
.config_aneg = m88e6390_config_aneg,
.read_status = marvell_read_status,
-@@ -2980,7 +2859,8 @@ static struct phy_driver marvell_drivers
+@@ -2986,7 +2865,8 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1340S,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1340S",
/* PHY_GBIT_FEATURES */
.config_init = marvell_config_init,
.config_aneg = m88e1510_config_aneg,
-@@ -3002,7 +2882,8 @@ static struct phy_driver marvell_drivers
+@@ -3008,7 +2888,8 @@ static struct phy_driver marvell_drivers
.phy_id = MARVELL_PHY_ID_88E1548P,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1548P",
#define MII_88E1510_GEN_CTRL_REG_1_RESET 0x8000 /* Soft reset */
#define MII_VCT5_TX_RX_MDI0_COUPLING 0x10
-@@ -2498,6 +2507,100 @@ static int marvell_probe(struct phy_devi
+@@ -2504,6 +2513,100 @@ static int marvell_probe(struct phy_devi
return marvell_hwmon_probe(phydev);
}
static struct phy_driver marvell_drivers[] = {
{
.phy_id = MARVELL_PHY_ID_88E1101,
-@@ -2704,7 +2807,7 @@ static struct phy_driver marvell_drivers
+@@ -2710,7 +2813,7 @@ static struct phy_driver marvell_drivers
.driver_data = DEF_MARVELL_HWMON_OPS(m88e1510_hwmon_ops),
.features = PHY_GBIT_FIBRE_FEATURES,
.flags = PHY_POLL_CABLE_TEST,
/*
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
-@@ -605,7 +605,6 @@ static int mac_probe(struct platform_dev
+@@ -616,7 +616,6 @@ static int mac_probe(struct platform_dev
struct platform_device *of_dev;
struct resource res;
struct mac_priv_s *priv;
u32 val;
u8 fman_id;
phy_interface_t phy_if;
-@@ -723,11 +722,9 @@ static int mac_probe(struct platform_dev
+@@ -734,11 +733,9 @@ static int mac_probe(struct platform_dev
priv->cell_index = (u8)val;
/* Get the MAC address */
/* Get the port handles */
nph = of_count_phandle_with_args(mac_node, "fsl,fman-ports", NULL);
-@@ -853,7 +850,7 @@ static int mac_probe(struct platform_dev
+@@ -864,7 +861,7 @@ static int mac_probe(struct platform_dev
if (err < 0)
dev_err(dev, "fman_set_mac_active_pause() = %d\n", err);
}
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
-@@ -1803,8 +1803,8 @@ static int axienet_probe(struct platform
+@@ -1831,8 +1831,8 @@ static int axienet_probe(struct platform
struct device_node *np;
struct axienet_local *lp;
struct net_device *ndev;
int addr_width = 32;
u32 value;
-@@ -2004,13 +2004,14 @@ static int axienet_probe(struct platform
+@@ -2032,13 +2032,14 @@ static int axienet_probe(struct platform
dev_info(&pdev->dev, "Ethernet core IRQ not defined\n");
/* Retrieve the MAC address */
--- a/drivers/pci/pci-bridge-emul.c
+++ b/drivers/pci/pci-bridge-emul.c
-@@ -265,7 +265,11 @@ int pci_bridge_emul_init(struct pci_brid
+@@ -284,7 +284,11 @@ int pci_bridge_emul_init(struct pci_brid
{
BUILD_BUG_ON(sizeof(bridge->conf) != PCI_BRIDGE_CONF_END);
--- a/drivers/pci/pci-bridge-emul.c
+++ b/drivers/pci/pci-bridge-emul.c
-@@ -251,6 +251,49 @@ struct pci_bridge_reg_behavior pcie_cap_
+@@ -270,6 +270,49 @@ struct pci_bridge_reg_behavior pcie_cap_
.ro = GENMASK(15, 0) | PCI_EXP_RTSTA_PENDING,
.w1c = PCI_EXP_RTSTA_PME,
},
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -882,8 +882,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru
- case PCI_CAP_LIST_ID:
+@@ -881,8 +881,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru
+
case PCI_EXP_DEVCAP:
case PCI_EXP_DEVCTL:
+ case PCI_EXP_DEVCAP2:
default:
return PCI_BRIDGE_EMUL_NOT_HANDLED;
}
-@@ -897,10 +902,6 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -896,10 +901,6 @@ advk_pci_bridge_emul_pcie_conf_write(str
struct advk_pcie *pcie = bridge->data;
switch (reg) {
case PCI_EXP_LNKCTL:
advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg);
if (new & PCI_EXP_LNKCTL_RL)
-@@ -922,6 +923,12 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -921,6 +922,12 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_writel(pcie, new, PCIE_ISR0_REG);
break;
/* Enable summary interrupt for GIC SPI source */
reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK);
-@@ -1397,7 +1399,7 @@ static void advk_pcie_handle_msi(struct
+@@ -1399,7 +1401,7 @@ static void advk_pcie_handle_msi(struct
msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG);
msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1696,11 +1696,13 @@ static int advk_pcie_remove(struct platf
+@@ -1698,11 +1698,13 @@ static int advk_pcie_remove(struct platf
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
int i;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1694,6 +1694,7 @@ static int advk_pcie_remove(struct platf
+@@ -1696,6 +1696,7 @@ static int advk_pcie_remove(struct platf
{
struct advk_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
int i;
/* Remove PCI bus with all devices */
-@@ -1702,6 +1703,11 @@ static int advk_pcie_remove(struct platf
+@@ -1704,6 +1705,11 @@ static int advk_pcie_remove(struct platf
pci_remove_root_bus(bridge->bus);
pci_unlock_rescan_remove();
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1708,6 +1708,27 @@ static int advk_pcie_remove(struct platf
+@@ -1710,6 +1710,27 @@ static int advk_pcie_remove(struct platf
val &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
advk_writel(pcie, val, PCIE_CORE_CMD_STATUS_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1733,6 +1733,9 @@ static int advk_pcie_remove(struct platf
+@@ -1735,6 +1735,9 @@ static int advk_pcie_remove(struct platf
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1736,6 +1736,10 @@ static int advk_pcie_remove(struct platf
+@@ -1738,6 +1738,10 @@ static int advk_pcie_remove(struct platf
/* Free config space for emulated root bridge */
pci_bridge_emul_cleanup(&pcie->bridge);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1740,6 +1740,11 @@ static int advk_pcie_remove(struct platf
+@@ -1742,6 +1742,11 @@ static int advk_pcie_remove(struct platf
if (pcie->reset_gpio)
gpiod_set_value_cansleep(pcie->reset_gpio, 1);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1749,6 +1749,9 @@ static int advk_pcie_remove(struct platf
+@@ -1751,6 +1751,9 @@ static int advk_pcie_remove(struct platf
for (i = 0; i < OB_WIN_COUNT; i++)
advk_pcie_disable_ob_win(pcie, i);
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/property.h>
-@@ -3297,3 +3298,5 @@ static int __init regmap_initcall(void)
+@@ -3298,3 +3299,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
-@@ -7053,7 +7053,7 @@ static void __ref alloc_node_mem_map(str
+@@ -7055,7 +7055,7 @@ static void __ref alloc_node_mem_map(str
if (pgdat == NODE_DATA(0)) {
mem_map = NODE_DATA(0)->node_mem_map;
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
config CEVT_BCM1480
bool
-@@ -3178,6 +3175,18 @@ choice
+@@ -3182,6 +3179,18 @@ choice
bool "Extend builtin kernel arguments with bootloader arguments"
endchoice
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
-@@ -141,6 +141,10 @@ const struct fib_prop fib_props[RTN_MAX
+@@ -142,6 +142,10 @@ const struct fib_prop fib_props[RTN_MAX
.error = -EINVAL,
.scope = RT_SCOPE_NOWHERE,
},
/* PIO registers base address and register offsets */
#define PIO_BASE_ADDR 0x4000
#define PIO_CTRL (PIO_BASE_ADDR + 0x0)
-@@ -967,7 +963,7 @@ static int advk_sw_pci_bridge_init(struc
+@@ -966,7 +962,7 @@ static int advk_sw_pci_bridge_init(struc
bridge->conf.pref_mem_limit = cpu_to_le16(PCI_PREF_RANGE_TYPE_64);
/* Support interrupt A for MSI feature */
- bridge->conf.intpin = PCIE_CORE_INT_A_ASSERT_ENABLE;
+ bridge->conf.intpin = PCI_INTERRUPT_INTA;
- /* Indicates supports for Completion Retry Status */
- bridge->pcie_conf.rootcap = cpu_to_le16(PCI_EXP_RTCAP_CRSVIS);
+ /* Aardvark HW provides PCIe Capability structure in version 2 */
+ bridge->pcie_conf.cap = cpu_to_le16(2);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1391,7 +1391,7 @@ static void advk_pcie_remove_irq_domain(
+@@ -1393,7 +1393,7 @@ static void advk_pcie_remove_irq_domain(
static void advk_pcie_handle_msi(struct advk_pcie *pcie)
{
u32 msi_val, msi_mask, msi_status, msi_idx;
msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG);
msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG);
-@@ -1401,13 +1401,12 @@ static void advk_pcie_handle_msi(struct
+@@ -1403,13 +1403,12 @@ static void advk_pcie_handle_msi(struct
if (!(BIT(msi_idx) & msi_status))
continue;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1187,7 +1187,7 @@ static void advk_msi_irq_compose_msi_msg
+@@ -1189,7 +1189,7 @@ static void advk_msi_irq_compose_msi_msg
msg->address_lo = lower_32_bits(msi_msg);
msg->address_hi = upper_32_bits(msi_msg);
}
static int advk_msi_set_affinity(struct irq_data *irq_data,
-@@ -1204,15 +1204,11 @@ static int advk_msi_irq_domain_alloc(str
+@@ -1206,15 +1206,11 @@ static int advk_msi_irq_domain_alloc(str
int hwirq, i;
mutex_lock(&pcie->msi_used_lock);
for (i = 0; i < nr_irqs; i++)
irq_domain_set_info(domain, virq + i, hwirq + i,
-@@ -1230,7 +1226,7 @@ static void advk_msi_irq_domain_free(str
+@@ -1232,7 +1228,7 @@ static void advk_msi_irq_domain_free(str
struct advk_pcie *pcie = domain->host_data;
mutex_lock(&pcie->msi_used_lock);
struct irq_domain *irq_domain;
struct irq_chip irq_chip;
raw_spinlock_t irq_lock;
-@@ -1440,21 +1441,26 @@ static void advk_pcie_handle_int(struct
+@@ -1442,21 +1443,26 @@ static void advk_pcie_handle_int(struct
}
}
}
static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie)
-@@ -1521,7 +1527,7 @@ static int advk_pcie_probe(struct platfo
+@@ -1523,7 +1529,7 @@ static int advk_pcie_probe(struct platfo
struct advk_pcie *pcie;
struct pci_host_bridge *bridge;
struct resource_entry *entry;
bridge = devm_pci_alloc_host_bridge(dev, sizeof(struct advk_pcie));
if (!bridge)
-@@ -1609,17 +1615,9 @@ static int advk_pcie_probe(struct platfo
+@@ -1611,17 +1617,9 @@ static int advk_pcie_probe(struct platfo
if (IS_ERR(pcie->base))
return PTR_ERR(pcie->base);
pcie->reset_gpio = devm_gpiod_get_from_of_node(dev, dev->of_node,
"reset-gpios", 0,
-@@ -1668,11 +1666,14 @@ static int advk_pcie_probe(struct platfo
+@@ -1670,11 +1668,14 @@ static int advk_pcie_probe(struct platfo
return ret;
}
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);
return ret;
-@@ -1720,6 +1721,9 @@ static int advk_pcie_remove(struct platf
+@@ -1722,6 +1723,9 @@ static int advk_pcie_remove(struct platf
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG);
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1437,7 +1437,9 @@ static void advk_pcie_handle_int(struct
+@@ -1439,7 +1439,9 @@ static void advk_pcie_handle_int(struct
PCIE_ISR1_REG);
virq = irq_find_mapping(pcie->irq_domain, i);
struct msi_domain_info msi_domain_info;
DECLARE_BITMAP(msi_used, MSI_IRQ_NUM);
struct mutex msi_used_lock;
-@@ -1197,6 +1195,12 @@ static int advk_msi_set_affinity(struct
+@@ -1199,6 +1197,12 @@ static int advk_msi_set_affinity(struct
return -EINVAL;
}
static int advk_msi_irq_domain_alloc(struct irq_domain *domain,
unsigned int virq,
unsigned int nr_irqs, void *args)
-@@ -1213,7 +1217,7 @@ static int advk_msi_irq_domain_alloc(str
+@@ -1215,7 +1219,7 @@ static int advk_msi_irq_domain_alloc(str
for (i = 0; i < nr_irqs; i++)
irq_domain_set_info(domain, virq + i, hwirq + i,
domain->host_data, handle_simple_irq,
NULL, NULL);
-@@ -1283,29 +1287,23 @@ static const struct irq_domain_ops advk_
+@@ -1285,29 +1289,23 @@ static const struct irq_domain_ops advk_
.xlate = irq_domain_xlate_onecell,
};
DECLARE_BITMAP(msi_used, MSI_IRQ_NUM);
struct mutex msi_used_lock;
u16 msi_msg;
-@@ -1291,20 +1290,20 @@ static struct irq_chip advk_msi_irq_chip
+@@ -1293,20 +1292,20 @@ static struct irq_chip advk_msi_irq_chip
.name = "advk-MSI",
};
msi_msg_phys = virt_to_phys(&pcie->msi_msg);
advk_writel(pcie, lower_32_bits(msi_msg_phys),
-@@ -1320,7 +1319,8 @@ static int advk_pcie_init_msi_irq_domain
+@@ -1322,7 +1321,8 @@ static int advk_pcie_init_msi_irq_domain
pcie->msi_domain =
pci_msi_create_irq_domain(of_node_to_fwnode(node),
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1299,7 +1299,6 @@ static struct msi_domain_info advk_msi_d
+@@ -1301,7 +1301,6 @@ static struct msi_domain_info advk_msi_d
static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
{
struct device *dev = &pcie->pdev->dev;
phys_addr_t msi_msg_phys;
mutex_init(&pcie->msi_used_lock);
-@@ -1318,7 +1317,7 @@ static int advk_pcie_init_msi_irq_domain
+@@ -1320,7 +1319,7 @@ static int advk_pcie_init_msi_irq_domain
return -ENOMEM;
pcie->msi_domain =
/* Unmask summary MSI interrupt */
reg = advk_readl(pcie, PCIE_ISR0_MASK_REG);
-@@ -1196,10 +1195,52 @@ static int advk_msi_set_affinity(struct
+@@ -1198,10 +1197,52 @@ static int advk_msi_set_affinity(struct
return -EINVAL;
}
};
static int advk_msi_irq_domain_alloc(struct irq_domain *domain,
-@@ -1289,7 +1330,9 @@ static const struct irq_domain_ops advk_
+@@ -1291,7 +1332,9 @@ static const struct irq_domain_ops advk_
};
static struct irq_chip advk_msi_irq_chip = {
};
static struct msi_domain_info advk_msi_domain_info = {
-@@ -1303,6 +1346,7 @@ static int advk_pcie_init_msi_irq_domain
+@@ -1305,6 +1348,7 @@ static int advk_pcie_init_msi_irq_domain
struct device *dev = &pcie->pdev->dev;
phys_addr_t msi_msg_phys;
/* Enable MSI */
reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG);
reg |= PCIE_CORE_CTRL2_MSI_ENABLE;
-@@ -1182,10 +1187,10 @@ static void advk_msi_irq_compose_msi_msg
+@@ -1184,10 +1189,10 @@ static void advk_msi_irq_compose_msi_msg
struct msi_msg *msg)
{
struct advk_pcie *pcie = irq_data_get_irq_chip_data(data);
msg->data = data->hwirq;
}
-@@ -1344,18 +1349,10 @@ static struct msi_domain_info advk_msi_d
+@@ -1346,18 +1351,10 @@ static struct msi_domain_info advk_msi_d
static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
{
struct device *dev = &pcie->pdev->dev;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1342,7 +1342,7 @@ static struct irq_chip advk_msi_irq_chip
+@@ -1344,7 +1344,7 @@ static struct irq_chip advk_msi_irq_chip
static struct msi_domain_info advk_msi_domain_info = {
.flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
if (mask & (PCI_BRIDGE_CTL_BUS_RESET << 16)) {
u32 val = advk_readl(pcie, PCIE_CORE_CTRL1_REG);
if (new & (PCI_BRIDGE_CTL_BUS_RESET << 16))
-@@ -1464,6 +1485,19 @@ static void advk_pcie_handle_int(struct
+@@ -1466,6 +1487,19 @@ static void advk_pcie_handle_int(struct
isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -933,19 +933,21 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -932,19 +932,21 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_pcie_wait_for_retrain(pcie);
break;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1489,6 +1489,19 @@ static void advk_pcie_handle_int(struct
+@@ -1491,6 +1491,19 @@ static void advk_pcie_handle_int(struct
isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK);
case PCI_EXP_LNKCAP: {
u32 val = advk_readl(pcie, PCIE_CORE_PCIEXP_CAP + reg);
-@@ -933,22 +927,19 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -932,22 +926,19 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_pcie_wait_for_retrain(pcie);
break;
case PCI_EXP_DEVCTL:
case PCI_EXP_DEVCTL2:
-@@ -1450,6 +1441,34 @@ static void advk_pcie_remove_irq_domain(
+@@ -1452,6 +1443,34 @@ static void advk_pcie_remove_irq_domain(
irq_domain_remove(pcie->irq_domain);
}
static void advk_pcie_handle_msi(struct advk_pcie *pcie)
{
u32 msi_val, msi_mask, msi_status, msi_idx;
-@@ -1489,18 +1508,9 @@ static void advk_pcie_handle_int(struct
+@@ -1491,18 +1510,9 @@ static void advk_pcie_handle_int(struct
isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG);
isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK);
struct irq_domain *irq_domain;
struct irq_chip irq_chip;
raw_spinlock_t irq_lock;
-@@ -1441,6 +1442,44 @@ static void advk_pcie_remove_irq_domain(
+@@ -1443,6 +1444,44 @@ static void advk_pcie_remove_irq_domain(
irq_domain_remove(pcie->irq_domain);
}
static void advk_pcie_handle_pme(struct advk_pcie *pcie)
{
u32 requester = advk_readl(pcie, PCIE_MSG_LOG_REG) >> 16;
-@@ -1463,7 +1502,7 @@ static void advk_pcie_handle_pme(struct
+@@ -1465,7 +1504,7 @@ static void advk_pcie_handle_pme(struct
if (!(le16_to_cpu(pcie->bridge.pcie_conf.rootctl) & PCI_EXP_RTCTL_PMEIE))
return;
if (generic_handle_irq(virq) == -EINVAL)
dev_err_ratelimited(&pcie->pdev->dev, "unhandled PME IRQ\n");
}
-@@ -1520,7 +1559,7 @@ static void advk_pcie_handle_int(struct
+@@ -1522,7 +1561,7 @@ static void advk_pcie_handle_int(struct
* Aardvark HW returns zero for PCI_ERR_ROOT_AER_IRQ, so use
* PCIe interrupt 0
*/
if (generic_handle_irq(virq) == -EINVAL)
dev_err_ratelimited(&pcie->pdev->dev, "unhandled ERR IRQ\n");
}
-@@ -1566,6 +1605,21 @@ static void advk_pcie_irq_handler(struct
+@@ -1568,6 +1607,21 @@ static void advk_pcie_irq_handler(struct
chained_irq_exit(chip, desc);
}
static void __maybe_unused advk_pcie_disable_phy(struct advk_pcie *pcie)
{
phy_power_off(pcie->phy);
-@@ -1769,14 +1823,24 @@ static int advk_pcie_probe(struct platfo
+@@ -1771,14 +1825,24 @@ static int advk_pcie_probe(struct platfo
return ret;
}
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);
return ret;
-@@ -1828,6 +1892,7 @@ static int advk_pcie_remove(struct platf
+@@ -1830,6 +1894,7 @@ static int advk_pcie_remove(struct platf
irq_set_chained_handler_and_data(pcie->irq, NULL, NULL);
/* Remove IRQ domains */
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1420,7 +1420,6 @@ static int advk_pcie_init_irq_domain(str
+@@ -1422,7 +1422,6 @@ static int advk_pcie_init_irq_domain(str
}
irq_chip->irq_mask = advk_pcie_irq_mask;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1337,7 +1337,6 @@ static int advk_pcie_irq_map(struct irq_
+@@ -1339,7 +1339,6 @@ static int advk_pcie_irq_map(struct irq_
{
struct advk_pcie *pcie = h->host_data;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1618,7 +1618,7 @@ static int advk_pcie_map_irq(const struc
+@@ -1620,7 +1620,7 @@ static int advk_pcie_map_irq(const struc
return of_irq_parse_and_map_pci(dev, slot, pin);
}
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1003,8 +1003,12 @@ static bool advk_pcie_valid_device(struc
+@@ -1005,8 +1005,12 @@ static bool advk_pcie_valid_device(struc
return false;
/*
raw_spinlock_t irq_lock;
struct irq_domain *msi_domain;
struct irq_domain *msi_inner_domain;
-@@ -1336,14 +1335,19 @@ static void advk_pcie_irq_unmask(struct
+@@ -1338,14 +1337,19 @@ static void advk_pcie_irq_unmask(struct
raw_spin_unlock_irqrestore(&pcie->irq_lock, flags);
}
irq_set_chip_data(virq, pcie);
return 0;
-@@ -1402,7 +1406,6 @@ static int advk_pcie_init_irq_domain(str
+@@ -1404,7 +1408,6 @@ static int advk_pcie_init_irq_domain(str
struct device *dev = &pcie->pdev->dev;
struct device_node *node = dev->of_node;
struct device_node *pcie_intc_node;
int ret = 0;
raw_spin_lock_init(&pcie->irq_lock);
-@@ -1413,28 +1416,14 @@ static int advk_pcie_init_irq_domain(str
+@@ -1415,28 +1418,14 @@ static int advk_pcie_init_irq_domain(str
return -ENODEV;
}
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1635,9 +1635,7 @@ static int advk_pcie_enable_phy(struct a
+@@ -1637,9 +1637,7 @@ static int advk_pcie_enable_phy(struct a
}
ret = phy_power_on(pcie->phy);
--- /dev/null
+From 8af60f5b0aa5b33525379d2859c8581b3472f9ea Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Fri, 28 Jan 2022 13:25:46 +0000
+Subject: [PATCH] Revert "ASoC: mediatek: Check for error clk pointer"
+
+This reverts commit 9de2b9286a6dd16966959b3cb34fc2ddfd39213e.
+---
+ drivers/soc/mediatek/mtk-scpsys.c | 15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+--- a/drivers/soc/mediatek/mtk-scpsys.c
++++ b/drivers/soc/mediatek/mtk-scpsys.c
+@@ -411,17 +411,12 @@ out:
+ return ret;
+ }
+
+-static int init_clks(struct platform_device *pdev, struct clk **clk)
++static void init_clks(struct platform_device *pdev, struct clk **clk)
+ {
+ int i;
+
+- for (i = CLK_NONE + 1; i < CLK_MAX; i++) {
++ for (i = CLK_NONE + 1; i < CLK_MAX; i++)
+ clk[i] = devm_clk_get(&pdev->dev, clk_names[i]);
+- if (IS_ERR(clk[i]))
+- return PTR_ERR(clk[i]);
+- }
+-
+- return 0;
+ }
+
+ static struct scp *init_scp(struct platform_device *pdev,
+@@ -431,7 +426,7 @@ static struct scp *init_scp(struct platf
+ {
+ struct genpd_onecell_data *pd_data;
+ struct resource *res;
+- int i, j, ret;
++ int i, j;
+ struct scp *scp;
+ struct clk *clk[CLK_MAX];
+
+@@ -486,9 +481,7 @@ static struct scp *init_scp(struct platf
+
+ pd_data->num_domains = num;
+
+- ret = init_clks(pdev, clk);
+- if (ret)
+- return ERR_PTR(ret);
++ init_clks(pdev, clk);
+
+ for (i = 0; i < num; i++) {
+ struct scp_domain *scpd = &scp->domains[i];
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
-@@ -601,6 +601,41 @@ not_relocated: mov r0, #0
+@@ -602,6 +602,41 @@ not_relocated: mov r0, #0
bic r4, r4, #1
blne cache_on
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -2434,6 +2434,12 @@ config MIPS_VPE_LOADER
+@@ -2438,6 +2438,12 @@ config MIPS_VPE_LOADER
Includes a loader for loading an elf relocatable object
onto another VPE and running it.
--- a/drivers/pci/controller/pci-mvebu.c
+++ b/drivers/pci/controller/pci-mvebu.c
-@@ -933,6 +933,7 @@ static int mvebu_pcie_powerup(struct mve
+@@ -941,6 +941,7 @@ static int mvebu_pcie_powerup(struct mve
if (port->reset_gpio) {
u32 reset_udelay = PCI_PM_D3COLD_WAIT * 1000;
of_property_read_u32(port->dn, "reset-delay-us",
&reset_udelay);
-@@ -940,7 +941,13 @@ static int mvebu_pcie_powerup(struct mve
+@@ -948,7 +949,13 @@ static int mvebu_pcie_powerup(struct mve
udelay(100);
gpiod_set_value_cansleep(port->reset_gpio, 0);
}
return 0;
-@@ -1100,15 +1107,16 @@ static int mvebu_pcie_probe(struct platf
+@@ -1108,15 +1115,16 @@ static int mvebu_pcie_probe(struct platf
if (!child)
continue;
}
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
-@@ -771,7 +771,7 @@ int __init octeon_prune_device_tree(void
+@@ -773,7 +773,7 @@ int __init octeon_prune_device_tree(void
if (fdt_check_header(initial_boot_params))
panic("Corrupt Device Tree.");
#include <linux/platform_data/x86/apple.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
-@@ -5769,3 +5770,34 @@ static void nvidia_ion_ahci_fixup(struct
+@@ -5772,3 +5773,34 @@ static void nvidia_ion_ahci_fixup(struct
pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);