From a89a64ba804d442fd399776521f2d868886b2afc Mon Sep 17 00:00:00 2001 From: Jeremy DeHaan Date: Fri, 17 Jun 2022 23:02:33 +0000 Subject: drm: samsung: add panel command tracing New tracing functions are added to capture DSI panel commands. Bug: 217775768 Change-Id: I492bcef41ac1236d6c00200e0c0dd9e2a73eb0ea Signed-off-by: Jeremy DeHaan (cherry picked from commit 87e69d73367825b91bc7f4b8e468eaabca8a0436) --- samsung/exynos_drm_dsim.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'samsung/exynos_drm_dsim.c') diff --git a/samsung/exynos_drm_dsim.c b/samsung/exynos_drm_dsim.c index 91b9f03..019e71e 100644 --- a/samsung/exynos_drm_dsim.c +++ b/samsung/exynos_drm_dsim.c @@ -56,6 +56,8 @@ #include #include +#define CREATE_TRACE_POINTS +#include #include "exynos_drm_connector.h" #include "exynos_drm_crtc.h" @@ -2033,6 +2035,7 @@ dsim_write_data(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) is_last = true; } + trace_dsi_tx(msg->type, msg->tx_buf, msg->tx_len, is_last); dsim_debug(dsim, "%s last command\n", is_last ? "" : "Not"); if (is_last) { @@ -2073,6 +2076,7 @@ dsim_write_data(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) } err: + trace_dsi_cmd_fifo_status(dsim->total_pend_ph, dsim->total_pend_pl); DPU_ATRACE_END(__func__); return ret; } @@ -2081,16 +2085,18 @@ static int dsim_req_read_command(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) { struct mipi_dsi_packet packet; + const u8 rx_len = msg->rx_len & 0xff; dsim_reg_clear_int(dsim->id, DSIM_INTSRC_SFR_PH_FIFO_EMPTY); reinit_completion(&dsim->ph_wr_comp); - + trace_dsi_tx(MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, &rx_len, 1, true); /* set the maximum packet size returned */ dsim_reg_wr_tx_header(dsim->id, MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, msg->rx_len, 0, false); /* read request */ mipi_dsi_create_packet(&packet, msg); + trace_dsi_tx(msg->type, msg->tx_buf, msg->tx_len, true); dsim_reg_wr_tx_header(dsim->id, packet.header[0], packet.header[1], packet.header[2], true); @@ -2103,6 +2109,7 @@ dsim_read_data(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) u32 rx_fifo, rx_size = 0; int i = 0, ret = 0; u8 *rx_buf = msg->rx_buf; + const u8 *tx_buf = msg->tx_buf; if (msg->rx_len > MAX_RX_FIFO) { dsim_err(dsim, "invalid rx len(%lu) max(%d)\n", msg->rx_len, @@ -2187,6 +2194,7 @@ dsim_read_data(struct dsim_device *dsim, const struct mipi_dsi_msg *msg) } while (!dsim_reg_rx_fifo_is_empty(dsim->id) && --retry_cnt); } + trace_dsi_rx(tx_buf[0], rx_buf, rx_size); return rx_size; } -- cgit v1.2.3