diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/Makefile | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dpi.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dsi.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 48 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 23 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi_common.c | 1 | 
6 files changed, 33 insertions, 50 deletions
| diff --git a/drivers/gpu/drm/omapdrm/dss/Makefile b/drivers/gpu/drm/omapdrm/dss/Makefile index 3c5644c3fc38..904101c5e79d 100644 --- a/drivers/gpu/drm/omapdrm/dss/Makefile +++ b/drivers/gpu/drm/omapdrm/dss/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0  obj-$(CONFIG_OMAP2_DSS_INIT) += omapdss-boot-init.o  obj-$(CONFIG_OMAP_DSS_BASE) += omapdss-base.o diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index daf286fc8a40..ca1e3b489540 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -566,8 +566,8 @@ static int dpi_verify_pll(struct dss_pll *pll)  }  static const struct soc_device_attribute dpi_soc_devices[] = { -	{ .family = "OMAP3[456]*" }, -	{ .family = "[AD]M37*" }, +	{ .machine = "OMAP3[456]*" }, +	{ .machine = "[AD]M37*" },  	{ /* sentinel */ }  }; diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index b56a05730314..c2cf6d98e577 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -4095,7 +4095,7 @@ static void dsi_update_screen_dispc(struct platform_device *dsidev)  }  #ifdef DSI_CATCH_MISSING_TE -static void dsi_te_timeout(unsigned long arg) +static void dsi_te_timeout(struct timer_list *unused)  {  	DSSERR("TE not received for 250ms!\n");  } @@ -5449,9 +5449,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data)  			     dsi_framedone_timeout_work_callback);  #ifdef DSI_CATCH_MISSING_TE -	init_timer(&dsi->te_timer); -	dsi->te_timer.function = dsi_te_timeout; -	dsi->te_timer.data = 0; +	timer_setup(&dsi->te_timer, dsi_te_timeout, 0);  #endif  	dsi_mem = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto"); diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c index d86873f2abe6..23db74ae1826 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c @@ -78,6 +78,8 @@ static void hdmi_cec_received_msg(struct hdmi_core_data *core)  			/* then read the message */  			msg.len = cnt & 0xf; +			if (msg.len > CEC_MAX_MSG_SIZE - 2) +				msg.len = CEC_MAX_MSG_SIZE - 2;  			msg.msg[0] = hdmi_read_reg(core->base,  						   HDMI_CEC_RX_CMD_HEADER);  			msg.msg[1] = hdmi_read_reg(core->base, @@ -104,26 +106,6 @@ static void hdmi_cec_received_msg(struct hdmi_core_data *core)  	}  } -static void hdmi_cec_transmit_fifo_empty(struct hdmi_core_data *core, u32 stat1) -{ -	if (stat1 & 2) { -		u32 dbg3 = hdmi_read_reg(core->base, HDMI_CEC_DBG_3); - -		cec_transmit_done(core->adap, -				  CEC_TX_STATUS_NACK | -				  CEC_TX_STATUS_MAX_RETRIES, -				  0, (dbg3 >> 4) & 7, 0, 0); -	} else if (stat1 & 1) { -		cec_transmit_done(core->adap, -				  CEC_TX_STATUS_ARB_LOST | -				  CEC_TX_STATUS_MAX_RETRIES, -				  0, 0, 0, 0); -	} else if (stat1 == 0) { -		cec_transmit_done(core->adap, CEC_TX_STATUS_OK, -				  0, 0, 0, 0); -	} -} -  void hdmi4_cec_irq(struct hdmi_core_data *core)  {  	u32 stat0 = hdmi_read_reg(core->base, HDMI_CEC_INT_STATUS_0); @@ -132,27 +114,21 @@ void hdmi4_cec_irq(struct hdmi_core_data *core)  	hdmi_write_reg(core->base, HDMI_CEC_INT_STATUS_0, stat0);  	hdmi_write_reg(core->base, HDMI_CEC_INT_STATUS_1, stat1); -	if (stat0 & 0x40) +	if (stat0 & 0x20) { +		cec_transmit_done(core->adap, CEC_TX_STATUS_OK, +				  0, 0, 0, 0);  		REG_FLD_MOD(core->base, HDMI_CEC_DBG_3, 0x1, 7, 7); -	else if (stat0 & 0x24) -		hdmi_cec_transmit_fifo_empty(core, stat1); -	if (stat1 & 2) { +	} else if (stat1 & 0x02) {  		u32 dbg3 = hdmi_read_reg(core->base, HDMI_CEC_DBG_3);  		cec_transmit_done(core->adap,  				  CEC_TX_STATUS_NACK |  				  CEC_TX_STATUS_MAX_RETRIES,  				  0, (dbg3 >> 4) & 7, 0, 0); -	} else if (stat1 & 1) { -		cec_transmit_done(core->adap, -				  CEC_TX_STATUS_ARB_LOST | -				  CEC_TX_STATUS_MAX_RETRIES, -				  0, 0, 0, 0); +		REG_FLD_MOD(core->base, HDMI_CEC_DBG_3, 0x1, 7, 7);  	}  	if (stat0 & 0x02)  		hdmi_cec_received_msg(core); -	if (stat1 & 0x3) -		REG_FLD_MOD(core->base, HDMI_CEC_DBG_3, 0x1, 7, 7);  }  static bool hdmi_cec_clear_tx_fifo(struct cec_adapter *adap) @@ -231,18 +207,14 @@ static int hdmi_cec_adap_enable(struct cec_adapter *adap, bool enable)  	/*  	 * Enable CEC interrupts:  	 * Transmit Buffer Full/Empty Change event -	 * Transmitter FIFO Empty event  	 * Receiver FIFO Not Empty event  	 */ -	hdmi_write_reg(core->base, HDMI_CEC_INT_ENABLE_0, 0x26); +	hdmi_write_reg(core->base, HDMI_CEC_INT_ENABLE_0, 0x22);  	/*  	 * Enable CEC interrupts: -	 * RX FIFO Overrun Error event -	 * Short Pulse Detected event  	 * Frame Retransmit Count Exceeded event -	 * Start Bit Irregularity event  	 */ -	hdmi_write_reg(core->base, HDMI_CEC_INT_ENABLE_1, 0x0f); +	hdmi_write_reg(core->base, HDMI_CEC_INT_ENABLE_1, 0x02);  	/* cec calibration enable (self clearing) */  	hdmi_write_reg(core->base, HDMI_CEC_SETUP, 0x03); @@ -352,7 +324,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,  {  	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |  			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC; -	unsigned int ret; +	int ret;  	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,  		"omap4", caps, CEC_MAX_LOG_ADDRS); diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c index 62e451162d96..b06f9956e733 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c @@ -886,25 +886,36 @@ struct hdmi4_features {  	bool audio_use_mclk;  }; -static const struct hdmi4_features hdmi4_es1_features = { +static const struct hdmi4_features hdmi4430_es1_features = {  	.cts_swmode = false,  	.audio_use_mclk = false,  }; -static const struct hdmi4_features hdmi4_es2_features = { +static const struct hdmi4_features hdmi4430_es2_features = {  	.cts_swmode = true,  	.audio_use_mclk = false,  }; -static const struct hdmi4_features hdmi4_es3_features = { +static const struct hdmi4_features hdmi4_features = {  	.cts_swmode = true,  	.audio_use_mclk = true,  };  static const struct soc_device_attribute hdmi4_soc_devices[] = { -	{ .family = "OMAP4", .revision = "ES1.?", .data = &hdmi4_es1_features }, -	{ .family = "OMAP4", .revision = "ES2.?", .data = &hdmi4_es2_features }, -	{ .family = "OMAP4",			  .data = &hdmi4_es3_features }, +	{ +		.machine = "OMAP4430", +		.revision = "ES1.?", +		.data = &hdmi4430_es1_features, +	}, +	{ +		.machine = "OMAP4430", +		.revision = "ES2.?", +		.data = &hdmi4430_es2_features, +	}, +	{ +		.family = "OMAP4", +		.data = &hdmi4_features, +	},  	{ /* sentinel */ }  }; diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_common.c b/drivers/gpu/drm/omapdrm/dss/hdmi_common.c index 4dfb67fe5f6d..3ecde23ac604 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_common.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_common.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0  #define DSS_SUBSYS_NAME "HDMI" |