]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/sharp-memory: Do not access GEM-DMA vaddr directly
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 27 Jun 2025 15:23:09 +0000 (17:23 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 11 Aug 2025 16:49:55 +0000 (18:49 +0200)
commit136c374d8c80378d2982a46b2adabfc007299641
treef5c485dcef5fb002f9ad430edfb3a2b8fa2803a8
parentc585c1b29a52e4c556565fc7c4bb767781894b57
drm/sharp-memory: Do not access GEM-DMA vaddr directly

Use DRM's shadow-plane helper to map and access the GEM object's buffer
within kernel address space. Encapsulates the vmap logic in the GEM-DMA
helpers.

The sharp-memory driver currently reads the vaddr field from the GME
buffer object directly. This only works because GEM code 'automagically'
sets vaddr.

Shadow-plane helpers perform the same steps, but with correct abstraction
behind drm_gem_vmap(). The shadow-plane state provides the buffer address
in kernel address space and the format-conversion state.

v2:
- fix typo in commit description

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250627152327.8244-1-tzimmermann@suse.de
drivers/gpu/drm/tiny/sharp-memory.c