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

Commit cc9f8d67 authored by Sandeep Panda's avatar Sandeep Panda
Browse files

msm: mdss: disable dsi timing db once fps is updated



In the current implementation, once dynamic fps update
kicks in, MDSS driver enables DSI timing db property.
But from chipsets like sdm660, DSI_CMD_OFFSET and
DSI_CMD_LENGTH register has become double buffered and
since timing db property was enabled as part of dynamic
fps update, DSI commands transfer for backlight update,
panel health check or panel off might fail if there is
no control flush. So disable DSI timing db property once
dynamic fps update sequence is complete.

Change-Id: I5158a36c9eea8f257ec81bab2f260e072fc22f29
Signed-off-by: default avatarSandeep Panda <spanda@codeaurora.org>
parent 9335a12b
Loading
Loading
Loading
Loading
+20 −0
Original line number Original line Diff line number Diff line
@@ -2507,6 +2507,23 @@ static struct device_node *mdss_dsi_get_fb_node_cb(struct platform_device *pdev)
	return fb_node;
	return fb_node;
}
}


static void mdss_dsi_timing_db_ctrl(struct mdss_dsi_ctrl_pdata *ctrl,
						int enable)
{
	if (!ctrl || !ctrl->timing_db_mode ||
		(ctrl->shared_data->hw_rev < MDSS_DSI_HW_REV_201))
		return;

	mdss_dsi_clk_ctrl(ctrl, ctrl->dsi_clk_handle,
		  MDSS_DSI_CORE_CLK, MDSS_DSI_CLK_ON);
	MIPI_OUTP((ctrl->ctrl_base + 0x1e8), enable);
	wmb(); /* ensure timing db is disabled */
	MIPI_OUTP((ctrl->ctrl_base + 0x1e4), enable);
	wmb(); /* ensure timing flush is disabled */
	mdss_dsi_clk_ctrl(ctrl, ctrl->dsi_clk_handle,
		  MDSS_DSI_CORE_CLK, MDSS_DSI_CLK_OFF);
}

static int mdss_dsi_event_handler(struct mdss_panel_data *pdata,
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata,
				  int event, void *arg)
				  int event, void *arg)
{
{
@@ -2680,6 +2697,9 @@ static int mdss_dsi_event_handler(struct mdss_panel_data *pdata,
					&ctrl_pdata->dba_work, HZ);
					&ctrl_pdata->dba_work, HZ);
		}
		}
		break;
		break;
	case MDSS_EVENT_DSI_TIMING_DB_CTRL:
		mdss_dsi_timing_db_ctrl(ctrl_pdata, (int)(unsigned long)arg);
		break;
	default:
	default:
		pr_debug("%s: unhandled event=%d\n", __func__, event);
		pr_debug("%s: unhandled event=%d\n", __func__, event);
		break;
		break;
+1 −0
Original line number Original line Diff line number Diff line
@@ -58,6 +58,7 @@
#define MDSS_DSI_HW_REV_104_1           0x10040001      /* 8996   */
#define MDSS_DSI_HW_REV_104_1           0x10040001      /* 8996   */
#define MDSS_DSI_HW_REV_104_2           0x10040002      /* 8937   */
#define MDSS_DSI_HW_REV_104_2           0x10040002      /* 8937   */
#define MDSS_DSI_HW_REV_200		0x20000000	/* cobalt */
#define MDSS_DSI_HW_REV_200		0x20000000	/* cobalt */
#define MDSS_DSI_HW_REV_201		0x20010000	/* 660 */


#define MDSS_DSI_HW_REV_STEP_0		0x0
#define MDSS_DSI_HW_REV_STEP_0		0x0
#define MDSS_DSI_HW_REV_STEP_1		0x1
#define MDSS_DSI_HW_REV_STEP_1		0x1
+6 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -1521,6 +1521,11 @@ exit_dfps:
					pr_err("Error in dfps_wait: %d\n", rc);
					pr_err("Error in dfps_wait: %d\n", rc);
			}
			}


			/* Disable interface timing double buffer */
			rc = mdss_mdp_ctl_intf_event(ctl,
				MDSS_EVENT_DSI_TIMING_DB_CTRL,
				(void *) (unsigned long) 0,
				CTL_INTF_EVENT_FLAG_DEFAULT);
		} else {
		} else {
			pr_err("intf %d panel, unknown FPS mode\n",
			pr_err("intf %d panel, unknown FPS mode\n",
							ctl->intf_num);
							ctl->intf_num);
+2 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2008-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -293,6 +293,7 @@ enum mdss_intf_events {
	MDSS_EVENT_DEEP_COLOR,
	MDSS_EVENT_DEEP_COLOR,
	MDSS_EVENT_DISABLE_PANEL,
	MDSS_EVENT_DISABLE_PANEL,
	MDSS_EVENT_UPDATE_PANEL_PPM,
	MDSS_EVENT_UPDATE_PANEL_PPM,
	MDSS_EVENT_DSI_TIMING_DB_CTRL,
	MDSS_EVENT_MAX,
	MDSS_EVENT_MAX,
};
};