linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH v1 4/4] gpu: host1x: debug: Dump push buffer state
Date: Sun, 24 May 2020 20:51:00 +0300	[thread overview]
Message-ID: <20200524175100.9334-5-digetx@gmail.com> (raw)
In-Reply-To: <20200524175100.9334-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

When job hangs and there is a memory error pointing at channel's push
buffer, it is very handy to know the push buffer's state. This patch
makes the push buffer's state to be dumped into KMSG in addition to the
job's gathers.

Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/gpu/host1x/hw/debug_hw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
index 02125842071c..c25c3fe0a295 100644
--- a/drivers/gpu/host1x/hw/debug_hw.c
+++ b/drivers/gpu/host1x/hw/debug_hw.c
@@ -192,8 +192,14 @@ static void show_gather(struct output *o, phys_addr_t phys_addr,
 
 static void show_channel_gathers(struct output *o, struct host1x_cdma *cdma)
 {
+	struct push_buffer *pb = &cdma->push_buffer;
 	struct host1x_job *job;
 
+	host1x_debug_output(o, "Push Buffer at %08x, %d words\n",
+			    pb->dma, pb->size / 4);
+
+	show_gather(o, pb->dma, pb->size / 4, cdma, pb->dma, pb->mapped);
+
 	list_for_each_entry(job, &cdma->sync_queue, list) {
 		unsigned int i;
 
-- 
2.26.0

  parent reply	other threads:[~2020-05-24 17:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 17:50 [PATCH v1 0/4] Minor improvements for Host1x driver Dmitry Osipenko
     [not found] ` <20200524175100.9334-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-05-24 17:50   ` [PATCH v1 1/4] gpu: host1x: Optimize BOs usage when firewall is enabled Dmitry Osipenko
2020-05-24 17:50   ` [PATCH v1 2/4] gpu: host1x: Put gather's BO on pinning error Dmitry Osipenko
2020-05-24 17:50   ` [PATCH v1 3/4] gpu: host1x: debug: Fix multiple channels emitting messages simultaneously Dmitry Osipenko
2020-05-24 17:51   ` Dmitry Osipenko [this message]
     [not found]     ` <20200524175100.9334-5-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-05-28  0:53       ` [PATCH v1 4/4] gpu: host1x: debug: Dump push buffer state kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200524175100.9334-5-digetx@gmail.com \
    --to=digetx-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).