All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jocelyn Falempe <jfalempe@redhat.com>
Cc: bluescreen_avenger@verizon.net, Daniel Vetter <daniel@ffwll.ch>,
	javierm@redhat.com, mripard@kernel.org, gpiccoli@igalia.com,
	noralf@tronnes.org, dri-devel@lists.freedesktop.org,
	tzimmermann@suse.de, airlied@redhat.com
Subject: Re: [PATCH v7 2/9] drm/panic: Add a drm panic handler
Date: Thu, 18 Jan 2024 14:36:55 +0100	[thread overview]
Message-ID: <Zakpd3Q-OM-PlVGz@phenom.ffwll.local> (raw)
In-Reply-To: <31d0f162-421e-4b42-8b3f-bc3e6c852eb0@redhat.com>

On Tue, Jan 16, 2024 at 11:54:42AM +0100, Jocelyn Falempe wrote:
> On 12/01/2024 14:31, Daniel Vetter wrote:
> > You need to tie these nice kerneldocs into the overall documentation tree,
> > or they're not getting built. Please then also check that all the links
> > and formatting works correctly.
> 
> oh yes, I need to add it to the Documentation/drm/xx.rst.
> I'm not sure where drm panic fits there.
> If I move get_scanout_buffer() pointer to the drm_mode_config struct, adding
> drm_panic docs to drm-kms.rst makes sense ?

Yeah I think a section in the modeset docs (not the modeset helper docs,
this is fairly core concept imo) makes the most sense.

> > The locking here is busted. Which is why the atomic notifier chain is
> > special and uses atomic semantics - I would just avoid this issue and
> > directly register each drm_panic_device instead of trying to maintain a
> > drm-local list and getting the locking rules wrong.
> 
> It's a bit complex to get the drm_device pointer in the callback.
> I think I can add a "struct notifier_block" in the struct drm_mode_config,
> and use the container_of macro, to retrieve it.
> This also makes it easy to unregister.

Yeah if you register each drm_device separately you also need to embedded
the notifier chain into every single one. drm_mode_config sounds ok for
that to me.

I didn't realize that the kmsg_dumper api doesn't have some kind of void*
argument but you need to embed the notifier in the right place, in case
some of my other comments confused you.
-Sima

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2024-01-18 13:38 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04 16:00 [RFC][PATCH v7 0/9] drm/panic: Add a drm panic handler Jocelyn Falempe
2024-01-04 16:00 ` [PATCH v7 1/9] drm/format-helper: Add drm_fb_blit_from_r1 and drm_fb_fill Jocelyn Falempe
2024-01-17 15:06   ` Thomas Zimmermann
2024-01-17 16:40     ` Jocelyn Falempe
2024-01-19 10:58       ` Thomas Zimmermann
2024-01-19 12:25         ` Pekka Paalanen
2024-01-19 13:31           ` Thomas Zimmermann
2024-01-23 12:56         ` Thomas Zimmermann
2024-01-23 14:56           ` Jocelyn Falempe
2024-01-30 11:20             ` Thomas Zimmermann
2024-01-17 15:26   ` Jani Nikula
2024-01-17 16:43     ` Jocelyn Falempe
2024-01-04 16:00 ` [PATCH v7 2/9] drm/panic: Add a drm panic handler Jocelyn Falempe
2024-01-12 13:31   ` Daniel Vetter
2024-01-16 10:54     ` Jocelyn Falempe
2024-01-18 13:36       ` Daniel Vetter [this message]
2024-01-12 13:50   ` Daniel Vetter
2024-01-19 17:20     ` Jocelyn Falempe
2024-01-17 15:49   ` Thomas Zimmermann
2024-01-18 10:17     ` Jocelyn Falempe
2024-01-19  9:46       ` Thomas Zimmermann
2024-01-04 16:00 ` [PATCH v7 3/9] drm/plane: Add drm_for_each_primary_visible_plane macro Jocelyn Falempe
2024-01-08 10:24   ` Jocelyn Falempe
2024-01-08 10:30     ` Joe Perches
2024-01-04 16:00 ` [PATCH v7 4/9] drm/panic: Add drm_panic_is_format_supported() Jocelyn Falempe
2024-01-05  5:45   ` kernel test robot
2024-01-05  5:45     ` kernel test robot
2024-01-04 16:00 ` [PATCH v7 5/9] drm/fb_dma: Add generic get_scanout_buffer() for drm_panic Jocelyn Falempe
2024-01-06  2:54   ` kernel test robot
2024-01-06  2:54     ` kernel test robot
2024-01-08 10:20   ` Maxime Ripard
2024-01-12 12:29     ` Jocelyn Falempe
2024-01-12 13:41   ` Daniel Vetter
2024-01-12 13:56     ` Maxime Ripard
2024-01-18 13:38       ` Daniel Vetter
2024-01-26 12:39         ` Maxime Ripard
2024-01-17 14:28     ` Jocelyn Falempe
2024-01-18 13:51       ` Daniel Vetter
2024-01-04 16:00 ` [PATCH v7 6/9] drm/simpledrm: Add drm_panic support Jocelyn Falempe
2024-01-12 13:44   ` Daniel Vetter
2024-01-12 13:58     ` Maxime Ripard
2024-01-17 15:22       ` Thomas Zimmermann
2024-01-18 10:33         ` Maxime Ripard
2024-01-17 15:17   ` Thomas Zimmermann
2024-01-04 16:00 ` [PATCH v7 7/9] drm/mgag200: " Jocelyn Falempe
2024-01-17 15:15   ` Thomas Zimmermann
2024-01-04 16:00 ` [PATCH v7 8/9] drm/ast: " Jocelyn Falempe
2024-01-17 15:16   ` Thomas Zimmermann
2024-01-04 16:00 ` [PATCH v7 9/9] drm/imx: " Jocelyn Falempe
2024-01-12 14:00 ` [RFC][PATCH v7 0/9] drm/panic: Add a drm panic handler Daniel Vetter
2024-01-12 14:36   ` Jocelyn Falempe

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=Zakpd3Q-OM-PlVGz@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=bluescreen_avenger@verizon.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gpiccoli@igalia.com \
    --cc=javierm@redhat.com \
    --cc=jfalempe@redhat.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.