From: Jocelyn Falempe <jfalempe@redhat.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Jocelyn Falempe <jfalempe@redhat.com>,
Javier Martinez Canillas <javierm@redhat.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 0/3] drm/panic: Add kunit tests for drm_panic
Date: Thu, 21 Aug 2025 11:49:04 +0200 [thread overview]
Message-ID: <20250821095228.648156-1-jfalempe@redhat.com> (raw)
This series adds some kunit tests to drm_panic.
This tests draws the panic screens to different framebuffer size and
format, and ensure it doesn't crash or draw outside of the buffer.
However it doesn't check the resulting image, because it depends on
other Kconfig options, like logo, fonts, or panic colors.
The last patch is optional and a bit hacky.
It allows to dump the generated images to the logs, and then a python
script can convert it to .png files. It makes it handy to check how
the panic screen will look on different resolutions, without having
to crash a VM.
To not pollute the logs, it uses a monochrome framebuffer, compress
it with zlib, and base64 encode it.
Jocelyn Falempe (3):
drm/panic: Rename draw_panic_static_* to draw_panic_screen_*
drm/panic: Add kunit tests for drm_panic
drm/panic: Add a kconfig option to dump kunits results to png
MAINTAINERS | 1 +
drivers/gpu/drm/Kconfig.debug | 14 ++
drivers/gpu/drm/drm_panic.c | 33 +--
drivers/gpu/drm/tests/drm_panic_test.c | 275 +++++++++++++++++++++++++
scripts/kunitpanic2png.py | 53 +++++
5 files changed, 361 insertions(+), 15 deletions(-)
create mode 100644 drivers/gpu/drm/tests/drm_panic_test.c
create mode 100755 scripts/kunitpanic2png.py
base-commit: 043d9c6928b010be7902a01b5cdfa7d754535b1a
--
2.50.1
next reply other threads:[~2025-08-21 9:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 9:49 Jocelyn Falempe [this message]
2025-08-21 9:49 ` [PATCH 1/3] drm/panic: Rename draw_panic_static_* to draw_panic_screen_* Jocelyn Falempe
2025-08-21 9:49 ` [PATCH 2/3] drm/panic: Add kunit tests for drm_panic Jocelyn Falempe
2025-08-27 9:44 ` Maxime Ripard
2025-09-01 12:59 ` Jocelyn Falempe
2025-08-21 9:49 ` [PATCH 3/3] drm/panic: Add a kconfig option to dump kunits results to png Jocelyn Falempe
2025-08-27 9:52 ` Maxime Ripard
2025-09-01 13:16 ` Jocelyn Falempe
2025-08-27 10:45 ` Thomas Zimmermann
2025-09-01 13:04 ` Jocelyn Falempe
2025-09-02 16:58 ` Maxime Ripard
2025-09-03 7:30 ` Jocelyn Falempe
2025-09-03 8:19 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250821095228.648156-1-jfalempe@redhat.com \
--to=jfalempe@redhat.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).