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

Commit 83a1f7ab authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: add support to control dcs brightness with HS state"

parents d6684499 0c1acb02
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -195,6 +195,10 @@ Optional properties:
					"bl_ctrl_wled" = Backlight controlled by WLED.
					"bl_ctrl_dcs" = Backlight controlled by DCS commands.
					other: Unknown backlight control. (default)
- qcom,mdss-dsi-bl-dcs-command-state:	A string that specifies the ctrl state for sending brightness
					controlling commands, this is only available when backlight is controlled by DCS commands.
					"dsi_lp_mode" = DSI low power mode (default).
					"dsi_hs_mode" = DSI high speed mode.
- qcom,mdss-dsi-bl-pwm-pmi:		Boolean to indicate that PWM control is through second pmic chip.
- qcom,mdss-dsi-bl-pmic-bank-select:	LPG channel for backlight.
					Required if blpmiccontroltype is PWM
+1 −0
Original line number Diff line number Diff line
@@ -436,6 +436,7 @@ struct mdss_dsi_ctrl_pdata {
	int mode_gpio;
	int intf_mux_gpio;
	int bklt_ctrl;	/* backlight ctrl */
	enum dsi_ctrl_op_mode bklt_dcs_op_mode; /* backlight dcs ctrl mode */
	bool pwm_pmi;
	int pwm_period;
	int pwm_pmic_gpio;
+12 −0
Original line number Diff line number Diff line
@@ -240,6 +240,11 @@ static void mdss_dsi_panel_bklt_dcs(struct mdss_dsi_ctrl_pdata *ctrl, int level)
	cmdreq.rlen = 0;
	cmdreq.cb = NULL;

	if (ctrl->bklt_dcs_op_mode == DSI_HS_MODE)
		cmdreq.flags |= CMD_REQ_HS_MODE;
	else
		cmdreq.flags |= CMD_REQ_LP_MODE;

	mdss_dsi_cmdlist_put(ctrl, &cmdreq);
}

@@ -2282,6 +2287,13 @@ int mdss_panel_parse_bl_settings(struct device_node *np,
			}
		} else if (!strcmp(data, "bl_ctrl_dcs")) {
			ctrl_pdata->bklt_ctrl = BL_DCS_CMD;
			data = of_get_property(np,
				"qcom,mdss-dsi-bl-dcs-command-state", NULL);
			if (data && !strcmp(data, "dsi_hs_mode"))
				ctrl_pdata->bklt_dcs_op_mode = DSI_HS_MODE;
			else
				ctrl_pdata->bklt_dcs_op_mode = DSI_LP_MODE;

			pr_debug("%s: Configured DCS_CMD bklt ctrl\n",
								__func__);
		}