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

Commit 032774dd 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: send roi commands during resolution switch"

parents 41a1cd82 542de72b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2087,11 +2087,14 @@ int dsi_ctrl_set_roi(struct dsi_ctrl *dsi_ctrl, struct dsi_rect *roi,
	}

	mutex_lock(&dsi_ctrl->ctrl_lock);
	if (!dsi_rect_is_equal(&dsi_ctrl->roi, roi)) {
	if ((!dsi_rect_is_equal(&dsi_ctrl->roi, roi)) ||
			dsi_ctrl->modeupdated) {
		*changed = true;
		memcpy(&dsi_ctrl->roi, roi, sizeof(dsi_ctrl->roi));
		dsi_ctrl->modeupdated = false;
	} else
		*changed = false;

	mutex_unlock(&dsi_ctrl->ctrl_lock);
	return rc;
}
@@ -2647,6 +2650,7 @@ int dsi_ctrl_update_host_config(struct dsi_ctrl *ctrl,
	ctrl->mode_bounds.w = ctrl->host_config.video_timing.h_active;
	ctrl->mode_bounds.h = ctrl->host_config.video_timing.v_active;
	memcpy(&ctrl->roi, &ctrl->mode_bounds, sizeof(ctrl->mode_bounds));
	ctrl->modeupdated = true;
	ctrl->roi.x = 0;
error:
	mutex_unlock(&ctrl->ctrl_lock);
+2 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ struct dsi_ctrl_interrupts {
 *                          dsi controller and run only dsi controller.
 * @null_insertion_enabled:  A boolean property to allow dsi controller to
 *                           insert null packet.
 * @modeupdated:	  Boolean to send new roi if mode is updated.
 */
struct dsi_ctrl {
	struct platform_device *pdev;
@@ -258,6 +259,7 @@ struct dsi_ctrl {

	bool phy_isolation_enabled;
	bool null_insertion_enabled;
	bool modeupdated;
};

/**