|
|
@@ -525,7 +525,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
vc4_hdmi->audio.dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
|
|
vc4_hdmi->audio.dma_data.maxburst = 2;
|
|
|
|
|
|
-@@ -1068,7 +1031,7 @@ static void vc4_cec_read_msg(struct vc4_
|
|
|
+@@ -1069,7 +1032,7 @@ static void vc4_cec_read_msg(struct vc4_
|
|
|
msg->len = 1 + ((cntrl1 & VC4_HDMI_CEC_REC_WRD_CNT_MASK) >>
|
|
|
VC4_HDMI_CEC_REC_WRD_CNT_SHIFT);
|
|
|
for (i = 0; i < msg->len; i += 4) {
|
|
|
@@ -534,7 +534,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
|
|
|
msg->msg[i] = val & 0xff;
|
|
|
msg->msg[i + 1] = (val >> 8) & 0xff;
|
|
|
-@@ -1080,26 +1043,26 @@ static void vc4_cec_read_msg(struct vc4_
|
|
|
+@@ -1081,26 +1044,26 @@ static void vc4_cec_read_msg(struct vc4_
|
|
|
static irqreturn_t vc4_cec_irq_handler(int irq, void *priv)
|
|
|
{
|
|
|
struct vc4_hdmi *vc4_hdmi = priv;
|
|
|
@@ -567,7 +567,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
|
|
|
return IRQ_WAKE_THREAD;
|
|
|
}
|
|
|
-@@ -1109,7 +1072,7 @@ static int vc4_hdmi_cec_adap_enable(stru
|
|
|
+@@ -1110,7 +1073,7 @@ static int vc4_hdmi_cec_adap_enable(stru
|
|
|
struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap);
|
|
|
/* clock period in microseconds */
|
|
|
const u32 usecs = 1000000 / CEC_CLOCK_FREQ;
|
|
|
@@ -576,7 +576,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
|
|
|
val &= ~(VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET |
|
|
|
VC4_HDMI_CEC_CNT_TO_4700_US_MASK |
|
|
|
-@@ -1118,30 +1081,30 @@ static int vc4_hdmi_cec_adap_enable(stru
|
|
|
+@@ -1119,30 +1082,30 @@ static int vc4_hdmi_cec_adap_enable(stru
|
|
|
((4500 / usecs) << VC4_HDMI_CEC_CNT_TO_4500_US_SHIFT);
|
|
|
|
|
|
if (enable) {
|
|
|
@@ -615,7 +615,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET);
|
|
|
}
|
|
|
return 0;
|
|
|
-@@ -1151,8 +1114,8 @@ static int vc4_hdmi_cec_adap_log_addr(st
|
|
|
+@@ -1152,8 +1115,8 @@ static int vc4_hdmi_cec_adap_log_addr(st
|
|
|
{
|
|
|
struct vc4_hdmi *vc4_hdmi = cec_get_drvdata(adap);
|
|
|
|
|
|
@@ -626,7 +626,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
(log_addr & 0xf) << VC4_HDMI_CEC_ADDR_SHIFT);
|
|
|
return 0;
|
|
|
}
|
|
|
-@@ -1165,20 +1128,20 @@ static int vc4_hdmi_cec_adap_transmit(st
|
|
|
+@@ -1166,20 +1129,20 @@ static int vc4_hdmi_cec_adap_transmit(st
|
|
|
unsigned int i;
|
|
|
|
|
|
for (i = 0; i < msg->len; i += 4)
|
|
|
@@ -651,7 +651,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-@@ -1189,26 +1152,63 @@ static const struct cec_adap_ops vc4_hdm
|
|
|
+@@ -1190,26 +1153,63 @@ static const struct cec_adap_ops vc4_hdm
|
|
|
};
|
|
|
#endif
|
|
|
|
|
|
@@ -721,7 +721,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
|
|
|
vc4_hdmi->pixel_clock = devm_clk_get(dev, "pixel");
|
|
|
if (IS_ERR(vc4_hdmi->pixel_clock)) {
|
|
|
-@@ -1301,12 +1301,12 @@ static int vc4_hdmi_bind(struct device *
|
|
|
+@@ -1302,12 +1302,12 @@ static int vc4_hdmi_bind(struct device *
|
|
|
}
|
|
|
|
|
|
/* HDMI core must be enabled. */
|
|
|
@@ -738,7 +738,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
}
|
|
|
pm_runtime_enable(dev);
|
|
|
|
|
|
-@@ -1330,8 +1330,8 @@ static int vc4_hdmi_bind(struct device *
|
|
|
+@@ -1331,8 +1331,8 @@ static int vc4_hdmi_bind(struct device *
|
|
|
cec_fill_conn_info_from_drm(&conn_info, &vc4_hdmi->connector);
|
|
|
cec_s_conn_info(vc4_hdmi->cec_adap, &conn_info);
|
|
|
|
|
|
@@ -749,7 +749,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
value &= ~VC4_HDMI_CEC_DIV_CLK_CNT_MASK;
|
|
|
/*
|
|
|
* Set the logical address to Unregistered and set the clock
|
|
|
-@@ -1340,7 +1340,7 @@ static int vc4_hdmi_bind(struct device *
|
|
|
+@@ -1341,7 +1341,7 @@ static int vc4_hdmi_bind(struct device *
|
|
|
*/
|
|
|
value |= VC4_HDMI_CEC_ADDR_MASK |
|
|
|
(4091 << VC4_HDMI_CEC_DIV_CLK_CNT_SHIFT);
|
|
|
@@ -758,7 +758,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
ret = devm_request_threaded_irq(dev, platform_get_irq(pdev, 0),
|
|
|
vc4_cec_irq_handler,
|
|
|
vc4_cec_irq_handler_thread, 0,
|
|
|
-@@ -1387,6 +1387,9 @@ static void vc4_hdmi_unbind(struct devic
|
|
|
+@@ -1388,6 +1388,9 @@ static void vc4_hdmi_unbind(struct devic
|
|
|
struct snd_soc_card *card = dev_get_drvdata(dev);
|
|
|
struct vc4_hdmi *vc4_hdmi = snd_soc_card_get_drvdata(card);
|
|
|
|
|
|
@@ -768,7 +768,7 @@ Signed-off-by: Maxime Ripard <[email protected]>
|
|
|
cec_unregister_adapter(vc4_hdmi->cec_adap);
|
|
|
vc4_hdmi_connector_destroy(&vc4_hdmi->connector);
|
|
|
vc4_hdmi_encoder_destroy(&vc4_hdmi->encoder.base.base);
|
|
|
-@@ -1414,6 +1417,9 @@ static int vc4_hdmi_dev_remove(struct pl
|
|
|
+@@ -1415,6 +1418,9 @@ static int vc4_hdmi_dev_remove(struct pl
|
|
|
}
|
|
|
|
|
|
static const struct vc4_hdmi_variant bcm2835_variant = {
|