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/gem: Document locking rule of vmap and evict callbacks

The vmap/vunmap/evict GEM callbacks are always invoked with a held GEM's
reservation lock. Document this locking rule for clarity.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.d>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250322212608.40511-4-dmitry.osipenko@collabora.com

+6 -3
+6 -3
include/drm/drm_gem.h
··· 159 159 * @vmap: 160 160 * 161 161 * Returns a virtual address for the buffer. Used by the 162 - * drm_gem_dmabuf_vmap() helper. 162 + * drm_gem_dmabuf_vmap() helper. Called with a held GEM reservation 163 + * lock. 163 164 * 164 165 * This callback is optional. 165 166 */ ··· 170 169 * @vunmap: 171 170 * 172 171 * Releases the address previously returned by @vmap. Used by the 173 - * drm_gem_dmabuf_vunmap() helper. 172 + * drm_gem_dmabuf_vunmap() helper. Called with a held GEM reservation 173 + * lock. 174 174 * 175 175 * This callback is optional. 176 176 */ ··· 194 192 * @evict: 195 193 * 196 194 * Evicts gem object out from memory. Used by the drm_gem_object_evict() 197 - * helper. Returns 0 on success, -errno otherwise. 195 + * helper. Returns 0 on success, -errno otherwise. Called with a held 196 + * GEM reservation lock. 198 197 * 199 198 * This callback is optional. 200 199 */