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

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

Merge "drm/msm/dsi-staging: fix backlight update and dsi off race condition"

parents e1b8a904 bbe7fa4d
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -89,8 +89,11 @@ int dsi_display_set_backlight(void *display, u32 bl_lvl)


	panel = dsi_display->panel;
	panel = dsi_display->panel;


	if (!dsi_panel_initialized(panel))
	mutex_lock(&panel->panel_lock);
		return -EINVAL;
	if (!dsi_panel_initialized(panel)) {
		rc = -EINVAL;
		goto error;
	}


	panel->bl_config.bl_level = bl_lvl;
	panel->bl_config.bl_level = bl_lvl;


@@ -125,6 +128,7 @@ int dsi_display_set_backlight(void *display, u32 bl_lvl)
	}
	}


error:
error:
	mutex_unlock(&panel->panel_lock);
	return rc;
	return rc;
}
}


+1 −4
Original line number Original line Diff line number Diff line
@@ -614,13 +614,10 @@ static int dsi_panel_update_backlight(struct dsi_panel *panel,


	dsi = &panel->mipi_device;
	dsi = &panel->mipi_device;


	mutex_lock(&panel->panel_lock);

	rc = mipi_dsi_dcs_set_display_brightness(dsi, bl_lvl);
	rc = mipi_dsi_dcs_set_display_brightness(dsi, bl_lvl);
	if (rc < 0)
	if (rc < 0)
		pr_err("failed to update dcs backlight:%d\n", bl_lvl);
		pr_err("failed to update dcs backlight:%d\n", bl_lvl);


	mutex_unlock(&panel->panel_lock);
	return rc;
	return rc;
}
}


@@ -638,7 +635,7 @@ int dsi_panel_set_backlight(struct dsi_panel *panel, u32 bl_lvl)
		led_trigger_event(bl->wled, bl_lvl);
		led_trigger_event(bl->wled, bl_lvl);
		break;
		break;
	case DSI_BACKLIGHT_DCS:
	case DSI_BACKLIGHT_DCS:
		dsi_panel_update_backlight(panel, bl_lvl);
		rc = dsi_panel_update_backlight(panel, bl_lvl);
		break;
		break;
	default:
	default:
		pr_err("Backlight type(%d) not supported\n", bl->type);
		pr_err("Backlight type(%d) not supported\n", bl->type);
+3 −2
Original line number Original line Diff line number Diff line
@@ -68,6 +68,7 @@ static int sde_backlight_device_update_status(struct backlight_device *bd)
	struct sde_connector *c_conn;
	struct sde_connector *c_conn;
	int bl_lvl;
	int bl_lvl;
	struct drm_event event;
	struct drm_event event;
	int rc = 0;


	brightness = bd->props.brightness;
	brightness = bd->props.brightness;


@@ -93,10 +94,10 @@ static int sde_backlight_device_update_status(struct backlight_device *bd)
		event.length = sizeof(u32);
		event.length = sizeof(u32);
		msm_mode_object_event_notify(&c_conn->base.base,
		msm_mode_object_event_notify(&c_conn->base.base,
				c_conn->base.dev, &event, (u8 *)&brightness);
				c_conn->base.dev, &event, (u8 *)&brightness);
		c_conn->ops.set_backlight(c_conn->display, bl_lvl);
		rc = c_conn->ops.set_backlight(c_conn->display, bl_lvl);
	}
	}


	return 0;
	return rc;
}
}


static int sde_backlight_device_get_brightness(struct backlight_device *bd)
static int sde_backlight_device_get_brightness(struct backlight_device *bd)