disp: msm: dsi: add support for DMA CMD scheduling for CMD mode panels

The change allows for configuring a command DMA window during which
the command is triggered. The DMA window must not intersect with the
MDP tear check window. Once the command transfer is successful, the
trigger control needs to reset to the default DMA trigger specified
by the panel.

Change-Id: I5485ca1f8e141ed92dc8c77c2daf579634271022
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Cette révision appartient à :
Satya Rama Aditya Pinapala
2020-05-28 19:44:06 -07:00
Parent 32e305e278
révision 50af1eb43b
9 fichiers modifiés avec 341 ajouts et 37 suppressions

Voir le fichier

@@ -1061,7 +1061,7 @@ static int dsi_panel_parse_misc_host_config(struct dsi_host_common_cfg *host,
struct dsi_parser_utils *utils,
const char *name)
{
u32 val = 0;
u32 val = 0, line_no = 0, window = 0;
int rc = 0;
bool panel_cphy_mode = false;
@@ -1094,6 +1094,22 @@ static int dsi_panel_parse_misc_host_config(struct dsi_host_common_cfg *host,
host->phy_type = panel_cphy_mode ? DSI_PHY_TYPE_CPHY
: DSI_PHY_TYPE_DPHY;
rc = utils->read_u32(utils->data, "qcom,mdss-dsi-dma-schedule-line",
&line_no);
if (rc)
host->dma_sched_line = 0;
else
host->dma_sched_line = line_no;
rc = utils->read_u32(utils->data, "qcom,mdss-dsi-dma-schedule-window",
&window);
if (rc)
host->dma_sched_window = 0;
else
host->dma_sched_window = window;
DSI_DEBUG("[%s] DMA scheduling parameters Line: %d Window: %d\n", name,
host->dma_sched_line, host->dma_sched_window);
return 0;
}
@@ -1354,7 +1370,6 @@ static int dsi_panel_parse_video_host_config(struct dsi_video_engine_cfg *cfg,
const char *traffic_mode;
u32 vc_id = 0;
u32 val = 0;
u32 line_no = 0;
rc = utils->read_u32(utils->data, "qcom,mdss-dsi-h-sync-pulse", &val);
if (rc) {
@@ -1417,17 +1432,6 @@ static int dsi_panel_parse_video_host_config(struct dsi_video_engine_cfg *cfg,
cfg->vc_id = vc_id;
}
rc = utils->read_u32(utils->data, "qcom,mdss-dsi-dma-schedule-line",
&line_no);
if (rc) {
DSI_DEBUG("[%s] set default dma scheduling line no\n", name);
cfg->dma_sched_line = 0x1;
/* do not fail since we have default value */
rc = 0;
} else {
cfg->dma_sched_line = line_no;
}
error:
return rc;
}
@@ -1679,7 +1683,7 @@ static int dsi_panel_create_cmd_packets(const char *data,
cmd[i].msg.type = data[0];
cmd[i].last_command = (data[1] == 1);
cmd[i].msg.channel = data[2];
cmd[i].msg.flags |= (data[3] == 1 ? MIPI_DSI_MSG_REQ_ACK : 0);
cmd[i].msg.flags |= data[3];
cmd[i].msg.ctrl = 0;
cmd[i].post_wait_ms = cmd[i].msg.wait_ms = data[4];
cmd[i].msg.tx_len = ((data[5] << 8) | (data[6]));