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

Commit f48238a0 authored by Terence Hampson's avatar Terence Hampson
Browse files

msm: mdss: Mode switch panel clk ctrl uses dsi clk handle



As of commit be2f6d25 ("msm: mdss: dsi: create dsi clock manager")
dsi clock management was split into two clients: mdp and dsi. Cmd mode
interface uses the mdp client handle and everything else using dsi
client handle. When transitioning from one dsi mode to another, clocks
need to be rebalanced. In order to rebalance properly, mode switch is
required to vote using the dsi client handle. Modified input argument to
MDSS_EVENT_PANEL_CLK_CTRL to allow for client handle selection.

Change-Id: Id54d72de603e2115451a49fed961d01f4440c517
Signed-off-by: default avatarTerence Hampson <thampson@codeaurora.org>
parent 90c540cd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -185,7 +185,8 @@ static int dsi_event_handler(struct mdss_panel_data *pdata,
		rc = dsi_splash_on(pdata);
		break;
	case MDSS_EVENT_PANEL_CLK_CTRL:
		rc = dsi_clk_ctrl(pdata, (int)arg);
		rc = dsi_clk_ctrl(pdata,
			(int)(((struct dsi_panel_clk_ctrl *)arg)->state));
		break;
	case MDSS_EVENT_DSI_UPDATE_PANEL_DATA:
		rc = dsi_update_pconfig(pdata, (int)(unsigned long) arg);
+5 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 *
 * 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
@@ -346,6 +346,7 @@ static int mdp3_ctrl_clk_enable(struct msm_fb_data_type *mfd, int enable)
{
	struct mdp3_session_data *session;
	struct mdss_panel_data *panel;
	struct dsi_panel_clk_ctrl clk_ctrl;
	int rc = 0;

	pr_debug("mdp3_ctrl_clk_enable %d\n", enable);
@@ -358,8 +359,10 @@ static int mdp3_ctrl_clk_enable(struct msm_fb_data_type *mfd, int enable)

	if ((enable && session->clk_on == 0) ||
				(!enable && session->clk_on == 1)) {
		clk_ctrl.client = DSI_CLK_REQ_MDP_CLIENT;
		clk_ctrl.state = enable;
		rc = panel->event_handler(panel,
			MDSS_EVENT_PANEL_CLK_CTRL, (void *)enable);
			MDSS_EVENT_PANEL_CLK_CTRL, (void *)&clk_ctrl);
		rc |= mdp3_res_update(enable, 1, MDP3_CLIENT_DMA_P);
	} else {
		pr_debug("enable = %d, clk_on=%d\n", enable, session->clk_on);
+2 −1
Original line number Diff line number Diff line
@@ -2060,7 +2060,8 @@ static int mdss_dsi_event_handler(struct mdss_panel_data *pdata,
		rc = mdss_dsi_cont_splash_on(pdata);
		break;
	case MDSS_EVENT_PANEL_CLK_CTRL:
		mdss_dsi_clk_req(ctrl_pdata, (int) (unsigned long) arg);
		mdss_dsi_clk_req(ctrl_pdata,
			(struct dsi_panel_clk_ctrl *) arg);
		break;
	case MDSS_EVENT_DSI_CMDLIST_KOFF:
		mdss_dsi_cmdlist_commit(ctrl_pdata, 1);
+1 −1
Original line number Diff line number Diff line
@@ -520,7 +520,7 @@ void mdss_dsi_ack_err_status(struct mdss_dsi_ctrl_pdata *ctrl);
int mdss_dsi_clk_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, void *clk_handle,
	enum mdss_dsi_clk_type clk_type, enum mdss_dsi_clk_state clk_state);
void mdss_dsi_clk_req(struct mdss_dsi_ctrl_pdata *ctrl,
				int enable);
	struct dsi_panel_clk_ctrl *clk_ctrl);
void mdss_dsi_controller_cfg(int enable,
				struct mdss_panel_data *pdata);
void mdss_dsi_sw_reset(struct mdss_dsi_ctrl_pdata *ctrl_pdata, bool restore);
+10 −0
Original line number Diff line number Diff line
@@ -27,6 +27,11 @@ enum mdss_dsi_clk_state {
	MDSS_DSI_CLK_EARLY_GATE,
};

enum dsi_clk_req_client {
	DSI_CLK_REQ_MDP_CLIENT = 0,
	DSI_CLK_REQ_DSI_CLIENT,
};

enum mdss_dsi_link_clk_type {
	MDSS_DSI_LINK_ESC_CLK,
	MDSS_DSI_LINK_BYTE_CLK,
@@ -102,6 +107,11 @@ struct mdss_dsi_link_clk_info {
	struct clk *pixel_clk;
};

struct dsi_panel_clk_ctrl {
	enum mdss_dsi_clk_state state;
	enum dsi_clk_req_client client;
};

/**
 * struct mdss_dsi_clk_info - clock information to initialize manager
 * @name: name for the clocks to identify debug logs.
Loading