Commit c9ff2808 authored by Jocelyn Falempe's avatar Jocelyn Falempe
Browse files

drm/panic: Add support to scanout buffer as array of pages

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.

[1] https://lore.kernel.org/dri-devel/20250305152555.318159-1-ryasuoka@redhat.com/



Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarSimona Vetter <simona@ffwll.ch>
Signed-off-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250407140138.162383-3-jfalempe@redhat.com
parent 8702048b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment