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

Commit 988b1c6f authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: dsi: add api to control dsi active status



Add DSI api to control the connection status of the
DSI interface. This would be used in the VM usecase,
where the connection would be enabled/disabled during
device assign/unassign while switching to the VM.

Change-Id: Ifff41244824ade7a6b8dca77651d82fd5207f8e0
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 88acaa31
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -3736,6 +3736,8 @@ static int dsi_display_res_init(struct dsi_display *display)
		goto error_ctrl_put;
	}

	display->is_active = true;

	return 0;
error_ctrl_put:
	for (i = i - 1; i >= 0; i--) {
@@ -5385,6 +5387,16 @@ int dsi_display_get_active_displays(void **display_array, u32 max_display_count)
	return count;
}

void dsi_display_set_active_state(struct dsi_display *display, bool is_active)
{
	if (!display)
		return;

	mutex_lock(&display->display_lock);
	display->is_active = is_active;
	mutex_unlock(&display->display_lock);
}

int dsi_display_drm_bridge_init(struct dsi_display *display,
		struct drm_encoder *enc)
{
@@ -5924,7 +5936,7 @@ int dsi_display_get_info(struct drm_connector *connector,
	for (i = 0; i < info->num_of_h_tiles; i++)
		info->h_tile_instance[i] = display->ctrl[i].ctrl->cell_index;

	info->is_connected = true;
	info->is_connected = display->is_active;

	if (!strcmp(display->display_type, "primary"))
		info->display_type = SDE_CONNECTOR_PRIMARY;
+2 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ struct dsi_display_ext_bridge {
 * @queue_cmd_waits   Indicates if wait for dma commands done has to be queued.
 * @dma_cmd_workq:	Pointer to the workqueue of DMA command transfer done
 *				wait sequence.
 * @is_active:        status of the display
 */
struct dsi_display {
	struct platform_device *pdev;
@@ -278,6 +279,7 @@ struct dsi_display {

	/* panel id of the display */
	u64 panel_id;
	bool is_active;
};

int dsi_display_dev_probe(struct platform_device *pdev);