diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2025-05-26 15:25:20 +0200 |
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2025-05-30 09:47:28 +0200 |
| commit | df1c3093aee3daee4d56a5cb8cdba75c1ef6962f (patch) | |
| tree | 530e5312d9dea78cd2986de2885be7f1e3ddcdfd /include | |
| parent | drm/gem-vram: Un-export pin helpers (diff) | |
| download | linux-df1c3093aee3daee4d56a5cb8cdba75c1ef6962f.tar.gz linux-df1c3093aee3daee4d56a5cb8cdba75c1ef6962f.zip | |
drm/gem: Inline drm_gem_pin() into PRIME helpers
Inline drm_gem_pin() into its only caller drm_gem_map_attach()
and update the documentation in the callback's purpose. Do the
equivalent for drm_gem_unpin(). Also add stricter error checking
on the involved locking.
The pin operation in the GEM object functions is a helper for
PRIME-exported buffer objects. Having drm_gem_pin() gives the
impression of a general-purpose interface, which is not the case.
Removing it makes the pin callback a bit harder to misuse.
v2:
- clarify comment on pin callback (Dmitry)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/r/20250526132634.531789-5-tzimmermann@suse.de
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drm_gem.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index a3133a08267c..1a79ec3fe45c 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -126,7 +126,8 @@ struct drm_gem_object_funcs { /** * @pin: * - * Pin backing buffer in memory. Used by the drm_gem_map_attach() helper. + * Pin backing buffer in memory, such that dma-buf importers can + * access it. Used by the drm_gem_map_attach() helper. * * This callback is optional. */ |
