| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Expected to be dropped once upstream removes `remove_new().
Signed-off-by: Janne Grunau <j@jannau.net>
|
| |
|
|
|
|
|
|
| |
fixup! rust: Add `name` argument to Module::init()
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
|
|
|
|
|
|
| |
Allow a GEM object to share another object's DMA reservation, for use
with drm_gpuvm. To keep memory safety, we hold a reference to the GEM
object owning the resv, and drop it when the child object is freed.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
The missing SAFETY comments should be fixed later...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
| |
Initializer for types with Default::default() implementations in init
context. This, by nature, only works for types which are not pinned.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 5270316c9fec ("kbuild: Use -fmin-function-alignment when
available") introduces `-fmin-function-alignment` if supported to remove
a workaround for gcc not respecting `-falign-functions` for cold
functions. bindgen does not recognize `-fmin-function-alignment` but
`-falign-functions` is sufficient as long as bindgen is LLVM backed. See
c27cd083cfb9 ("Compiler attributes: GCC cold function alignment
workarounds").
So replace `-fmin-function-alignment` with `-falign-functions` for
bindgen's C flags.
Fixes: 5270316c9fec ("kbuild: Use -fmin-function-alignment when available")
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
|
|
|
|
| |
This reverts commit 7044dcff8301b29269016ebd17df27c4736140d2.
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
|
|
|
|
| |
This reverts commit 19843452dca40e28d6d3f4793d998b681d505c7f.
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
|
|
|
|
| |
This reverts commit 4951ddd51b816b5e4095cd3cd3bd46fb73b96a65.
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
|
|
|
|
|
|
| |
required after ("rust: kernel: require `Send` for `Module` implementations")
commit 323617f649c0966ad5e741e47e27e06d3a680d8f upstream.
Fixes: 0d4917899844 ("*RFL import: kernel::driver")
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
|
|
|
|
|
|
|
|
|
| |
This unstable feature is broken/gone in 1.73. To work around this
without breaking the API, turn IdArray::new() into a macro so that it
can use concrete types (which can still have const associated
functions) instead of a trait.
This is quite ugly...
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_LIST_HARDENED causes certain list functions to use what bindgen
considers an unsupported ABI:
panicked at 'Invalid or unknown abi 14 for function
"__list_del_entry_valid_or_report" (Function { name:
"__list_del_entry_valid_or_report", mangled_name:
Some("__list_del_entry_valid_or_report"), link_name:
None, signature: TypeId(ItemId(38153)), kind: Function,
linkage: External })',
/usr/share/cargo/registry/bindgen-0.68.1/codegen/mod.rs:4195:17
Exclude these, since they are internal functions we don't use directly
anyway.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Hector Martin <marcan@marcan.st>
|
|
|
|
| |
Signed-off-by: Hector Martin <marcan@marcan.st>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
| |
This allows drivers to control whether a given GEM object is allowed to
be exported via PRIME to other drivers.
|
|
|
|
|
|
|
|
| |
The GPU scheduler manages scheduling GPU jobs and dependencies between
them. This Rust abstraction allows Rust DRM drivers to use this
functionality.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
| |
DRM Sync Objects are a container for a DMA fence, and can be waited on
signaled, exported, and imported from userspace. Add a Rust abstraction
so Rust DRM drivers can support this functionality.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
| |
drm_mm provides a simple range allocator, useful for managing virtual
address ranges. Add a Rust abstraction to expose this module to Rust
drivers.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
This requires type_alias_impl_trait.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
| |
Switch from being a refcount wrapper itself to a transparent wrapper
around `bindings::drm_device`. The refcounted type then becomes
ARef<Device<T>>.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
|
| |
The DRM shmem helper includes common code useful for drivers which
allocate GEM objects as anonymous shmem. Add a Rust abstraction for
this. Drivers can choose the raw GEM implementation or the shmem layer,
depending on their needs.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
| |
This requires type_alias_impl_trait.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
| |
Switch from being a refcount wrapper itself to a transparent wrapper
around `bindings::drm_device`. The refcounted type then becomes
ARef<Device<T>>.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
| |
The DRM GEM subsystem is the DRM memory management subsystem used by
most modern drivers. Add a Rust abstraction to allow Rust DRM driver
implementations to use it.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
| |
Switch from being a refcount wrapper itself to a transparent wrapper
around `bindings::drm_device`. The refcounted type then becomes
ARef<Device<T>>.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
|
| |
A DRM File is the DRM counterpart to a kernel file structure,
representing an open DRM file descriptor. Add a Rust abstraction to
allow drivers to implement their own File types that implement the
DriverFile trait.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
|
|
| |
Add the initial abstractions for DRM drivers and devices. These go
together in one commit since they are fairly tightly coupled types.
A few things have been stubbed out, to be implemented as further bits of
the DRM subsystem are introduced.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
DRM drivers need to be able to declare which driver-specific ioctls they
support. This abstraction adds the required types and a helper macro to
generate the ioctl definition inside the DRM driver.
Note that this macro is not usable until further bits of the
abstraction are in place (but it will not fail to compile on its own, if
not called).
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
| |
This is just for basic usage in the DRM shmem abstractions for implied
locking, not intended as a full DMA Reservation abstraction yet.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
DMA fences are the internal synchronization primitive used for DMA
operations like GPU rendering, video en/decoding, etc. Add an
abstraction to allow Rust drivers to interact with this subsystem.
Note: This uses a raw spinlock living next to the fence, since we do
not interact with it other than for initialization.
TODO: Expose this to the user at some point with a safe abstraction.
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Signed-off-by: Asahi Lina <lina@asahilina.net>
|
|
|
|
| |
Commit reference: 3dfc5ebff103
|