Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/shmem-helper: Add lockdep asserts to vmap/vunmap

Since commit 21aa27ddc582 ("drm/shmem-helper: Switch to reservation
lock"), the drm_gem_shmem_vmap and drm_gem_shmem_vunmap functions
require that the caller holds the DMA reservation lock for the object.
Add lockdep assertions to help validate this.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250318-drm-gem-shmem-v1-1-64b96511a84f@collabora.com

authored by

Asahi Lina and committed by
Lyude Paul
64a8d0aa e33c3f4d

+4
+4
drivers/gpu/drm/drm_gem_shmem_helper.c
··· 348 348 struct drm_gem_object *obj = &shmem->base; 349 349 int ret = 0; 350 350 351 + dma_resv_assert_held(obj->resv); 352 + 351 353 if (drm_gem_is_imported(obj)) { 352 354 ret = dma_buf_vmap(obj->dma_buf, map); 353 355 } else { ··· 409 407 struct iosys_map *map) 410 408 { 411 409 struct drm_gem_object *obj = &shmem->base; 410 + 411 + dma_resv_assert_held(obj->resv); 412 412 413 413 if (drm_gem_is_imported(obj)) { 414 414 dma_buf_vunmap(obj->dma_buf, map);