mbox series

[v4,0/3] drm: Fix dma_resv deadlock at drm object pin time

Message ID 20240523113236.432585-1-adrian.larumbe@collabora.com (mailing list archive)
Headers show
Series drm: Fix dma_resv deadlock at drm object pin time | expand

Message

Adrián Larumbe May 23, 2024, 11:32 a.m. UTC
This is v4 of https://lore.kernel.org/lkml/20240521181817.097af5e1@collabora.com/T/

The goal of this patch series is fixing a deadlock upon locking the dma reservation
of a DRM gem object when pinning it, at a prime import operation.

Changelog:
v3:
 - Split driver fixes into separate commits for Panfrost and Lima
 - Make drivers call drm_gem_shmem_pin_locked instead of drm_gem_shmem_object_pin
 - Improved commit message for first patch to explain why dma resv locking in the 
 pin callback is no longer necessary.
v2:
 - Removed comment explaining reason why an already-locked
pin function replaced the locked variant inside Panfrost's
object pin callback.
 - Moved already-assigned attachment warning into generic
already-locked gem object pin function


Adrián Larumbe (3):
  drm/panfrost: Fix dma_resv deadlock at drm object pin time
  drm/lima: Fix dma_resv deadlock at drm object pin time
  drm/gem-shmem: Add import attachment warning to locked pin function

 drivers/gpu/drm/drm_gem_shmem_helper.c  | 2 ++
 drivers/gpu/drm/lima/lima_gem.c         | 2 +-
 drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)


base-commit: 7acacca1b157fcb258cfd781603425f73bc7370b

Comments

Boris Brezillon May 29, 2024, 7:32 a.m. UTC | #1
On Thu, 23 May 2024 12:32:16 +0100
Adrián Larumbe <adrian.larumbe@collabora.com> wrote:

> This is v4 of https://lore.kernel.org/lkml/20240521181817.097af5e1@collabora.com/T/
> 
> The goal of this patch series is fixing a deadlock upon locking the dma reservation
> of a DRM gem object when pinning it, at a prime import operation.
> 
> Changelog:
> v3:
>  - Split driver fixes into separate commits for Panfrost and Lima
>  - Make drivers call drm_gem_shmem_pin_locked instead of drm_gem_shmem_object_pin
>  - Improved commit message for first patch to explain why dma resv locking in the 
>  pin callback is no longer necessary.
> v2:
>  - Removed comment explaining reason why an already-locked
> pin function replaced the locked variant inside Panfrost's
> object pin callback.
>  - Moved already-assigned attachment warning into generic
> already-locked gem object pin function
> 
> 
> Adrián Larumbe (3):
>   drm/panfrost: Fix dma_resv deadlock at drm object pin time
>   drm/lima: Fix dma_resv deadlock at drm object pin time
>   drm/gem-shmem: Add import attachment warning to locked pin function

Queued to drm-misc-fixes.

Thanks!

Boris