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

Commit 88831b0a authored by Siddhartha Agrawal's avatar Siddhartha Agrawal
Browse files

msm: mdss: add support for DSI NULL packet insertion



For DSI6G version 1.4.0 and above, for command mode use cases,
there is support in MDSS DSI to insert NULL packets automatically
between lines of a frame or High Speed DMA command burst to avoid
HS-LP-HS transitions in the middle of frame/DMA command transfer.
Add support for this in DSI driver.

Crs-Fixed: 880973
Change-Id: I468c2ea602d4c3efa0d8844c843840a15b631a3f
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: default avatarSiddhartha Agrawal <agrawals@codeaurora.org>
parent 81a98d6e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1078,6 +1078,7 @@ static void mdss_dsi_mode_setup(struct mdss_panel_data *pdata)
	struct mdss_panel_info *pinfo;
	struct mipi_panel_info *mipi;
	struct dsc_desc *dsc = NULL;
	u32 data = 0;
	u32 hbp, hfp, vbp, vfp, hspw, vspw, width, height;
	u32 ystride, bpp, dst_bpp, byte_num;
	u32 stream_ctrl, stream_total;
@@ -1172,6 +1173,14 @@ static void mdss_dsi_mode_setup(struct mdss_panel_data *pdata)
			stream_total = height << 16 | width;
		}

		/* DSI_COMMAND_MODE_NULL_INSERTION_CTRL */
		if (ctrl_pdata->shared_data->hw_rev >= MDSS_DSI_HW_REV_104) {
			data = (mipi->vc << 1); /* Virtual channel ID */
			data |= 0 << 16; /* Word count of the NULL packet */
			data |= 0x1; /* Enable Null insertion */
			MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2b4, data);
		}

		/* DSI_COMMAND_MODE_MDP_STREAM_CTRL */
		MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x60, stream_ctrl);
		MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x58, stream_ctrl);