From: nerdopolis <bluescreen_avenger@verizon.net>
To: dri-devel@lists.freedesktop.org, tzimmermann@suse.de,
airlied@redhat.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, daniel@ffwll.ch, javierm@redhat.com,
noralf@tronnes.org, Jocelyn Falempe <jfalempe@redhat.com>
Cc: gpiccoli@igalia.com
Subject: Re: [RFC][PATCH v5 0/6] drm/panic: Add a drm panic handler
Date: Mon, 13 Nov 2023 08:59:11 -0500 [thread overview]
Message-ID: <12347304.O9o76ZdvQC@nerdopolis2> (raw)
In-Reply-To: <20231103145526.628138-1-jfalempe@redhat.com>
On Friday, November 3, 2023 10:53:24 AM EST Jocelyn Falempe wrote:
> This introduces a new drm panic handler, which displays a message when a panic occurs.
> So when fbcon is disabled, you can still see a kernel panic.
>
> This is one of the missing feature, when disabling VT/fbcon in the kernel:
> https://www.reddit.com/r/linux/comments/10eccv9/config_vtn_in_2023/
> Fbcon can be replaced by a userspace kms console, but the panic screen must be done in the kernel.
>
> This is a proof of concept, and works with simpledrm and mgag200, using a new get_scanout_buffer() api
>
> To test it, make sure you're using the simpledrm driver, and trigger a panic:
> echo c > /proc/sysrq-trigger
>
> v2:
> * Use get_scanout_buffer() instead of the drm client API. (Thomas Zimmermann)
> * Add the panic reason to the panic message (Nerdopolis)
> * Add an exclamation mark (Nerdopolis)
>
> v3:
> * Rework the drawing functions, to write the pixels line by line and
> to use the drm conversion helper to support other formats.
> (Thomas Zimmermann)
>
> v4:
> * Fully support all simpledrm formats using drm conversion helpers
> * Rename dpanic_* to drm_panic_*, and have more coherent function name.
> (Thomas Zimmermann)
> * Use drm_fb_r1_to_32bit for fonts (Thomas Zimmermann)
> * Remove the default y to DRM_PANIC config option (Thomas Zimmermann)
> * Add foreground/background color config option
> * Fix the bottom lines not painted if the framebuffer height
> is not a multiple of the font height.
> * Automatically register the driver to drm_panic, if the function
> get_scanout_buffer() exists. (Thomas Zimmermann)
> * Add mgag200 support.
>
> v5:
> * Change the drawing API, use drm_fb_blit_from_r1() to draw the font.
> (Thomas Zimmermann)
> * Also add drm_fb_fill() to fill area with background color.
> * Add draw_pixel_xy() API for drivers that can't provide a linear buffer.
> * Add a flush() callback for drivers that needs to synchronize the buffer.
> * Add a void *private field, so drivers can pass private data to
> draw_pixel_xy() and flush().
> * Add ast support.
> * Add experimental imx/ipuv3 support, to test on an ARM hw. (Maxime Ripard)
>
>
> With mgag200 support, I was able to test that the xrgb8888 to rgb565 conversion is working.
>
I am unable to test with that hardware, but I am able to test with simpledrm, and it works pretty good
> IMX/IPUV3 support is not complete, I wasn't able to have etnaviv working on my board.
> But it shows that it can still work on ARM with DMA buffer in this case.
>
> Best regards,
>
>
> Jocelyn Falempe (6):
> drm/format-helper: Add drm_fb_blit_from_r1 and drm_fb_fill
> drm/panic: Add a drm panic handler
> drm/simpledrm: Add drm_panic support
> drm/mgag200: Add drm_panic support
> drm/ast: Add drm_panic support
> drm/imx: Add drm_panic support
>
> drivers/gpu/drm/Kconfig | 22 ++
> drivers/gpu/drm/Makefile | 1 +
> drivers/gpu/drm/ast/ast_drv.c | 4 +-
> drivers/gpu/drm/ast/ast_drv.h | 3 +
> drivers/gpu/drm/ast/ast_mode.c | 26 ++
> drivers/gpu/drm/drm_drv.c | 8 +
> drivers/gpu/drm/drm_format_helper.c | 421 ++++++++++++++++++-----
> drivers/gpu/drm/drm_panic.c | 368 ++++++++++++++++++++
> drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 30 ++
> drivers/gpu/drm/mgag200/mgag200_drv.c | 25 ++
> drivers/gpu/drm/tiny/simpledrm.c | 15 +
> include/drm/drm_drv.h | 21 ++
> include/drm/drm_format_helper.h | 9 +
> include/drm/drm_panic.h | 96 ++++++
> 14 files changed, 966 insertions(+), 83 deletions(-)
> create mode 100644 drivers/gpu/drm/drm_panic.c
> create mode 100644 include/drm/drm_panic.h
>
>
> base-commit: ffc253263a1375a65fa6c9f62a893e9767fbebfa
>
prev parent reply other threads:[~2023-11-13 13:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 14:53 [RFC][PATCH v5 0/6] drm/panic: Add a drm panic handler Jocelyn Falempe
2023-11-03 14:53 ` [PATCH v5 1/6] drm/format-helper: Add drm_fb_blit_from_r1 and drm_fb_fill Jocelyn Falempe
2023-11-03 18:34 ` kernel test robot
2023-11-03 18:34 ` kernel test robot
2023-11-04 6:04 ` kernel test robot
2023-11-04 6:04 ` kernel test robot
2023-11-03 14:53 ` [PATCH v5 2/6] drm/panic: Add a drm panic handler Jocelyn Falempe
2023-11-03 14:53 ` [PATCH v5 3/6] drm/simpledrm: Add drm_panic support Jocelyn Falempe
2023-11-03 14:53 ` [PATCH v5 4/6] drm/mgag200: " Jocelyn Falempe
2023-11-03 14:53 ` [PATCH v5 5/6] drm/ast: " Jocelyn Falempe
2023-11-03 18:52 ` kernel test robot
2023-11-03 18:52 ` kernel test robot
2023-11-04 3:57 ` kernel test robot
2023-11-04 3:57 ` kernel test robot
2023-11-03 14:53 ` [PATCH v5 6/6] drm/imx: " Jocelyn Falempe
2023-12-14 13:48 ` Maxime Ripard
2023-12-14 14:36 ` Maxime Ripard
2023-12-14 15:03 ` Jocelyn Falempe
2023-12-14 18:37 ` Maxime Ripard
2023-11-13 13:59 ` nerdopolis [this message]
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=12347304.O9o76ZdvQC@nerdopolis2 \
--to=bluescreen_avenger@verizon.net \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gpiccoli@igalia.com \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=noralf@tronnes.org \
--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 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.