rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] drm/panic: Add a qr_code panic screen
@ 2024-07-03 15:33 Jocelyn Falempe
  2024-07-03 15:33 ` [PATCH 1/4] drm/panic: Add integer scaling to blit() Jocelyn Falempe
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Jocelyn Falempe @ 2024-07-03 15:33 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Daniel Vetter, Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho,
	Boqun Feng, Gary Guo, Bjorn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, linux-kernel, dri-devel,
	rust-for-linux, Danilo Krummrich
  Cc: Jocelyn Falempe

This series adds a new panic screen, with the kmsg data embedded in a QR-code.

The main advantage of QR-code, is that you can copy/paste the debug data to a bug report.

The QR-code encoder is written in rust, and is very specific to drm_panic.
The reason is that it is called in a panic handler, and thus can't allocate memory, or use locking.
The rust code uses a few rust core API, and provides only two C entry points.
There is no particular reason to do it in rust, I just wanted to learn rust, and see if it can work in the kernel.

If you want to see what it looks like, I've put a few screenshots here:
https://github.com/kdj0c/panic_report/issues/1

-- 

Jocelyn


Jocelyn Falempe (4):
  drm/panic: Add integer scaling to blit()
  drm/rect: add drm_rect_overlap()
  drm/panic: simplify logo handling
  drm/panic: Add a qr_code panic screen

 drivers/gpu/drm/Kconfig         |  29 +
 drivers/gpu/drm/Makefile        |   1 +
 drivers/gpu/drm/drm_drv.c       |   3 +
 drivers/gpu/drm/drm_panic.c     | 338 +++++++++--
 drivers/gpu/drm/drm_panic_qr.rs | 989 ++++++++++++++++++++++++++++++++
 include/drm/drm_panic.h         |   4 +
 include/drm/drm_rect.h          |  15 +
 7 files changed, 1340 insertions(+), 39 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_panic_qr.rs


base-commit: 3f5ea7ed705e8effe9cfabf912e769ccb6b7d389
-- 
2.45.2


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

end of thread, other threads:[~2024-07-04 11:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 15:33 [PATCH 0/4] drm/panic: Add a qr_code panic screen Jocelyn Falempe
2024-07-03 15:33 ` [PATCH 1/4] drm/panic: Add integer scaling to blit() Jocelyn Falempe
2024-07-03 15:33 ` [PATCH 2/4] drm/rect: add drm_rect_overlap() Jocelyn Falempe
2024-07-03 15:34 ` [PATCH 3/4] drm/panic: simplify logo handling Jocelyn Falempe
2024-07-03 15:34 ` [PATCH 4/4] drm/panic: Add a qr_code panic screen Jocelyn Falempe
2024-07-04  9:11   ` Alice Ryhl
2024-07-04  9:22     ` Greg KH
2024-07-04  9:37       ` Alice Ryhl
2024-07-04 11:37     ` Jocelyn Falempe
2024-07-04  5:03 ` [PATCH 0/4] " Greg KH
2024-07-04  8:27   ` Miguel Ojeda
2024-07-04  8:32   ` Jocelyn Falempe
2024-07-04  9:15   ` Alice Ryhl
2024-07-04  9:18 ` Alice Ryhl
2024-07-04  9:29   ` Jocelyn Falempe

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).