diff options
| author | Daniel Almeida <daniel.almeida@collabora.com> | 2026-03-23 20:27:00 -0300 |
|---|---|---|
| committer | Alice Ryhl <aliceryhl@google.com> | 2026-03-26 13:08:48 +0000 |
| commit | 72a723df8decf70e04f799a6defda8bb62d41848 (patch) | |
| tree | 3e58729d9e410e399189d5653fe1cd322f7faef5 /tools/perf/scripts/python/stackcollapse.py | |
| parent | f5e841e4966c1873b9bb2c69d07947a54284e5eb (diff) | |
rust: drm: dispatch work items to the private data
This implementation dispatches any work enqueued on ARef<drm::Device<T>> to
its driver-provided handler. It does so by building upon the newly-added
ARef<T> support in workqueue.rs in order to call into the driver
implementations for work_container_of and raw_get_work.
This is notably important for work items that need access to the drm
device, as it was not possible to enqueue work on a ARef<drm::Device<T>>
previously without failing the orphan rule.
The current implementation needs T::Data to live inline with drm::Device in
order for work_container_of to function. This restriction is already
captured by the trait bounds. Drivers that need to share their ownership of
T::Data may trivially get around this:
// Lives inline in drm::Device
struct DataWrapper {
work: ...,
// Heap-allocated, shared ownership.
data: Arc<DriverData>,
}
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/r/20260323-aref-workitem-v3-2-f59729b812aa@collabora.com
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
