summaryrefslogtreecommitdiff
path: root/samsung/exynos_drm_dsim.c
diff options
context:
space:
mode:
authorJeremy DeHaan <jdehaan@google.com>2022-06-17 23:02:33 +0000
committerJeremy DeHaan <jdehaan@google.com>2022-12-13 19:21:54 +0000
commita89a64ba804d442fd399776521f2d868886b2afc (patch)
treeb386555f9c69c37c113057f702507973fb994b67 /samsung/exynos_drm_dsim.c
parent8a3e4aae11e1d1270a24fc7c7d7f1e16a6633fcb (diff)
downloaddisplay-a89a64ba804d442fd399776521f2d868886b2afc.tar.gz
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 <jdehaan@google.com> (cherry picked from commit 87e69d73367825b91bc7f4b8e468eaabca8a0436)
Diffstat (limited to 'samsung/exynos_drm_dsim.c')
-rw-r--r--samsung/exynos_drm_dsim.c10
1 files changed, 9 insertions, 1 deletions
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 <regs-dsim.h>
#include <trace/dpu_trace.h>
+#define CREATE_TRACE_POINTS
+#include <trace/panel_trace.h>
#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;
}