diff options
| author | Alistair Popple <apopple@nvidia.com> | 2026-09-09 16:44:55 +1000 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-09-27 14:02:20 +0200 |
| commit | 6e70b1719991fb5b51306dec3bdba1e7dbfe838c (patch) | |
| tree | 2b34f836be2c10572885f68eab113b54ed8d4863 /tools/lib/python/kdoc/python_version.py | |
| parent | 4075acc9d489cc6aaa37e3f4930943f32a60e7e4 (diff) | |
gpu: nova-core: Add public driver API to nova-core
Nova core will be used to export core functionality to other drivers
which will bind to it via auxiliary bus devices. Add a NovaCoreApi type
which drivers can use to call nova-core methods.
Auxiliary bus drivers obtain a NovaCoreApiHandle for a particular GPU
using NovaCoreApi::of(). This takes a reference to a bound auxiliary bus
device and checks that its registration data is a NovaCoreApi. The
NovaCoreApi itself is then accessed by passing a closure to
NovaCoreApiHandle::with().
Closure based access is used because NovaCoreApi cannot be assumed to be
covariant over its lifetime. It references the Gpu, which will carry
locks around types holding device resources, making it invariant.
Covariant sub-fields can still be returned directly from the closure
thanks to the lifetime bound on registration_data_with().
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Link: https://patch.msgid.link/20260909064506.910162-3-apopple@nvidia.com
[ Rebase and use pin_chain() for Gpu::run_selftests(). - Danilo ]
Co-developed-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
