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

Commit f9f3ffeb authored by Dhaval Patel's avatar Dhaval Patel
Browse files

drm/msm: dump dsi debug bus busy signal



Dump dsi busy/idle status information when
client requests for debug bus information. This
allows to check if DSI is blocking frame trigger
on MDP hardware.

Change-Id: Ifc4287d2be179cae79a8ee02541b5740e455a51e
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent c5a2e5d2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
	ctrl->ops.phy_reset_config = dsi_ctrl_hw_cmn_phy_reset_config;
	ctrl->ops.setup_misr = dsi_ctrl_hw_cmn_setup_misr;
	ctrl->ops.collect_misr = dsi_ctrl_hw_cmn_collect_misr;
	ctrl->ops.debug_bus = dsi_ctrl_hw_cmn_debug_bus;

	switch (version) {
	case DSI_CTRL_VERSION_1_4:
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ int dsi_phy_hw_timing_val_v3_0(struct dsi_phy_per_lane_cfgs *timing_cfg,

/* DSI controller common ops */
u32 dsi_ctrl_hw_cmn_get_interrupt_status(struct dsi_ctrl_hw *ctrl);
void dsi_ctrl_hw_cmn_debug_bus(struct dsi_ctrl_hw *ctrl);
void dsi_ctrl_hw_cmn_clear_interrupt_status(struct dsi_ctrl_hw *ctrl, u32 ints);
void dsi_ctrl_hw_cmn_enable_status_interrupts(struct dsi_ctrl_hw *ctrl,
					     u32 ints);
+20 −0
Original line number Diff line number Diff line
@@ -1429,6 +1429,26 @@ static struct platform_driver dsi_ctrl_driver = {
	},
};

#if defined(CONFIG_DEBUG_FS)

void dsi_ctrl_debug_dump(void)
{
	struct list_head *pos, *tmp;
	struct dsi_ctrl *ctrl = NULL;

	mutex_lock(&dsi_ctrl_list_lock);
	list_for_each_safe(pos, tmp, &dsi_ctrl_list) {
		struct dsi_ctrl_list_item *n;

		n = list_entry(pos, struct dsi_ctrl_list_item, list);
		ctrl = n->ctrl;
		pr_err("dsi ctrl:%d\n", ctrl->cell_index);
		ctrl->hw.ops.debug_bus(&ctrl->hw);
	}
	mutex_unlock(&dsi_ctrl_list_lock);
}

#endif
/**
 * dsi_ctrl_get() - get a dsi_ctrl handle from an of_node
 * @of_node:    of_node of the DSI controller.
+6 −0
Original line number Diff line number Diff line
@@ -444,6 +444,12 @@ struct dsi_ctrl_hw_ops {
	 */
	void (*phy_sw_reset)(struct dsi_ctrl_hw *ctrl);

	/**
	 * debug_bus() - get dsi debug bus status.
	 * @ctrl:        Pointer to the controller host hardware.
	 */
	void (*debug_bus)(struct dsi_ctrl_hw *ctrl);

	/**
	 * soft_reset() - perform a soft reset on DSI controller
	 * @ctrl:          Pointer to the controller host hardware.
+12 −0
Original line number Diff line number Diff line
@@ -424,6 +424,18 @@ void dsi_ctrl_hw_cmn_video_engine_setup(struct dsi_ctrl_hw *ctrl,
	pr_debug("[DSI_%d] Video engine setup done\n", ctrl->index);
}

void dsi_ctrl_hw_cmn_debug_bus(struct dsi_ctrl_hw *ctrl)
{
	u32 reg = 0;

	DSI_W32(ctrl, DSI_DEBUG_BUS_CTL, 0x181);

	/* make sure that debug test point is enabled */
	wmb();
	reg = DSI_R32(ctrl, DSI_DEBUG_BUS_STATUS);

	pr_err("[DSI_%d] debug bus status:0x%x\n", ctrl->index, reg);
}
/**
 * cmd_engine_setup() - setup dsi host controller for command mode
 * @ctrl:          Pointer to the controller host hardware.
Loading