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

Commit 534e3f6f authored by Ingrid Gallardo's avatar Ingrid Gallardo
Browse files

msm: mdss: add support for Early Clock Gating



Add support to gate the mdp clocks as soon as the
frame transfer is done for command mode panels.

Change-Id: I8325f26806ff3163edd87b9e3c01cd045f2aec77
Signed-off-by: default avatarIngrid Gallardo <ingridg@codeaurora.org>
parent 2fbb7685
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -335,6 +335,7 @@ struct mdss_data_type {
	u32 *clock_levels;
	u32 nclk_lvl;

	u32 enable_gate;
	u32 enable_bw_release;
	u32 enable_rotator_bw_release;
	u32 serialize_wait4pp;
+2 −0
Original line number Diff line number Diff line
@@ -2877,6 +2877,8 @@ int mdss_fb_atomic_commit(struct fb_info *info,
			__ioctl_transition_dyn_mode_state(mfd,
				MSMFB_ATOMIC_COMMIT, 1);
			ret = mfd->mdp.atomic_validate(mfd, file, commit_v1);
			if (!ret)
				mfd->validate_pending = true;
		}
		goto end;
	} else {
+2 −0
Original line number Diff line number Diff line
@@ -258,6 +258,8 @@ struct msm_fb_data_type {
	int idle_time;
	struct delayed_work idle_notify_work;

	bool validate_pending;

	int op_enable;
	u32 fb_imgType;
	int panel_reconfig;
+5 −2
Original line number Diff line number Diff line
@@ -872,8 +872,9 @@ void mdss_mdp_clk_ctrl(int enable)
	if (changed)
		MDSS_XLOG(mdp_clk_cnt, enable, current->pid);

	pr_debug("%s: clk_cnt=%d changed=%d enable=%d\n",
			__func__, mdp_clk_cnt, changed, enable);
	pr_debug("%pS: clk_cnt=%d changed=%d enable=%d\n",
			__builtin_return_address(0), mdp_clk_cnt,
			changed, enable);

	if (changed) {
		if (enable) {
@@ -1106,6 +1107,8 @@ static void mdss_mdp_hw_rev_caps_init(struct mdss_data_type *mdata)
	mdata->hflip_buffer_reused = true;
	/* prevent disable of prefill calculations */
	mdata->min_prefill_lines = 0xffff;
	/* clock gating feature is disabled by default */
	mdata->enable_gate = true;

	switch (mdata->mdp_rev) {
	case MDSS_MDP_HW_REV_107:
+1 −0
Original line number Diff line number Diff line
@@ -599,6 +599,7 @@ struct mdss_overlay_private {
	struct list_head pipes_cleanup;
	struct list_head rot_proc_list;
	bool mixer_swap;
	u32 resources_state;

	/* list of buffers that can be reused */
	struct list_head bufs_chunks;
Loading