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

Commit ef242b39 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: dsi: trigger broadcast commands using DMA start window"

parents 348e9b39 ae5b602b
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -1319,17 +1319,16 @@ static void dsi_configure_command_scheduling(struct dsi_ctrl *dsi_ctrl,
	}

	/*
	 * In case of command scheduling in command mode, the window size
	 * is reset to zero, if the total scheduling window is greater
	 * than the panel height.
	 * In case of command scheduling in command mode, set the maximum
	 * possible size of the DMA start window in case no schedule line and
	 * window size properties are defined by the panel.
	 */
	if ((dsi_ctrl->host_config.panel_mode == DSI_OP_CMD_MODE) &&
			dsi_hw_ops.configure_cmddma_window) {
		sched_line_no = line_no;

		if ((sched_line_no + window) > timing->v_active)
			window = 0;

		sched_line_no = (line_no == 0) ? TEARCHECK_WINDOW_SIZE :
					line_no;
		window = (window == 0) ? timing->v_active : window;
		sched_line_no += timing->v_active;

		dsi_hw_ops.configure_cmddma_window(&dsi_ctrl->hw, cmd_mem,
+3 −0
Original line number Diff line number Diff line
@@ -53,6 +53,9 @@
/* max size supported for dsi cmd transfer using TPG */
#define DSI_CTRL_MAX_CMD_FIFO_STORE_SIZE 64

/*Default tearcheck window size as programmed by MDP*/
#define TEARCHECK_WINDOW_SIZE	5

/**
 * enum dsi_power_state - defines power states for dsi controller.
 * @DSI_CTRL_POWER_VREG_OFF:    Digital and analog supplies for DSI controller
+0 −3
Original line number Diff line number Diff line
@@ -202,9 +202,6 @@ void dsi_ctrl_hw_22_configure_cmddma_window(struct dsi_ctrl_hw *ctrl,
{
	u32 reg = 0;

	if (!window)
		return;

	if (cmd->en_broadcast) {
		reg = DSI_R32(ctrl, DSI_TRIG_CTRL);
		if (cmd->is_master) {
+8 −4
Original line number Diff line number Diff line
@@ -995,7 +995,7 @@ static int dsi_display_cmd_rx(struct dsi_display *display,
	flags |= (DSI_CTRL_CMD_FETCH_MEMORY | DSI_CTRL_CMD_READ);
	if ((m_ctrl->ctrl->host_config.panel_mode == DSI_OP_VIDEO_MODE) ||
			((cmd->msg.flags & MIPI_DSI_MSG_CMD_DMA_SCHED) &&
			 (display->panel->panel_initialized)))
			 (display->enabled)))
		flags |= DSI_CTRL_CMD_CUSTOM_DMA_SCHED;

	rc = dsi_ctrl_cmd_transfer(m_ctrl->ctrl, &cmd->msg, &flags);
@@ -3084,8 +3084,12 @@ static int dsi_display_broadcast_cmd(struct dsi_display *display,
		m_flags |= DSI_CTRL_CMD_LAST_COMMAND;
	}

	if ((msg->flags & MIPI_DSI_MSG_CMD_DMA_SCHED) &&
				(display->panel->panel_initialized)) {
	/*
	 * During broadcast command dma scheduling is always recommended.
	 * As long as the display is enabled and TE is running the
	 * DSI_CTRL_CMD_CUSTOM_DMA_SCHED flag should be set.
	 */
	if (display->enabled) {
		flags |= DSI_CTRL_CMD_CUSTOM_DMA_SCHED;
		m_flags |= DSI_CTRL_CMD_CUSTOM_DMA_SCHED;
	}
@@ -3261,7 +3265,7 @@ static ssize_t dsi_host_transfer(struct mipi_dsi_host *host,
			cmd_flags |= DSI_CTRL_CMD_ASYNC_WAIT;

		if ((msg->flags & MIPI_DSI_MSG_CMD_DMA_SCHED) &&
				(display->panel->panel_initialized))
				(display->enabled))
			cmd_flags |= DSI_CTRL_CMD_CUSTOM_DMA_SCHED;

		rc = dsi_ctrl_cmd_transfer(display->ctrl[ctrl_idx].ctrl, msg,
+3 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ struct dsi_display_ext_bridge {
 *                    Set to false, otherwise.
 * @tx_cmd_buf_ndx:   Index to the DSI debugfs TX CMD buffer.
 * @cmd_set:	      Debugfs TX cmd set.
 * @enabled:	      Boolean to indicate display enabled.
 */
struct dsi_display {
	struct platform_device *pdev;
@@ -292,6 +293,8 @@ struct dsi_display {

	int tx_cmd_buf_ndx;
	struct dsi_panel_cmd_set cmd_set;

	bool enabled;
};

int dsi_display_dev_probe(struct platform_device *pdev);
Loading