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

Commit c8953aae authored by Sachin Bhayare's avatar Sachin Bhayare Committed by Krishna Manikandan
Browse files

msm: mdss: fix higher power consumption in ambient mode for 8909w



MDP3 clocks are active when ULP state is requested from fb_pm_suspend.
This was resulting in higher power consumption in ambient mode.

Fix the issue by turning off MDP3 clocks in control off
call for ULP power state.

Change-Id: Ia2fffa25928aa07d838d6fb5432a765d9721eb5a
Signed-off-by: default avatarSachin Bhayare <sachin.bhayare@codeaurora.org>
parent 69ec08c1
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ static void mdp3_dispatch_clk_off(struct work_struct *work)
	if (session->vsync_enabled ||
		atomic_read(&session->vsync_countdown) > 0) {
		mutex_unlock(&session->lock);
		pr_debug("Ignoring clk shut down\n");
		pr_debug("%s: Ignoring clk shut down\n", __func__);
		return;
	}

@@ -1016,6 +1016,20 @@ static int mdp3_ctrl_off(struct msm_fb_data_type *mfd)
			mdp3_bufq_deinit(&mdp3_session->bufq_in);
		}
	}

	if (mdss_fb_is_power_on_ulp(mfd) &&
		(mfd->panel.type == MIPI_CMD_PANEL)) {
		pr_debug("%s: Disable MDP3 clocks in ULP\n", __func__);
		/*
		 * Handle ULP request initiated from fb_pm_suspend.
		 * For ULP panel power state disabling vsync and set
		 * vsync_count to zero and Turn off MDP3 clocks
		 */
		atomic_set(&mdp3_session->vsync_countdown, 0);
		mdp3_session->vsync_enabled = 0;
		mdp3_ctrl_vsync_enable(mdp3_session->mfd, 0);
		mdp3_ctrl_clk_enable(mdp3_session->mfd, 0);
	}
off_error:
	mutex_unlock(&mdp3_session->lock);
	/* Release the last reference to the runtime device */
+5 −0
Original line number Diff line number Diff line
@@ -421,6 +421,11 @@ static inline bool mdss_fb_is_power_on_lp(struct msm_fb_data_type *mfd)
	return mdss_panel_is_power_on_lp(mfd->panel_power_state);
}

static inline bool mdss_fb_is_power_on_ulp(struct msm_fb_data_type *mfd)
{
	return mdss_panel_is_power_on_ulp(mfd->panel_power_state);
}

static inline bool mdss_fb_is_hdmi_primary(struct msm_fb_data_type *mfd)
{
	return (mfd && (mfd->index == 0) &&