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

Commit d2b880f6 authored by Althaf Neelanchirayil's avatar Althaf Neelanchirayil Committed by Nirmal Abraham
Browse files

disp: msm: add inverted display brightness value property



In general the brightness value, the first parameter is low byte and
the second is high byte, but some DDIC invert, so add inverted display
brightness value property.

Change-Id: Ic635eb745709d756f093738348e471a544a2eeb1
Signed-off-by: default avatarAlthaf Neelanchirayil <aneelanc@codeaurora.org>
parent df61ff22
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -620,6 +620,9 @@ static int dsi_panel_update_backlight(struct dsi_panel *panel,

	dsi = &panel->mipi_device;

	if (panel->bl_config.bl_inverted_dbv)
		bl_lvl = (((bl_lvl & 0xff) << 8) | (bl_lvl >> 8));

	rc = mipi_dsi_dcs_set_display_brightness(dsi, bl_lvl);
	if (rc < 0)
		pr_err("failed to update dcs backlight:%d\n", bl_lvl);
@@ -2321,6 +2324,9 @@ static int dsi_panel_parse_bl_config(struct dsi_panel *panel)
		panel->bl_config.brightness_default_level = val;
	}

	panel->bl_config.bl_inverted_dbv = utils->read_bool(utils->data,
		"qcom,mdss-dsi-bl-inverted-dbv");

	if (panel->bl_config.type == DSI_BACKLIGHT_PWM) {
		rc = dsi_panel_parse_bl_pwm_config(panel);
		if (rc) {
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ struct dsi_backlight_config {
	u32 bl_level;
	u32 bl_scale;
	u32 bl_scale_ad;
	bool bl_inverted_dbv;

	int en_gpio;
	/* PWM params */