Thread (6 messages) 6 messages, 3 authors, 2025-02-03

Re: [PATCH v5] drm/virtio: Add drm_panic support

From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Date: 2025-02-03 01:07:44
Also in: dri-devel, lkml

On 12/2/24 20:19, Jocelyn Falempe wrote:
quoted
quoted
I've now noticed that drm_gem_shmem_vmap() expects BO reservation lock
to be held and we can't take lock it at a panic time.

https://elixir.bootlin.com/linux/v6.12.1/source/drivers/gpu/drm/
drm_gem_shmem_helper.c#L330

This resv warning isn't triggered because bo->base.vaddr is set for VT
framebufffer BO when panic happens.
I usually test using gnome desktop in the VM, and in this case vaddr is
not set, and calling vmap() is needed. (and I don't get the warning, I
will check why).
All those get_pages() and vmap() that drm_gem_shmem_vmap() uses may
sleep. You'll need to add atomic variants for the vmap funcs if it's
really needed.

Like I said in the comment to v6, let's start with rejecting BOs that
aren't vmapped. If atomic vmap will become needed, it will be a separate
problem to solve.

-- 
Best regards,
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help