From: Jocelyn Falempe <jfalempe@redhat.com>
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,
bluescreen_avenger@verizon.net, noralf@tronnes.org
Cc: gpiccoli@igalia.com, Jocelyn Falempe <jfalempe@redhat.com>
Subject: [PATCH v5 3/6] drm/simpledrm: Add drm_panic support
Date: Fri, 3 Nov 2023 15:53:27 +0100 [thread overview]
Message-ID: <20231103145526.628138-4-jfalempe@redhat.com> (raw)
In-Reply-To: <20231103145526.628138-1-jfalempe@redhat.com>
Add support for the drm_panic module, which displays a user-friendly
message to the screen when a kernel panic occurs.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
---
drivers/gpu/drm/tiny/simpledrm.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
index 8ea120eb8674..e5070b82703a 100644
--- a/drivers/gpu/drm/tiny/simpledrm.c
+++ b/drivers/gpu/drm/tiny/simpledrm.c
@@ -23,6 +23,7 @@
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_modeset_helper_vtables.h>
+#include <drm/drm_panic.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
@@ -842,6 +843,19 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
return sdev;
}
+static int simpledrm_get_scanout_buffer(struct drm_device *dev,
+ struct drm_scanout_buffer *sb)
+{
+ struct simpledrm_device *sdev = simpledrm_device_of_dev(dev);
+
+ sb->width = sdev->mode.hdisplay;
+ sb->height = sdev->mode.vdisplay;
+ sb->pitch = sdev->pitch;
+ sb->format = sdev->format;
+ sb->map = sdev->screen_base;
+ return 0;
+}
+
/*
* DRM driver
*/
@@ -857,6 +871,7 @@ static struct drm_driver simpledrm_driver = {
.minor = DRIVER_MINOR,
.driver_features = DRIVER_ATOMIC | DRIVER_GEM | DRIVER_MODESET,
.fops = &simpledrm_fops,
+ .get_scanout_buffer = simpledrm_get_scanout_buffer,
};
/*
--
2.41.0
next prev parent reply other threads:[~2023-11-03 14:55 UTC|newest]
Thread overview: 16+ 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-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 ` Jocelyn Falempe [this message]
2023-11-03 14:53 ` [PATCH v5 4/6] drm/mgag200: Add drm_panic support 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-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 ` [RFC][PATCH v5 0/6] drm/panic: Add a drm panic handler nerdopolis
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=20231103145526.628138-4-jfalempe@redhat.com \
--to=jfalempe@redhat.com \
--cc=airlied@redhat.com \
--cc=bluescreen_avenger@verizon.net \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gpiccoli@igalia.com \
--cc=javierm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox