<div dir="ltr"><div><div>Ok! Thanks!<br></div><br></div>I'll have a look into that and will report once I have news.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 31, 2017 at 10:04 AM, Russell King - ARM Linux <span dir="ltr"><<a href="mailto:linux@armlinux.org.uk" target="_blank">linux@armlinux.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Oct 31, 2017 at 09:11:37AM +0000, Luís Mendes wrote:<br>
> Hi,<br>
><br>
> Russel: I believe that the video corruption I saw with copyNToN(...)<br>
> function of xf86-video-armada is not the root cause of the problem, but<br>
> rather a side effect of the MMU faults.<br>
> Can you help me setup a debug environment where I can dump the client<br>
> process stack from the etnaviv kernel module upon a MMU fault? I have<br>
> enough space on my SSD drive to dump the memory images.<br>
<br>
</span>I haven't looked at the kernel etnaviv driver in detail for a while,<br>
but I added support for devcoredump to the driver, which dumps all<br>
buffers attached to the GPU. This is rigged up to recover_worker().<br>
<br>
When a MMU exception occurs, you'd need to call a worker to take<br>
gpu->lock, and then call etnaviv_core_dump() in the same way<br>
recover_worker() does.<br>
<br>
You'll need to clone and install<br>
<br>
git://<a href="http://git.armlinux.org.uk/~rmk/etna-gpu-tools.git/" rel="noreferrer" target="_blank">git.armlinux.org.uk/~<wbr>rmk/etna-gpu-tools.git/</a><br>
<br>
which contains the udev rules to detect when an etnaviv coredump<br>
happens, and automatically unpack it. It'll want the etna_viv<br>
source for some of the tools, and you'll need to edit the<br>
Makefile to point it to that (it currently uses /shared/etna_viv).<br>
<br>
The devcoredump files will be located (by default) in /var/crash,<br>
named etnaviv-$date.bin, and the unpacked versions in<br>
/tmp/etnaviv-$date.<br>
<br>
Located in the package are tools to diff between two command<br>
streams, detile etnaviv buffers, a replacement viv_info utility<br>
for the DRM etnaviv version, and some scripts to help hexdump<br>
the MMU and 3D GPU index buffers.<br>
<br>
What I've omitted from it is the perl script I use to parse the<br>
GPU command stream - I forget why, but probably because it was<br>
rather dirty, and accessed memory via /dev/mem. I also don't<br>
think it had the bits for the 2D GPU. I'll see if I can clean<br>
it up at some point and include it in the above git tree.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
RMK's Patch system: <a href="http://www.armlinux.org.uk/developer/patches/" rel="noreferrer" target="_blank">http://www.armlinux.org.uk/<wbr>developer/patches/</a><br>
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up<br>
According to <a href="http://speedtest.net" rel="noreferrer" target="_blank">speedtest.net</a>: 8.21Mbps down 510kbps up<br>
</font></span></blockquote></div><br></div>