Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 942a91a6 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

OMAP: DSS2: DSI: remove external TE support



With the reworked model, DSI driver doesn't need to know anything about
external TE lines. Thus we can remove ext_te support, and only leave the
DSI TE trigger support.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@nokia.com>
parent 69b2048f
Loading
Loading
Loading
Loading
+4 −16
Original line number Original line Diff line number Diff line
@@ -237,7 +237,6 @@ static struct
	struct dsi_update_region update_region;
	struct dsi_update_region update_region;


	bool te_enabled;
	bool te_enabled;
	bool use_ext_te;


	struct work_struct framedone_work;
	struct work_struct framedone_work;
	void (*framedone_callback)(int, void *);
	void (*framedone_callback)(int, void *);
@@ -2723,15 +2722,12 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
	unsigned packet_payload;
	unsigned packet_payload;
	unsigned packet_len;
	unsigned packet_len;
	u32 l;
	u32 l;
	bool use_te_trigger;
	const unsigned channel = dsi.update_channel;
	const unsigned channel = dsi.update_channel;
	/* line buffer is 1024 x 24bits */
	/* line buffer is 1024 x 24bits */
	/* XXX: for some reason using full buffer size causes considerable TX
	/* XXX: for some reason using full buffer size causes considerable TX
	 * slowdown with update sizes that fill the whole buffer */
	 * slowdown with update sizes that fill the whole buffer */
	const unsigned line_buf_size = 1023 * 3;
	const unsigned line_buf_size = 1023 * 3;


	use_te_trigger = dsi.te_enabled && !dsi.use_ext_te;

	DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
	DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
			x, y, w, h);
			x, y, w, h);


@@ -2760,7 +2756,7 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,


	dsi_vc_write_long_header(channel, DSI_DT_DCS_LONG_WRITE, packet_len, 0);
	dsi_vc_write_long_header(channel, DSI_DT_DCS_LONG_WRITE, packet_len, 0);


	if (use_te_trigger)
	if (dsi.te_enabled)
		l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
		l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
	else
	else
		l = FLD_MOD(l, 1, 31, 31); /* TE_START */
		l = FLD_MOD(l, 1, 31, 31); /* TE_START */
@@ -2781,7 +2777,7 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,


	dss_start_update(dssdev);
	dss_start_update(dssdev);


	if (use_te_trigger) {
	if (dsi.te_enabled) {
		/* disable LP_RX_TO, so that we can receive TE.  Time to wait
		/* disable LP_RX_TO, so that we can receive TE.  Time to wait
		 * for TE is longer than the timer allows */
		 * for TE is longer than the timer allows */
		REG_FLD_MOD(DSI_TIMING2, 0, 15, 15); /* LP_RX_TO */
		REG_FLD_MOD(DSI_TIMING2, 0, 15, 15); /* LP_RX_TO */
@@ -2805,16 +2801,13 @@ static void dsi_framedone_timeout_work_callback(struct work_struct *work)
{
{
	int r;
	int r;
	const int channel = dsi.update_channel;
	const int channel = dsi.update_channel;
	bool use_te_trigger;


	DSSERR("Framedone not received for 250ms!\n");
	DSSERR("Framedone not received for 250ms!\n");


	/* SIDLEMODE back to smart-idle */
	/* SIDLEMODE back to smart-idle */
	dispc_enable_sidle();
	dispc_enable_sidle();


	use_te_trigger = dsi.te_enabled && !dsi.use_ext_te;
	if (dsi.te_enabled) {

	if (use_te_trigger) {
		/* enable LP_RX_TO again after the TE */
		/* enable LP_RX_TO again after the TE */
		REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */
		REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */
	}
	}
@@ -2858,13 +2851,10 @@ static void dsi_handle_framedone(void)
{
{
	int r;
	int r;
	const int channel = dsi.update_channel;
	const int channel = dsi.update_channel;
	bool use_te_trigger;

	use_te_trigger = dsi.te_enabled && !dsi.use_ext_te;


	DSSDBG("FRAMEDONE\n");
	DSSDBG("FRAMEDONE\n");


	if (use_te_trigger) {
	if (dsi.te_enabled) {
		/* enable LP_RX_TO again after the TE */
		/* enable LP_RX_TO again after the TE */
		REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */
		REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */
	}
	}
@@ -3175,8 +3165,6 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
	if (r)
	if (r)
		goto err2;
		goto err2;


	dsi.use_ext_te = dssdev->phy.dsi.ext_te;

	mutex_unlock(&dsi.lock);
	mutex_unlock(&dsi.lock);


	return 0;
	return 0;