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>,
Ryosuke Yasuoka <ryasuoka@redhat.com>,
Javier Martinez Canillas <javierm@redhat.com>,
Wei Yang <richard.weiyang@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
John Ogness <john.ogness@linutronix.de>,
Thomas Gleixner <tglx@linutronix.de>,
linux-mm@kvack.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] drm/panic: Add support to scanout buffer as array of pages
Date: Thu, 10 Apr 2025 11:06:47 +0200 [thread overview]
Message-ID: <009a1a7b-594b-4709-b9bc-068b2e6aa922@redhat.com> (raw)
In-Reply-To: <20250407140138.162383-1-jfalempe@redhat.com>
On 07/04/2025 15:42, Jocelyn Falempe wrote:
> Some drivers like virtio-gpu, don't map the scanout buffer in the
> kernel. Calling vmap() in a panic handler is not safe, and writing an
> atomic_vmap() API is more complex than expected [1].
> So instead, pass the array of pages of the scanout buffer to the
> panic handler, and map only one page at a time to draw the pixels.
> This is obviously slow, but acceptable for a panic handler.
> As kmap_local_page() is not safe to call from a panic handler,
> introduce a kmap_local_page_try_from_panic() that will avoid unsafe
> operations.
I applied both patches to drm-misc/drm-misc-next.
Thanks for the reviews.
>
> [1] https://lore.kernel.org/dri-devel/20250305152555.318159-1-ryasuoka@redhat.com/
>
> v2:
> * Add kmap_local_page_try_from_panic() (Simona Vetter)
> * Correctly handle the case if kmap_local_page_try_from_panic()
> returns NULL
> * Check that the current page is not NULL before trying to map it.
> * Add a comment in struct drm_scanout_buffer, that the array of
> pages shouldn't be allocated in the get_scanout_buffer() callback.
>
> v3:
> * Replace DRM_WARN_ONCE with pr_debug_once (Simona Vetter)
> * Add a comment in kmap_local_page_try_from_panic() (Thomas Gleixner)
>
> Jocelyn Falempe (2):
> mm/kmap: Add kmap_local_page_try_from_panic()
> drm/panic: Add support to scanout buffer as array of pages
>
> drivers/gpu/drm/drm_panic.c | 142 +++++++++++++++++++++++++++++--
> include/drm/drm_panic.h | 12 ++-
> include/linux/highmem-internal.h | 13 +++
> 3 files changed, 160 insertions(+), 7 deletions(-)
>
>
> base-commit: fbe43810d563a293e3de301141d33caf1f5d5c5a
prev parent reply other threads:[~2025-04-10 9:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 13:42 Jocelyn Falempe
2025-04-07 13:42 ` [PATCH v3 1/2] mm/kmap: Add kmap_local_page_try_from_panic() Jocelyn Falempe
2025-04-07 13:42 ` [PATCH v3 2/2] drm/panic: Add support to scanout buffer as array of pages Jocelyn Falempe
2025-04-10 9:06 ` Jocelyn Falempe [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=009a1a7b-594b-4709-b9bc-068b2e6aa922@redhat.com \
--to=jfalempe@redhat.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=richard.weiyang@gmail.com \
--cc=ryasuoka@redhat.com \
--cc=simona@ffwll.ch \
--cc=tglx@linutronix.de \
--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