gpu: host1x: debug: Fix multiple channels emitting messages simultaneously
authorDmitry Osipenko <digetx@gmail.com>
Mon, 29 Jun 2020 03:18:41 +0000 (06:18 +0300)
committerThierry Reding <treding@nvidia.com>
Fri, 17 Jul 2020 14:06:14 +0000 (16:06 +0200)
commit35681862808472a0a4b9a8817ae2789c0b5b3edc
tree0d864df6f6455eeb460cd4c65939fe5a0019545d
parentfd323e9ef0a19112c0c85b85afc4848c0518174b
gpu: host1x: debug: Fix multiple channels emitting messages simultaneously

Once channel's job is hung, it dumps the channel's state into KMSG before
tearing down the offending job. If multiple channels hang at once, then
they dump messages simultaneously, making the debug info unreadable, and
thus, useless. This patch adds mutex which allows only one channel to emit
debug messages at a time.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/debug.c