aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorLyude Paul <[email protected]>2025-05-13 22:09:57 +0000
committerDanilo Krummrich <[email protected]>2025-05-13 22:37:16 +0000
commit38cb08c3fcd3f3b1d0225dcec8ae50fab5751549 (patch)
tree2392983925ccb991cfe914db6da173b417fba6a1 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentrust: drm: gem: s/into_gem_obj()/as_raw()/ (diff)
downloadkernel-38cb08c3fcd3f3b1d0225dcec8ae50fab5751549.tar.gz
kernel-38cb08c3fcd3f3b1d0225dcec8ae50fab5751549.zip
rust: drm: gem: Implement AlwaysRefCounted for all gem objects automatically
Currently we are requiring AlwaysRefCounted in most trait bounds for gem objects, and implementing it by hand for our only current type of gem object. However, all gem objects use the same functions for reference counting - and all gem objects support reference counting. We're planning on adding support for shmem gem objects, let's move this around a bit by instead making IntoGEMObject require AlwaysRefCounted as a trait bound, and then provide a blanket AlwaysRefCounted implementation for any object that implements IntoGEMObject so all gem object types can use the same AlwaysRefCounted implementation. This also makes things less verbose by making the AlwaysRefCounted trait bound implicit for any IntoGEMObject bound. Signed-off-by: Lyude Paul <[email protected]> Reviewed-by: Daniel Almeida <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Danilo Krummrich <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions