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

Commit 47e18aa8 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 6a0f0b0f on remote branch

Change-Id: I78e3282e9507ad8b9e70e989088d805e512dcafe
parents 61d26c62 6a0f0b0f
Loading
Loading
Loading
Loading
+60 −0
Original line number Diff line number Diff line
@@ -2455,6 +2455,63 @@ void dsi_display_enable_event(struct drm_connector *connector,
	}
}

int dsi_display_ctrl_vreg_on(struct dsi_display *display)
{
	int rc = 0;
	int i;
	struct dsi_display_ctrl *ctrl;
	struct dsi_ctrl *dsi_ctrl;

	display_for_each_ctrl(i, display) {
		ctrl = &display->ctrl[i];
		if (!ctrl->ctrl)
			continue;

		dsi_ctrl = ctrl->ctrl;
		if (dsi_ctrl->current_state.host_initialized) {
			rc = dsi_pwr_enable_regulator(
					&dsi_ctrl->pwr_info.host_pwr, true);
			if (rc) {
				DSI_ERR("[%s] Failed to enable vreg, rc=%d\n",
				       dsi_ctrl->name, rc);
				goto error;
			}
			DSI_DEBUG("[%s] Enable ctrl vreg\n", dsi_ctrl->name);
		}
	}
error:
	return rc;
}

int dsi_display_ctrl_vreg_off(struct dsi_display *display)
{
	int rc = 0;
	int i;
	struct dsi_display_ctrl *ctrl;
	struct dsi_ctrl *dsi_ctrl;

	display_for_each_ctrl(i, display) {
		ctrl = &display->ctrl[i];
		if (!ctrl->ctrl)
			continue;

		dsi_ctrl = ctrl->ctrl;
		if (dsi_ctrl->current_state.host_initialized) {
			rc = dsi_pwr_enable_regulator(
				&dsi_ctrl->pwr_info.host_pwr, false);
			if (rc) {
				DSI_ERR("[%s] Failed to disable vreg, rc=%d\n",
				       dsi_ctrl->name, rc);
				goto error;
			}
			DSI_DEBUG("[%s] Disable ctrl vreg\n", dsi_ctrl->name);
		}
	}
error:
	return rc;
}


static int dsi_display_ctrl_power_on(struct dsi_display *display)
{
	int rc = 0;
@@ -4204,6 +4261,9 @@ static int dsi_display_parse_dt(struct dsi_display *display)
	display->needs_clk_src_reset = of_property_read_bool(of_node,
				"qcom,needs-clk-src-reset");

	display->needs_ctrl_vreg_disable = of_property_read_bool(of_node,
				"qcom,needs-ctrl-vreg-disable");

	/* Parse all external bridges from port 0 */
	display_for_each_ctrl(i, display) {
		display->ext_bridge[i].node_of =
+18 −0
Original line number Diff line number Diff line
@@ -215,6 +215,7 @@ struct dsi_display {
	bool is_te_irq_enabled;
	struct completion esd_te_gate;
	bool needs_clk_src_reset;
	bool needs_ctrl_vreg_disable;

	u32 ctrl_count;
	struct dsi_display_ctrl ctrl[MAX_DSI_CTRLS_PER_DISPLAY];
@@ -817,4 +818,21 @@ int dsi_display_unset_clk_src(struct dsi_display *display);
 * Return: Zero on Success
 */
int dsi_display_set_clk_src(struct dsi_display *display);

/**
 * dsi_display_ctrl_vreg_on() - enable dsi ctrl regulator
 * @display:         Handle to display
 *
 * Return: Zero on Success
 */
int dsi_display_ctrl_vreg_on(struct dsi_display *display);

/**
 * dsi_display_ctrl_vreg_off() - disable dsi ctrl regulator
 * @display:         Handle to display
 *
 * Return: Zero on Success
 */
int dsi_display_ctrl_vreg_off(struct dsi_display *display);

#endif /* _DSI_DISPLAY_H_ */
+4 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ static int dsi_panel_power_off(struct dsi_panel *panel)
{
	int rc = 0;

	if (panel->is_twm_en) {
	if (panel->is_twm_en || panel->skip_panel_off) {
		DSI_DEBUG("TWM Enabled, skip panel power off\n");
		return rc;
	}
@@ -2085,6 +2085,9 @@ static int dsi_panel_parse_misc_features(struct dsi_panel *panel)
	panel->reset_gpio_always_on = utils->read_bool(utils->data,
			"qcom,platform-reset-gpio-always-on");

	panel->skip_panel_off = utils->read_bool(utils->data,
			"qcom,skip-panel-power-off");

	panel->spr_info.enable = false;
	panel->spr_info.pack_type = MSM_DISPLAY_SPR_TYPE_MAX;

+1 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ struct dsi_panel {
	atomic_t esd_recovery_pending;

	bool is_twm_en;
	bool skip_panel_off;
	bool panel_initialized;
	bool te_using_watchdog_timer;
	struct dsi_qsync_capabilities qsync_caps;
+4 −1
Original line number Diff line number Diff line
@@ -141,7 +141,10 @@ void sde_encoder_uidle_enable(struct drm_encoder *drm_enc, bool enable)
	for (i = 0; i < sde_enc->num_phys_encs; i++) {
		struct sde_encoder_phys *phys = sde_enc->phys_encs[i];

		if (phys && phys->hw_ctl && phys->hw_ctl->ops.uidle_enable) {
		if (phys && phys->hw_ctl && phys->hw_ctl->ops.uidle_enable &&
				phys->split_role != ENC_ROLE_SLAVE) {
			if (enable)
				SDE_EVT32(DRMID(drm_enc), enable);
			phys->hw_ctl->ops.uidle_enable(phys->hw_ctl, enable);
		}
	}
Loading