]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/panic: Add a QR code panic screen
authorJocelyn Falempe <jfalempe@redhat.com>
Thu, 22 Aug 2024 07:33:57 +0000 (09:33 +0200)
committerJocelyn Falempe <jfalempe@redhat.com>
Fri, 23 Aug 2024 14:55:35 +0000 (16:55 +0200)
commitcb5164ac43d0fc37ac6b45cabbc4d244068289ef
treee0bba38401b4345eca96fe74a56fe7868ccbdd02
parent8f4eca6ac52a72181b4f054d4ef6289a5d8cfa5d
drm/panic: Add a QR code panic screen

This patch adds a new panic screen, with a QR code and the kmsg data
embedded.
If DRM_PANIC_SCREEN_QR_CODE_URL is set, then the kmsg data will be
compressed with zlib and encoded as a numerical segment, and appended
to the URL as a URL parameter. This allows to save space, and put
about ~7500 bytes of kmsg data, in a V40 QR code.
Linux distributions can customize the URL, and put a web frontend to
directly open a bug report with the kmsg data.

Otherwise the kmsg data will be encoded as a binary segment (ie raw
ascii) and only a maximum of 2953 bytes of kmsg data will be
available in the QR code.

You can also limit the QR code size with DRM_PANIC_SCREEN_QR_VERSION.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240822073852.562286-5-jfalempe@redhat.com
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_crtc_internal.h
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_panic.c
drivers/gpu/drm/drm_panic_qr.rs [new file with mode: 0644]