disp: msm: dsi: batch max packet size command with read command

Change batches max packet size and read command together, so that
for each esd read, there will not be two independent command transfers.
Without batching sometimes esd thread can hold the panel mutex for
longer time, which can cause framedrops as crtc thread can be blocked on
panel lock to send partial update command and kickoff next frame.

Change-Id: I101283a2559b616911f4312421acb00a8f154dba
Signed-off-by: Vara Reddy <varar@codeaurora.org>
This commit is contained in:
Vara Reddy 2019-07-10 09:53:21 -07:00
parent ab1d40154f
commit 6c456bad33

View File

@ -1335,6 +1335,8 @@ static int dsi_set_max_return_size(struct dsi_ctrl *dsi_ctrl,
int rc = 0;
u8 tx[2] = { (u8)(size & 0xFF), (u8)(size >> 8) };
u32 flags = DSI_CTRL_CMD_FETCH_MEMORY;
u16 dflags = rx_msg->flags;
struct mipi_dsi_msg msg = {
.channel = rx_msg->channel,
.type = MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE,
@ -1343,6 +1345,10 @@ static int dsi_set_max_return_size(struct dsi_ctrl *dsi_ctrl,
.flags = rx_msg->flags,
};
/* remove last message flag to batch max packet cmd to read command */
dflags &= ~BIT(3);
msg.flags = dflags;
rc = dsi_message_tx(dsi_ctrl, &msg, flags);
if (rc)
pr_err("failed to send max return size packet, rc=%d\n", rc);