[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250821095228.648156-1-jfalempe@redhat.com>
Date: Thu, 21 Aug 2025 11:49:04 +0200
From: Jocelyn Falempe <jfalempe@...hat.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
Jocelyn Falempe <jfalempe@...hat.com>,
Javier Martinez Canillas <javierm@...hat.com>,
linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org
Subject: [PATCH 0/3] drm/panic: Add kunit tests for drm_panic
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
Powered by blists - more mailing lists