From 6236451d83a720072053855fa63d51934024a707 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 22 Mar 2013 16:34:04 +0200 Subject: gpu: host1x: Add debug support Add support for host1x debugging. Adds debugfs entries, and dumps channel state to UART in case of stuck job. Signed-off-by: Arto Merilainen Signed-off-by: Terje Bergstrom Reviewed-by: Thierry Reding Tested-by: Thierry Reding Tested-by: Erik Faye-Lund Signed-off-by: Thierry Reding --- drivers/gpu/host1x/cdma.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gpu/host1x/cdma.c') diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index 33935de91bb1..de72172d3b5f 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -439,6 +439,10 @@ void host1x_cdma_push(struct host1x_cdma *cdma, u32 op1, u32 op2) struct push_buffer *pb = &cdma->push_buffer; u32 slots_free = cdma->slots_free; + if (host1x_debug_trace_cmdbuf) + trace_host1x_cdma_push(dev_name(cdma_to_channel(cdma)->dev), + op1, op2); + if (slots_free == 0) { host1x_hw_cdma_flush(host1x, cdma); slots_free = host1x_cdma_wait_locked(cdma, -- cgit v1.2.3