All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] drm: Add panic handling
@ 2016-08-09 17:45 Noralf Trønnes
  2016-08-09 17:45 ` [RFC 1/3] drm: Add a way to iterate over minors Noralf Trønnes
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Noralf Trønnes @ 2016-08-09 17:45 UTC (permalink / raw)
  To: dri-devel

This patchset proposes a way to get output of kernel messages on the
display during panic(). The responsibility of the driver is to provide
a framebuffer with a virtual mapping that the messages can be rendered
on. Only linear RGB is supported in this version.

David Herrmann, who has worked on this problem before[1], prefers to have
a dedicated renderer for the panic case, and a different one for other
uses like console. To try and keep the code simple, I just collect kernel
messages in a circular buffer until a panic situation occurs and then the
messages are rendered on all the framebuffers/devices it can find.
From this point on, all messages are rendered as they come in.

I have added a debugfs file that can trigger various "levels" of panic
handling to aid in testing the drivers. There's one test that is missing
which Daniel Vetter mentions on the DRMJanitors page:

    hardirq context could be achieved by using an ipi to the local processor.

I don't know how to actually do this.

I've come to the understanding that switching buffers can actually be very
tricky for a driver to achieve in atomic context like a panic situation.
And atomically vmapping the buffer being scanned out isn't possible.
Maybe it's possible to kmap_atomic() the pages and write to them individually?

I know that this is low priority for the drm maintainers, so please ignore
this if the timing isn't right and/or the solution is wrong.


Noralf.

[1] drmlog:
    https://lists.freedesktop.org/archives/dri-devel/2014-March/055136.html


Noralf Trønnes (3):
  drm: Add a way to iterate over minors
  drm: Add panic handling
  drm: simpledrm: Add panic handling

 drivers/gpu/drm/Makefile                  |   2 +-
 drivers/gpu/drm/drm_drv.c                 |  33 ++
 drivers/gpu/drm/drm_internal.h            |   4 +
 drivers/gpu/drm/drm_panic.c               | 606 ++++++++++++++++++++++++++++++
 drivers/gpu/drm/simpledrm/simpledrm_drv.c |  24 ++
 include/drm/drmP.h                        |  35 ++
 6 files changed, 703 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/drm_panic.c

--
2.8.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-08-24 10:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 17:45 [RFC 0/3] drm: Add panic handling Noralf Trønnes
2016-08-09 17:45 ` [RFC 1/3] drm: Add a way to iterate over minors Noralf Trønnes
2016-08-10  8:43   ` Daniel Vetter
2016-08-10 14:27     ` Noralf Trønnes
2016-08-10 14:34       ` Daniel Vetter
2016-08-24 10:53         ` David Herrmann
2016-08-09 17:45 ` [RFC 2/3] drm: Add panic handling Noralf Trønnes
2016-08-10  9:15   ` Daniel Vetter
2016-08-10  9:18     ` Daniel Vetter
2016-08-11 20:46     ` Noralf Trønnes
2016-08-12  8:31       ` Daniel Vetter
2016-08-09 17:45 ` [RFC 3/3] drm: simpledrm: " Noralf Trønnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.